We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have never used external RAM before (beleive it or not :-o ) . Now I am using an NVRAM from Dallas so that in case of power failure the value of some variables is retained. My question is how do I declare the 'Non Volatile External' variable and how do I retreive the previous (pre-power fail) value ?
If I just declare a variable it would not be initialised ba default ?
"If I just declare a variable it would not be initialised ba default?" The compiler doesn't know how much XRAM you have, nor its base address. Therefore, if you want your XRAM to be initialised, you must specify its size and base address - you do this by means of the startup code Of course, this gives you the opportunity to specify that some areas of XRAM will be initialised, while others (eg, NVRAM) will not. For details, refer to the thread cited earlier: http://www.keil.com/forum/msgpage.asp?MsgID=4719
Hello, you must declare a static variable (of course without any initialisation). Automatic variables (all variables you "just declare" are automatic) don't survive even leaving the block they was declared in, so how should they survive power off? Have success - Peter