PE6 #slot & write to data memory

jims

Senior Member
I'm running PE6 using the #slot and trying to write to data memory using the 2 attached programs. Programs load & run okay. Only thing is I can't seem to write to the data memory using #slot. Each program will write to the data memory if I comment out line 28 & run the program using the simulator; I can see the data being written in the data memory panel (must comment out the "run" command since it's not supported in PE6 yet). Any ideas about what's going-on?
Thank you, JimsView attachment test #slot 0.basView attachment test #slot 1.bas
 

tony_g

Senior Member
if you are able to breadboard the circuit and give that a try it should work, you could probably add a sertxd in the code somewhere to give you the variable/data program back to terminal after it has changed between each slot rather than debug as that can slow things down a bit.

a short pause would probably help after the button push to allow for debounce or proper release of the button otherwise it could be so quick in seeing the button state change and by the time you have let go it can register it as another state change and jump back to the slot it just changed over from without giving you a chance to see the different results your looking for in each slot as it runs.

i am using the two program slots on 14m2 and 20m2 on my projects and even when just breadboarding them i was able to see that it does change over slots as it is required based on certain input conditions
 

jims

Senior Member
I'm running PE6 using the #slot and trying to write to data memory using the 2 attached programs. Programs load & run okay. Only thing is I can't seem to write to the data memory using #slot. Each program will write to the data memory if I comment out line 28 & run the program using the simulator; I can see the data being written in the data memory panel (must comment out the "run" command since it's not supported in PE6 yet). Any ideas about what's going-on?
Thank you, JimsView attachment 15579View attachment 15580
I just added read commands after the write commands in each of the 2 #slot programs; & it looks to me as if the data that was written to the data memory comes back with the read command. Appears that the data is written to the data memory , but it doesn't appear in the data memory panel. Make sense?? Jims
 

jims

Senior Member
I just added read commands after the write commands in each of the 2 #slot programs; & it looks to me as if the data that was written to the data memory comes back with the read command. Appears that the data is written to the data memory , but it doesn't appear in the data memory panel. Make sense?? Jims
Question...When using #slot & PE6 on an 18m2; should data written to Data Memory show in the Data Memory Panel? I have bread-boarded and tested and found that I can write to Data Memory in one slot & read it back in another slot, but it doesn't appear in the Data Memory panel. Is there a common Data Memory that's shared by both slots? How should the Data Memory panel work? My goal is to use an IR clicker to input control parameters to the program in one slot & pass them on to a program in the other slot using "non-volatile" Data Memory.Jims
 

hippy

Technical Support
Staff member
There is a single Data / Eeprom memory on a PICAXE which can be accessed from any slot and this data is then available to a program running in any slot.

The data memory panel is working as expected as is simulation of READ and WRITE Commands.

What you are seeing is a lack of data memory persistence when simulating. When you stop one simulation then run another the data memory is zeroed when it starts. This happens whether it is a program in the same slot or in another.

There is currently no means of enabling data memory persistence from one simulation to another. I have raised that as a suggestion for adding to PE6.
 

jims

Senior Member
There is a single Data / Eeprom memory on a PICAXE which can be accessed from any slot and this data is then available to a program running in any slot.

The data memory panel is working as expected as is simulation of READ and WRITE Commands.

What you are seeing is a lack of data memory persistence when simulating. When you stop one simulation then run another the data memory is zeroed when it starts. This happens whether it is a program in the same slot or in another.

There is currently no means of enabling data memory persistence from one simulation to another. I have raised that as a suggestion for adding to PE6.
Thank you Hippy. This info helps me a lot. Jims
 

lbenson

Senior Member
... What you are seeing is a lack of data memory persistence when simulating. When you stop one simulation then run another the data memory is zeroed when it starts. This happens whether it is a program in the same slot or in another.

There is currently no means of enabling data memory persistence from one simulation to another. I have raised that as a suggestion for adding to PE6.
Sorry to resurrect this 4 1/2 year old thread, but it's the only thing I found which (sort of) addressed my question. I would like to run a simulation with multiple slots. All that slot 1 does is put data in the scratchpad. Slot 0 then processes the bytes in the scratchpad.

I can run the slot 1 program and view the data in the scratchpad, but if I then run the slot 0 program, there is no data.

Hippy's post says that he raised a suggestion (about DATA memory)--did anything come of this?
 

hippy

Technical Support
Staff member
I can run the slot 1 program and view the data in the scratchpad, but if I then run the slot 0 program, there is no data.

Hippy's post says that he raised a suggestion (about DATA memory)--did anything come of this?
I don't think so. Your experience and my quick tests suggest there is no persistence of EEPROM data between consecutive simulations.
 
Top