Teensy 2.0 EEPROM default?

Status
Not open for further replies.

BReeves

Well-known member
I need to determine if the EEPROM on the Teensy 2.0 has been programmed or not. If I read a random address on a virgin Teensy 2.0 I get 255. Can I assume if I haven't written to that address yet it will always return 255?
 
Yes, 255 is the unprogrammed state.

But you can't tell the difference between never-before-programmed EEPROM and the case where it's been used but simply written back to 255.
 
Thanks, doesn't really matter if it's been programmed before in this case, just want ro check to make sure the EEPROM has the values stored the program can save before it reads the EEPROM on startup. Probably could store some number to a specific location when any data is saved and have the program look for that number. Looking for 255 in a location the program uses is easier.
 
Status
Not open for further replies.
Back
Top