>Hello everyone. I have a project where 4 slaves (pic16F876) and 1 master >(pic16F877) will be using i2c to communicate. I'm pretty new to pics but >can do PicBasic easily enough. But the PicBasic i2c stuff doesn't work >for my project (why not?) and I need to use assembler to read and write >between the 16F877 and 16F876's. I've spent a few days on this already >without success and I'm getting confused about when to send Acks, Nacks, >Stops, etc. If some kind person could list the sequence of events for an >i2c read and an i2c write (on the master side - I believe the slave code >is fine) and what needs to be done in software and when it needs to be >done. I will be eternally grateful. Step 1. Do you have the Philips I2C spec? If not go to http://www.semiconductors.philips.com/buses/i2c/ and get it (top PDF link in centre). Step 2. get AN734 and AN735 from the Microchip web site, and look at the code examples in these and compare how it works compared to the diagrams in the Philips document. If you are real lucky you may still have the mail with my take on the slave version code I sent as an attachment about a week ago (or maybe a bit more) to this list. Using these three things the I2C itself is real easy to get going. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu