CPU = 16F876 MHZ = 10 CONFIG 16254 CAT VAR BYTE DOG VAR BYTE CAT = 2 ;sets CAT = 2 DOG = 0 ;clears DOG = 0 Main: I2COUT B1,B0,%10100001,0,[CAT] ;writes value of 2 to address 0 of the serial eeprom PAUSE 1000 I2CIN B1,B0,%10100001,0,[DOG] ;read value of address 0 and stores it in DOG PAUSE 1000 IF DOG = 2 THEN LOOP ;make sure value was read correctly Goto Main Loop: ;if the LED blinks the write/read was successful Debug ["I2C Write Was Successful ",dec dog] End