This is for those peoples that was looking to interface an E2PROM to 16F877: Routines (in hitech c) for read and write to I2C EEPROMS: read_serial_I2C(unsigned char device) { SEN = 1; // START while (SEN == 1); //wait until star condition finish SSPIF = 0; SSPBUF = device+0; // E2PROM "name" (like 10100000) + WRITEcommand while (SSPIF == 0); SSPIF = 0; SSPBUF = MSB_address; // most significant byte of the 16bits address while (SSPIF == 0); SSPIF = 0; SSPBUF = LSB_address; while (SSPIF == 0); PEN = 1; //generate na stop while (PEN == 1); //wait until stop sequence finish SEN = 1; //START again while (SEN == 1); SSPIF = 0; SSPBUF = device+1; // 24LC02 + READcommand while (SSPIF == 0); //wait until the SSPBUF is full of data now the byte that was at address MSB_address and LSB_address is available at SSPBUF variable. record_I2C(unsigned char device) { SEN = 1; while (SEN == 1) ; SSPIF = 0; SSPBUF = device+0; while (SSPIF == 0); SSPIF = 0; SSPBUF = MSB_address; while (SSPIF == 0); SSPIF = 0; SSPBUF = LSB_address; while (SSPIF == 0); SSPIF = 0; SSPBUF = record_data; //record in memory (EEPROM) the 8bit type "record_data" while (SSPIF == 0); PEN = 1; while (PEN == 1) ; }; now the variable is recorded in EEPROM. That's it guys, Beto.