Searching \ for 'I2C on 12Cxx' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'I2C on 12Cxx'.

Truncated match.
PICList Thread
'I2C on 12Cxx'
1997\10\30@073002 by Frank A. Vorstenbosch

flavicon
face
On Tue 28 Oct, Robert Nansel <spam_OUTbnanselTakeThisOuTspamNAUTICOM.NET> wrote:
>
> This may be a bone-headed idea, but has anybody tried to implement an I2C
> slave on a 12Cxx device? My first guess is that it wouldn't have nearly
> enough bandwidth to keep up with a 100 KHz bit-rate, but how close could it
> come?

I've been doing just this, and it does work.  A friend of mine wrote an I2C
interface on a 16C84 to connect his HP48 calculator to I2C peripherals.
He of course implemented his I2C in software and _very_fortunately_ he
used a slow start pulse (waiting 20us between states).  In my 12C508 copy
of it I actually implemented an I2C slave as well -- the main loop would
continuously poll the RS232 RxD signal and the I2C SDA/SCL signals to detect
a start bit on the RS232 or a start condition on the I2C.  It was just about
possible to get this loop to execute fast enough so that it would successfully
detect all 20us-per-state I2C start conditions as well as not miss a start
bit on the 9600bps RS232.
It would not be able to read the RS232 when receiving I2C messages or
vice versa, but that isn't a big problem.

> A related (and perhaps more practical) notion would be to use a 12Cxx as a
> bit-banged START condition and Address Match Detector (to be paired with a
> 16F84 with suitable I2C slave code). Any thoughts?

Nah, software only is always cheaper=better.

I've since modified my I2C library to also generate a slow (20us steps)
start condition so that it can be recognized by this I2C device.  Not a
great loss when it isn't needed, only 6 instruction words or so.

CONTEST
=======

Anyone out there who can write a PIC loop that can detect RS232 start
bits as well as I2C start conditions in less than (say) 8 cycles between
samples?  You can assume the bits are all on the same port.  Bonus
for running on 12-bit PICs.

Frank
------------------------------------------------------------------------
Frank A. Vorstenbosch                           Phone:  +44-181-636 3391
Electronics & Software Engineer                    or:  +44-181-636 3000
Eidos Technologies Ltd., Wimbledon, London      Mobile:  +44-976-430 569

1997\10\30@075121 by Robert Nansel

flavicon
face
>
>>
>> This may be a bone-headed idea, but has anybody tried to implement an I2C
>> slave on a 12Cxx device?...
>

On Thu 30 Oct, Frank A. Vorstenbosch <.....favKILLspamspam@spam@EIDOS.CO.UK> replied:

{Quote hidden}

Wow. Could you post some more details on this? Is it just the start
condition state/bit that's lengthened? How does this affect hardware I2C
stuff?

>> A related (and perhaps more practical) notion would be to use a 12Cxx as a
>> bit-banged START condition and Address Match Detector (to be paired with a
>> 16F84 with suitable I2C slave code). Any thoughts?
>
>Nah, software only is always cheaper=better.
>
>I've since modified my I2C library to also generate a slow (20us steps)
>start condition so that it can be recognized by this I2C device.  Not a
>great loss when it isn't needed, only 6 instruction words or so.

My application requires there be some bandwidth left over to do a PWM
servomotor control loop. My thinking was to have the 12Cxx do all the "high
speed" sampling to look for the Start condition, then when it happens,
interrupt the 16C84 so the 16F84 could pump the data bits in at a more
leisurely pace

--Robert

----------------------------------------------------------------------------
  Country Robot            "Modular robot components
  69 S. Fremont Ave. # 2     for education and industry"
  Pittsburgh, PA 15202
----------------------------------------------------------------------------


'I2C on 12Cxx'
1997\11\09@212401 by Marc Heuler
flavicon
face
Hi Robert (Robert Nansel), in <v02140b00b07e2fa50275@[204.171.126.33]> on Oct 30 you wrote:

> My application requires there be some bandwidth left over to do a PWM
> servomotor control loop. My thinking was to have the 12Cxx do all the "high
> speed" sampling to look for the Start condition, then when it happens,
> interrupt the 16C84 so the 16F84 could pump the data bits in at a more
> leisurely pace

I'm convinced you can use a GAL or FLASH PLD to do this, cheaper and
better.  An interrupt on '84 has latency too.  You might miss the first
bit.

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...