Eeprom read?

tmfkam

Senior Member
If I store some information in the Eeprom is there any way of retrieving it later, other than using a second program within the PicAxe that uses 'Sertxd' to transfer the information from Eeprom to the PC via a terminal window?

My reason for asking is that I would like to include a serial number and version number in the code. This would be written to Eeprom when the program starts, if the version number already in Eeprom differs from the number in code. I've done a similar thing for the equivalent PIC16F1825 (14M2) and 16F1829 (20M2) and in spite of selecting 'code protection on' the data storage Eeprom can be read, even though the program storage returns 'FF' (or '00') for every location.

I know that the program can't be read back, but if the data Eeprom can be read it would be very useful.
 

hippy

Technical Support
Staff member
The only ways I know would be to download a new program with #NO_DATA which did that READ/SERTXD or put it in a PICmicro programmer and read it that way. I think the Eeprom can be read as you describe.

If you were wanting to extract and reveal the serial number, rather than were hoping to keep it secret, you could probably come up with some scheme to monitor the Download Serial In after power-on or reset and switch to a reporting mode or run the main program.
 

westaust55

Moderator
A thought here:
If the PICAXE you are using is currently not using all available program space and also not using the SerialIn pin (after DISCONNECT command) as a digital input, could you do just that and when the SerialIn pin goes high by your program scanning the pin can jump to a subroutine in the originally downloaded program which will read the serial No and version No and SERTXD these to your PC (using the PE or other terminal software).

With such a scheme the serial number and version number might also be stored in Tabke memory (part of the program space) without a need to write the numbers to EEPROM.
http://www.picaxe.com/BASIC-Commands/Variables/table/

If you are expecting a change in version number involving a new download then you must with the new download use the #No_Data directive in your code to prevent over-writing existing EEPROM.

.
 

tmfkam

Senior Member
Thanks for your thoughts. I was hoping to read any info in the way Hippy describes, using my GQ-4X (multi device programmer/reader) as I do with the PIC devices. I'll give it a try next week and see what transpires.
 
Top