Reading a memory value after reprogramming

cloudy

Member
I understand the EEPROM data written when you used the WRITE command is lost during a reprog.

My code increments a memory value, but I have no initial "set" for the value. This works in the simulator but I just wanted to know what value eeprom variables are after a reprogram, do they read back as zeros or garbage?

James
 

BillyGreen1973

Senior Member
I could be wrong, but I think your right, the EEprom registers are set to zero (0).

You can check this by making your first line a 'READ' command into b0 then SERTX b0, to the terminal window to see whats there!
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE Forum.

In the absence of any EEPROM ( or DATA ) commands, the Data Eeprom will be initialised to zero values.

On some PICAXE ( those which don't share program and data memory ) you can add #NO_DATA which leaves the Data Eeprom as it was while downloading / re-programming takes place.
 
Top