How much of a delay should I have after a VarBackup or VarRestore command before using again?
Up to you. AFAICS there is no specific limit.
One last thing, I'd suggest you defer resetting databackup until after the VarBackup call returns. Then guard your button conditions with something like
if ina[button1] and not databackup
...
This avoids changes to the data while its being backed up (see note in post #28).
Ah I get ya, good thinking... I put in more delays than necessary to avoid just that.
So I do not need any delay between writing variables?
I could have two VarBackup calls back to back without any delay?
I have already finished adding the eeprom backup to my actual program, works great!
I figured out how to backup data nested 2+ cogs deep... so far I have accomplished everything I was hoping to
yay!
Yes, any number of VarBackup calls is possible without delay (additionally, the guard I suggested should probably only be around the actual backup call so that you at least update your variable during a button press). Note, the example you posted only does a backup in the context of a single cog. Once you start backing up from more than one cog you have to synchronise them somehow. I'm sure you'll figure it out, it's all in this thread.
Most Propeller boards only provide the pull-up resistor on the SDA line.
Mike,
I disagree. I think the norm is for Propeller boards to use pull-ups on both the data and clock lines. I recently looked through some of my Propeller boards to note which boards use a pull-up on the clock and which don't.
I found three boards without pull-ups on both lines.
The Propeller Professional Development board
Propeller Demo Board
Jazzed's TetraProp board (He says leaving off the clock pull-up was an oversight.)
These are the boards with pull-ups on both lines.
Propeller Protoboards
QuickStart boards
GG Propeller Platform
Spinneret
Laser Range Finder
Propeller Backpack
Hydra
Tubular's UN3RB3LLY
Kye's real time clock object assumes there are pull-ups on both lines.
Duane
Just to add to this list, Propeller Mini doesn't have clock pull-up on I2C line.
I wasn't careful enough, some I2C drivers floating on this forum assuming pull-up on the clock line. These won't work with Propeller Mini.
The "Basic_I2C_Driver.spin" does work.
Basically it's how to drive the clock line high, either by releasing it (assuming pull-up) or writing "1" to the pin.
Comments
One last thing, I'd suggest you defer resetting databackup until after the VarBackup call returns. Then guard your button conditions with something like This avoids changes to the data while its being backed up (see note in post #28).
So I do not need any delay between writing variables?
I could have two VarBackup calls back to back without any delay?
I have already finished adding the eeprom backup to my actual program, works great!
I figured out how to backup data nested 2+ cogs deep... so far I have accomplished everything I was hoping to
yay!
Just to add to this list, Propeller Mini doesn't have clock pull-up on I2C line.
I wasn't careful enough, some I2C drivers floating on this forum assuming pull-up on the clock line. These won't work with Propeller Mini.
The "Basic_I2C_Driver.spin" does work.
Basically it's how to drive the clock line high, either by releasing it (assuming pull-up) or writing "1" to the pin.