Also might look at the following tutorial... http://www.virtualbreadboard.com/READ/vbb/Help/Packages/PICMICROS/Tutorials/ Features/PIC16F87X/Tutorial%2019/Tutorial%2019.htm James Caska caska@virtualbreadboard.com -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of A.J. Tufgar Sent: Friday, June 07, 2002 5:20 AM To: PICLIST@MITVMA.MIT.EDU Subject: Help with I2C. Hello again all, Normally I don't ask for help with code I'd rather learn from debugging myself, but this bug has me stumped. I'm trying to communicate to a 24LC64 with a 16F84. The 24LC64 works fine and will acknowledge fine through the write cycle (if I switch the address of the 24LC64 it will stop ack this leads me to beleive it works). However when I try to read back the data it won't let me. If I take out my stopbit routine I get some data back but it is incorrect. If I leave in the stop bit it doesn't ack during a read routine. Very confusing. Anyways here's my code I'm pretty sure the hardware is right as I seem to be able to write to the device correctly. I do have 10k pull-ups on the I2C port and I'm using a 4MHz osc. Also I realize in my read routine the data is backwards. I'm trying to get any data back period before inverting it (bit 7 is really bit 0). Thanks, A very desprate and irrate programmer. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.