readEEPROM(which address)

From pinHeck Wiki
Jump to: navigation, search

Returns the 4 byte long value in the specified address.


The Propeller has a removable EEPROM chip. It is 64K. The first 32K is the A/V program itself, which is copied to the Propeller upon boot.

The second 32K is available to the user. It stores high scores, game settings, etc. It is arranged as 8192 longs (four byte values). This allows a score to be stored in a single location.

A long allows you to store a number between 0-4,294,967,295 (0x00000000 - 0xFFFFFFFF)

The PIC32 can use the EEPROM commands to read/write from the Propeller's EEPROM. The PIC32 has an internal simulated EEPROM but its read-write cycles were too low to be of practical use.


Example:

x = readEEPROM(1024);

Gets the value from EEPROM location 1024.


As with writeEEPROM, you can read-write from locations 0-8191, though some are reserved by the system. See writeEEPROM(which address, what value) for more information.