View previous topic :: View next topic |
Author |
Message |
slsslssls
Joined: 17 Mar 2009 Posts: 6
|
16f877a internal eeprom problem??? |
Posted: Tue Mar 17, 2009 10:00 am |
|
|
hi,
I am trying to use internal eeprom on 16f877a. There is no problem on proteus, but my circuit is not working true.
Data that I wrote on eeprom is being erased when power off.
How can this be? |
|
|
Guest
|
|
Posted: Tue Mar 17, 2009 10:17 am |
|
|
Hi,
How do you know it's not working correctly? Is the rest of your hardware working?
Post some complete sample code, and your compiler version.
Jeff |
|
|
slsslssls
Joined: 17 Mar 2009 Posts: 6
|
|
Posted: Tue Mar 17, 2009 10:30 am |
|
|
For example,
When I compile this code:
Code: | write_eeprom(1,'2');
lcd_putc(read_eeprom(1)); |
I can see 2 on LCD.
Then I erase -- write_eeprom(1,'2') -- and I can't see 2 on display.
I had written to eeprom '2'. How can it be erased?? I can't understand this. I couldn't solve the problem. :( |
|
|
Ttelmah Guest
|
|
Posted: Tue Mar 17, 2009 10:54 am |
|
|
If you erased "write_eeprom(1,'2')", then presumably you _erased_, and reprogrammed the chip. EEPROM will be erased as well, unless you tell your programmer not to do this...
Best Wishes |
|
|
slsslssls
Joined: 17 Mar 2009 Posts: 6
|
|
Posted: Tue Mar 17, 2009 10:59 am |
|
|
How can I tell the programmer not to do this?? |
|
|
slsslssls
Joined: 17 Mar 2009 Posts: 6
|
|
Posted: Tue Mar 17, 2009 12:52 pm |
|
|
Now, there is no problem! |
|
|
|