On board EEPROM addressing

fastgrandad

New Member
This should be ridiculously simple but I'm clearly not getting something!

I want to load some default data when initially loading the program but be able to change settings during normal operation that are then retained when switching off and back on again. Otherwise I could have just said let b0 = %00100000 early in the program.

Having failed to get it to work in the full program I wrote a very brief test routine and that doesn't work either.
b0 holds a number of preset states, represented by 0 or 1 in each bit, 0 to 7

#picaxe 20M2
eeprom 6, (%00100000)
main:
debug
read 6 (b0)
pause 5000
end

I was expecting debug to show bits 0 to 7 replicating the eeprom preload

Any ideas?
Thanks
Paul
 

fastgrandad

New Member
Apologies, my mistake when writing the post. It is correct in the program.
Cut and paste below

Eeprom 6, (%00100000)
Pause 2000
main:
Debug
Read 6, b0
Pause 5000
'End

Hopefully it's something just as simple

Paul
 
Top