View previous topic :: View next topic |
Author |
Message |
karti.m
Joined: 07 Jul 2011 Posts: 5
|
how to use eeprom read and write commands..any one help me. |
Posted: Sat Dec 17, 2011 5:22 am |
|
|
Actually I want to save the value of a variable at the instant of power failure. Again when power came the stored value must read from memory and used for output.
Code: |
write_EEPROM(add,inc1);
write_EEPROM(add1,dec1);
l= read_EEPROM(add1);
m= read_EEPROM(add);
|
I used this in my coding but its not working.
It returns only 0. |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Sat Dec 17, 2011 1:17 pm |
|
|
We need to know more than this.
Give us a FULL but SMALL example we can compile.
Include in your reply the version of compiler.
Your example should include the device as without that info, we can't tell if your device even has EEPROM...
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Sat Dec 17, 2011 4:00 pm |
|
|
Also, how are you detecting that power has failed?.
At what voltage?.
How long will power still be high enough to support the EEPROM write operation after this?.
Best Wishes |
|
|
karti.m
Joined: 07 Jul 2011 Posts: 5
|
regarding eeprom |
Posted: Mon Dec 19, 2011 10:04 am |
|
|
am using pic16f873a,its a 5V device... |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
karti.m
Joined: 07 Jul 2011 Posts: 5
|
|
Posted: Tue Dec 20, 2011 10:21 am |
|
|
thanx a lot for ur links... |
|
|
|