??? 05/14/05 07:24 Read: times |
#93412 - What happens to RAM on reset Responding to: ???'s previous message |
Bert Van Den Berg said:
After searching the Tutorials section and 8052 FAQS I am still not positive what happens to the internal RAM of an 8051 after a hardware reset. I did find the statement "Internal RAM is volatile, so when the 8051 is reset this memory is cleared". Can someone verify this or I will have to do an experiment on the hardware.
I have a reason to want to know if an external hardware watchdog timer has reset the micro and if RAM is not affected it would be easy to tell. Regards, Bert Quoting the bottom right hand side of page 3-26 of the MCS 51 Microcontroller Family User's Manual: "The internal RAM is not affected by reset. On power up the RAM content is indeterminate." It is true that the internal RAM is volatile; when your system powers up, it will be in an indeterminate state, as it is not initialized by the 8051's reset algorithm. Of course, resets may be generated at times other than power-up, as determined by your hardware. It is worth noting that most SFRs, in contrast with general purpose internal RAM are initialized by the reset algorithm, and will come up with known values after a reset (see page 2-9 for details on what these values are). The fact that internal RAM remains unaffected by resets is actually rather useful, even though it might seem undesirable at first glance. For example, it allows you to return from powerdown mode with the bulk of the state from your previous session intact. In addition, SRAM (which is what the internal RAM in an 8051 is) is generally capable of retaining its contents at voltages significantly below its normal operating voltage; attempts to access an SRAM under low voltage conditions, however, are liable to lead to corruption. This observation, coupled SRAM's generally very low static power dissipation, a good supervisor IC, and a few other inexpensive components can allow you to build a variety of useful features into your project, including brownout recovery, permitting battery changes without data loss, and more. --Sasha Jevtic |
Topic | Author | Date |
Effects of hardware RESET on RAM values | 01/01/70 00:00 | |
Oops found it | 01/01/70 00:00 | |
What happens to RAM on reset | 01/01/70 00:00 | |
If external Watch Dog... | 01/01/70 00:00 | |
Thank you all | 01/01/70 00:00 | |
Post Script - startup code. | 01/01/70 00:00 | |
Using assembly![]() | 01/01/70 00:00 |