Hello, I would like to ask for the PicList members help on a problem I am having using the serial EEPROM 24LC16B connected to 16C77 using SDA & SCL pins with 4.7K ohm pull up resistors. I am using CCS example to interface to this EEPROM, here is the code: byte read_ext_eeprom(long int address) { byte data; i2c_start(); i2c_write((0xa0|(byte)(address>>7))&0xfe); i2c_write(address); i2c_start(); i2c_write((0xa0|(byte)(address>>7))|1); data=i2c_read(0); // 0 marks that we should not ACK the received data i2c_stop(); return(data); } The problem is that this code is stuck on the i2c_read(0) which polls the SSPSTAT register bit 0 to check if a data is received. Here is the disassembly code: 0000 01026 .................... data=i2c_read(0); // 0 marks that we should not ACK the received data 02C6 1683 01027 BSF 03,5 02C7 1814 01028 BTFSC 14,0 02C8 2ACB 01029 GOTO 2CB 02C9 1283 01030 BCF 03,5 02CA 2AC6 01031 GOTO 2C6 02CB 1283 01032 BCF 03,5 02CC 0813 01033 MOVF 13,W 02CD 00B8 01034 MOVWF 38 Any idea why wouldn't the 24LC16B answer ? Using CCS sample for writing a byte to the EEPROM execute with no problems, only, I can not test if it does something wrong until I have the reading working. Thanks Chaipi -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu