> -----Original Message----- > From: Barry Gershenfeld [SMTP:barry_g@ZMICRO.COM] > Sent: Friday, December 13, 2002 6:20 PM > To: PICLIST@mitvma.mit.edu > Subject: Re: [PIC]: I2C slave with multiple addresses > > If the I2C is done properly, the slave can "stretch" the time > between bits if it can jump on the clock line fast enough to > hold it down before the master releases it. Then you can > buy some time to do the processing. Even though you think > you can't modify the 100KHz rate of the master, you can. > > Barry > I am aware of clock stretching, but: 1) The master has requirements that the slave stretch each bit by no more than 1 bit period at 100KHz, and each word for no more than 8 bit periods. 2) This doesn't help the fact that you need to sample at the full rate to detect the start condition. This can be alleviated to some extent by external hardware to detect start and stop conditions which could interrupt the micro, but even so, the micro is would also be running an SPI slave and a software I2C master with several different protocol conversions. I guess it might just about be doable with a 20MHz PIC, or better a 40MHz 18 series. Space is extremely tight, even the second PIC is going to be a problem to get in so I cannot afford to add much in the way of extra hardware. TBH this seems to be crying out for a programmable logic implementation, but my experience in these is very limited. Regards Mike -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body