Difference between revisions of "readEEPROM(which address)"
(Created page with "Returns the 4 byte long value in the specified address. '''Example:''' x = readEEPROM(1024); Gets the value from EEPROM location 1024. As with writeEEPROM, you can read-w...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Returns the 4 byte long value in the specified address. | 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:''' | '''Example:''' | ||
Line 8: | Line 18: | ||
− | As with writeEEPROM, you can read-write from locations 0-8191, though some are reserved by the system. See writeEEPROM for more information. | + | 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. |
Latest revision as of 22:04, 21 September 2014
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.