Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:33 28 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : var eeprom saving when reprogramming

Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 03:53am 06 Mar 2017
Copy link to clipboard 
Print this post

Is there a way to preserve the contents of the eeprom (VAR saved variables) when downloading a new program?

The manual says "saved variables will be automatically cleared by the NEW command or when a new program is loaded."

I often just want to make a small change in a program while preserving variable values saved in eeprom. Is there a way to do this?

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:22am 06 Mar 2017
Copy link to clipboard 
Print this post

Hi

Why not use the built in editor to make the small changes that way all VAR save variables will be intact

Regards
Jman
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 08:36am 06 Mar 2017
Copy link to clipboard 
Print this post

bit more involved but it is easy to add a EEPROM or FRAM chip and then store your variables in that - safe from everything then.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 08:46am 06 Mar 2017
Copy link to clipboard 
Print this post

Yes, I have eeprom on a ds3132 module, and can use that, but would have to write the functional equivalent of var save and var restore.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 10:03am 06 Mar 2017
Copy link to clipboard 
Print this post

does this help?

http://www.thebackshed.com/forum/forum_posts.asp?TID=6917
Edited by CaptainBoing 2017-03-07
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 11:53am 06 Mar 2017
Copy link to clipboard 
Print this post

Yes, I saw and noted that nice library. I was hoping for something like the PICAXE directive, "#no_data", which causes eeprom to be preserved when the program is re-flashed. Something like

OPTION SAVE EEPROM


PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024