??? 07/21/11 06:57 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#182943 - Data Ram ? Not!! Responding to: ???'s previous message |
Maunik Choksi said:
Hi everybody,
I am using P89LV51RD2FN first time & need help from you to use DATA RAM as EEPROM. Is it possible & if yes how ? can you give some source code of it Before you go grubbing for free code you have to get a far better grip in the hardware requirements. Code will do nothing for you until you get the hardware in place. A) First off realize that EEPROM is a non-volatile memory technology. It will not lose it's memory content when the power supply goes away. B) "Data Ram" on board your chosen microcontroller is volatile memory. It _will_ lose its content when power goes away. This means that it cannot be directly to appear as EEPROM. There is no software magic fix for that either. C) You could be practical and attach a 2-wire interface serial EEPROM to other pins on your microcontroller and use that as real EEPROM. But that would require you to read at least one more data sheet. You ready for that? D) You could design your microcontroller with a battery backup scheme and then each time you go to "turn off" your device you put it into a very low power sleep state. This would retain the Data Ram content and make it "non-volatile" of the life of the battery. Such design is going to take considerable work and effort and planning to get the hardware features in place and working....all of which must be completed before you let even one line of code hit your hardware. So, you have some planning and work to do. Coming here asking for code was probably not the best thing to have done. Michael Karas |