EEPROM question...

RogerTango

Senior Member
From what I can understand, I can store values in EEPROM, of all things.. using the EEPROM command.

1) Is there a listing of how many free addresses there are for each chip?

2) Are these stored in non-vio mem, so they are there when it powers back up?

Thanks,
Andrew
 

tiscando

Senior Member
See the EEPROM command in picaxe manual 2.

Code:
With the PICAXE-08, 08M, 14M and 18 the data memory is shared with program memory. 
Therefore only unused bytes may be used within a program. 
To establish the length of the program use ‘Check Syntax’ from the PICAXE menu. 
This will report the length of program. Available data addresses can then be used as follows:

PICAXE-08: 0 to (127 - number of used bytes)
PICAXE-08M: 0 to (255 - number of used bytes)
PICAXE-14M / 20M: 0 to (255 - number of used bytes)
PICAXE-18: 0 to (127 - number of used bytes)

With the following microcontrollers the data memory is completely separate
from the program and so no conflicts arise. The number of bytes available 
varies depending on microcontroller type as follows:

PICAXE-28, 28A: 0 to 63
PICAXE-28X, 40X: 0 to 127
PICAXE-18A, 18X, 28X1, 28X2, 40X1, 40X2: 0 to 255
 

hippy

Ex-Staff (retired)
WRITE will put a value into Data Eeprom, READ will get a value from it. EEPROM is a command to pre-load the Data Eeprom when the program is downloaded to the PICAXE; it is effectively a one-time command which executes only as the program is downloaded and is then ignored.

Data Eeprom is non-volatile (non-vio) so whatever is put there will still be there when powered back up.

See above for Data Eeprom sizes. They are usually 128 or 256 bytes addressed as 0 to 127 ( $00 to $7F ) or 0 to 255 ( $00 to $FF ). All of that can be used but some of the PICAXE's have shared code and data memory ( 08, 08M, 14M, 18, 20M ) and the amount of Data Eeprom available for use will depend upon the program's code size.
 
Last edited:

RogerTango

Senior Member
WRITE will put a value into Data Eeprom, READ will get a value from it. EEPROM is a command to pre-load the Data Eeprom when the program is downloaded to the PICAXE<snip>
Thanks, I understand that part much clearer now!

I am still new to the AXE, so you alls help is very much appreciated!

Andrew
 
Top