apricot_star
New Member
Does anyone know how to store data to EEPROM?
I am currenly using PIC18F2620.
I am currenly using PIC18F2620.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
The above code reads a 16 bit value from the EEPROM 8 bits at a time.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