Thank for the reply.
Actually, i know how is the routine like to write and read to eeprom. My problem is that i dunnno how to implement it. I suppose to store the calibration value of light sensor to the eeprom so that my main program will know it when my device is first power up. I just don't understand how is the things work from saving the value and read the value.
Here is the example of what have my friend done:
# define FCIN_ADDR 0x00
//Reads the high byte and shifts it 8 to put it in the high byte of results.
result= ReadEeprom(FCIN_ADDR);
result<<=8;
// Read low byte and add it to the result which contains the high byte
tem=ReadEeprom(FCIN_ADDR+1);// why must it increment by1
result+=tem;
Regards