I have been trying to have a feel of the subject. My objectives are: 1) To write to an EEPROM 2) Read the same from the EEPROM 3) Put the data on the port for display to verify. I am using Proteus for the simulation. Below is my code which is not working, I cant get the led blink properly. I shall appreciate the corrections Pls. ==================The Code===================== #include <16f84.h> //EEPROM = 24LC00 // Configure PIC to use: XT clock, no code protection // Disable Power Up Timer, no Watchdog Timer, #fuses XT, NOPROTECT, NOPUT, NOWDT // tell compiler clock is 4MHz. This is required for DELAY_MS() // and for serial I/O, all of which use software delay loops. #use delay (clock=4000000) // declare that we'll manually establish the data direction of // each I/O pin on ports A&B. #use fast_io ( a ) #use fast_io ( b ) #use I2C(master, SCL=PIN_A0, SDA=PIN_A1) #byte PORT_B = 6 /* set variable that maps to memory */ void main(void) { int data; set_tris_a (0b00000000); /* set up I/O's */ set_tris_b (0b00000000); /* set up I/O's */ while(true) { PORT_B=0; delay_ms(500); data=0xff; i2c_start(); delay_ms(10); /* Wait for some time to let the Memory*/ i2c_write(10);/* The address to write to*/ delay_ms(10); i2c_write(data); delay_ms(10); i2c_stop(); delay_ms(10); i2c_start(); delay_ms(10); i2c_write(11); delay_ms(10); data=i2c_read(); i2c_stop(); delay_ms(10); PORT_B=data; delay_ms(500); } } ==================End Code========================= --------------------------------- Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist