November 23, 2024, 05:04:07 AM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


EEPROM Usage and initialization

Started by BigRez, April 14, 2009, 04:17:22 PM

Previous topic - Next topic

BigRez

Hi All -

The EEPROM area always shows it's initialized with zeros when I start the editor.  Does that mean when the program is transferred to the Prop-1 the EEPROM area will also be "initialized"?  (I think the answer is yes.) 

I believe I understood that what's in EEPROM will survive a power cycle until changed by the program or another load.  Correct?

So, if I have data in the EEPROM area (a few bytes) and want to retain that info but need to modify the program, is that possible to do?

Thanks,

mike

JonnyMac

Mike,

With the Prop-1 the entire 256-byte image is downloaded, there is no way to preserve EEPROM space between program downloads (you can with the Prop-2, though I don't remember how at the moment).  Can you create a two-part program that behaves one way and with the flip of a switch behaves another way?
Jon McPhalen
EFX-TEK Hollywood Office

BigRez

The two-part program could work.  I don't have a need for it yet but was wondering if it could be done.

What about having a section of code that is executed when a button is pressed and that code displays some debug statements to print the needed values.  Are the debug statements printed when the switch is in position 2 and what if the serial port is not connected while the program is running - can it be connected or will it harm something?

JonnyMac

That will be fine.  Here's the funny thing about the BS1 DEBUG function: your strings are not stored inside the BS1.  The reason for this is that there is only 256 bytes of memory and DEBUG strings would chew through this in a big hurry.  So for the BS1, the editor stores the strings in a table and when a DEBUG instruction happens it sends a pointer to the position in the program (which the editor uses to get the correct string) and the state of all variables (even if you're only displaying one).

Again, you can use DEBUG without a serial port hooked up -- just don't expect to reconnect and see values without downloading.
Jon McPhalen
EFX-TEK Hollywood Office