Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/13/02 13:40
Read: times


 
#30683 - RE: SRAM instead of EPROM???
Yes you can use SRAM with battery.

In this case you will arrannge to initialize the SRAM after it is already installed in the final product. There are many ways to do this but I have found two good ones.

One way is to add some additional RS323 code to your 8051 application to permit a PC based program to download information into the SRAM.

A second way is to decide upon a default set of information for the SRAM and capture that into the 8051 program structure. Then use a simple 16 bit XOR CRC across all the data in the SRAM that is then stored into the SRAM as well. This is used at startup to determine if the SRAM content is valid. And if it is not valid then use the default information to initialize the SRAM and give it a starting condition. When using SRAM in this way it is a good idea to store two copies of the dataset into the SRAM, each with its own copy of the XOR CRC. This permits dual validation of the copies at powerup becasue it is never certain that one or the other copies of the SRAM image is valid if the microcontroller lost power just as one copy was being updated.

Have Fun !!
Mike


List of 6 messages in thread
TopicAuthorDate
SRAM instead of EPROM???            01/01/70 00:00      
RE: SRAM instead of EPROM???            01/01/70 00:00      
RE: SRAM instead of EPROM???            01/01/70 00:00      
RE: SRAM instead of EPROM???            01/01/70 00:00      
RE: SRAM instead of EPROM???            01/01/70 00:00      
RE: SRAM instead of EPROM???            01/01/70 00:00      

Back to Subject List