Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | Re: Persistent variables

Discussion forum for the BasicX family of microcontroller chips.

Persistent variables - precisionenergy - Apr 28 12:22:00 2005

Is there a rule by which a persistent variable is written to the
EEPROM? Specifically, does a persistent variable get written if the
value has not changed?





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: Persistent variables - David Sousa Mendes - Apr 29 5:42:00 2005

Language Reference, pg 24 says:
"
In order to guarantee the ordering of persistent variables, 3 rules should be followed:

1. All persistent variables should be declared in one module.

2. The ordering of declarations of persistent variables must match the order in which the variables

are first accessed at runtime. In this context, "accessed" means either a read or write operation.

3. All persistent variables should be private.

"

Hope it helps...
David
----- Original Message -----
From: precisionenergy
To: basicx@basi...
Sent: Thursday, April 28, 2005 4:22 PM
Subject: [BasicX] Persistent variables Is there a rule by which a persistent variable is written to the
EEPROM? Specifically, does a persistent variable get written if the
value has not changed? ------------------------------------------------------------------------------
Yahoo! Groups Links

a.. To

[Non-text portions of this message have been removed]




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Persistent variables - Don Kinzer - Apr 29 10:55:00 2005

--- In basicx@basi..., Ken Arck <ph@a...> wrote:
> Does the downloader clear them or will they survive a new download?

My observation is that the EEPROM is not affected by a download
operation (other than the system portion of the EEPROM, that is).

Don





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Persistent variables - Don Kinzer - Apr 29 10:58:00 2005

--- In basicx@basi..., "precisionenergy" <martin@p...> wrote:
> Is there a rule by which a persistent variable is written to the
> EEPROM? Specifically, does a persistent variable get written if the
> value has not changed?

I haven't tested theory but I suspect that EEPROM will be written to
if you make an assignment to a persistent variable. If you are
concerned about the time that it takes to write persistent variables
you could implement your own check first and avoid making the
assignment if the value is the same as the existing value.




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )