Does number 8 apply when you're changing the TRIS register, as opposed to the actual data register? -- Mitch ------------------------------ Mitch Miller mdmiller@nque.com ------------------------------ -----Original Message----- From: Steve Baldwin [SMTP:steveb@KCBBS.GEN.NZ] Sent: Friday, January 23, 1998 4:20 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: I2C Read and Write a byte from EEPROM > 1)Don't rely on the MC app notes. > 2)The eeprom manufacturer's data sheets should provide you with all the > info you need (timing diagrams, etc) > 3)Be aware of the eeproms write time. (Usually around 10 ms) > 4)Use the tris registers instead of the port registers to make the pins > go high and low > 5)The rest of it is just bit banging. > 6)Be patient and take it one step (bit) at a time. > 7)The best advice is to forget i2c unless absolutely neccessary, use SPI > if you can! I'd add to that, 8) Remember the read-modify-write thing. Reading another port pin can stuff up your i2c. 9) Addresses wrap on different boundaries for eeprom read and writes. Steve. ====================================================== Very funny Scotty. Now beam down my clothes. ====================================================== Steve Baldwin Electronic Product Design TLA Microsystems Ltd Microcontroller Specialists PO Box 15-680 email: steveb@kcbbs.gen.nz New Lynn, Auckland ph +64 9 820-2221 New Zealand fax +64 9 820-1929 ====================================================== Attachment converted: wonderland:WINMAIL.DAT (????/----) (0001120C)