RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library
4.1.8. Internal EEPROM
You can use the 4096 byte EEPROM that is integrated in the microcontroller, via two
small helper functions. The EEPROM allows to store information in a permanent man-
ner, the information will be kept even after power off.
With
uint8_t readINTEE(uint8_t adr)
a byte can be read from a specific address. Writing a byte to a specific address can be
done with:
void writeINTEE(uint8_t adr, uint8_t data)
The address range includes 4096 bytes i.e. 0 to 4095 are possibles addresses.
CAUTION:
The first 32 bytes are reserved for the settings of the boot-
loader! So please do not overwrite the first 32 bytes (ad-
dresses 0 to 31) by mistake because the settings would be
lost. This area is secured per checksum i.e. the bootloader re-
cognizes wrong data and overwrites it with standard values!
Additional hint:
The EEPROM has a typical life time of several million write cycles.
This is specified more accurately in the data sheet. Therefore the EE-
PROM should only be used to store settings in order to keep the
number of cycles as low as possible (so better don't store a variable
in the EEPROM 10x per second ). It's preferable to store large data
quantities on the SD card.
Tip:
The processor features some more hardware modules that haven't got
any specific functions of their own in the library.
This could be added a later stage but will hardly happen for some quite
specific modules (modulator, comparator,...). As usual you have to
refer to the relevant chapter in the data sheet on your own and write
your own control functions. Generally this makes more sense anyway
because you can match it perfectly to your application.
- 35 -