Page 1 of 1

EEPROM write and read

PostPosted: Sun Apr 29, 2012 4:56 pm
by compass1982
Hi all,

i had wrote a simple code of storing a value into 16F877A EEPROM. the code is as below:

define osc 20
start:
WRITE 0,3

the value of "3" suppose to be written into the EEPROM location of 0000 right? may i know how can i verify the written EEPROM by using pickit2?
(i am using pic basic pro to comple the code, may i know is there any extra header need to be declared?)

thanks~~!

Re: EEPROM write and read

PostPosted: Sun Apr 29, 2012 8:34 pm
by yonghui
hi,

pickit can read the memory content of the PIC, just click on read button on pickit2 standalone software.

i was using function call to write and read eeprom of PIC.

normally i check by writing the memory, and reading it back and compare if the read value is same. if same light up the LED, or display the content on LCD.

Re: EEPROM write and read

PostPosted: Sun Apr 29, 2012 11:44 pm
by compass1982
Hi,
Can u show me an example code on how to do this? U r also using pic basic?

Re: EEPROM write and read

PostPosted: Thu May 03, 2012 5:44 pm
by zhenning
Hi,

Dim Write_Value as byte
Dim Read_Value as byte

Write_Value = $10
Read_Value = 0

EWrite 0, [Write_Value] 'Write the contents of 'Write_Value' variable to address 0

Read_Value = ERead 0 'Read the contents from address 0 to Read_Value variable