Difference between revisions of "Component: EEPROM (Storage)"
(XML import of component documentation) |
(XML import) |
||
(21 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
|- | |- | ||
| width="20%" style="color: gray;" | Author | | width="20%" style="color: gray;" | Author | ||
− | | | + | | Matrix Ltd |
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color: gray;" | Version | ||
− | | 1. | + | | 1.1 (Release) |
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color: gray;" | Category | ||
Line 16: | Line 16: | ||
==[[File:Component Icon dcbf571f_a6fa_402d_bdd4_be00cca4070f.png|Image]] EEPROM component== | ==[[File:Component Icon dcbf571f_a6fa_402d_bdd4_be00cca4070f.png|Image]] EEPROM component== | ||
− | + | A means of reading data from and writing data to the EEPROM memory onboard the microcontroller. | |
+ | Fully functional with simulation but the target microcontroller must have EEPROM memory available to allow compilation to work. | ||
==Examples== | ==Examples== | ||
− | + | Reads a value from location 0 in the EEPROM and writes back the value incremented by one, the values are displayed on to a LCD. | |
+ | Starting and stopping the simulation or resetting the microcontroller will allow the program to resume counting from where it left off as opposed to a standard RAM based variable which would reset to an undetermined value. | ||
+ | {{Fcfile|EEPROM.fcfx|EEPROM}} | ||
+ | Example showing how to store and retrieve strings to and from the EEPROM memory. | ||
+ | {{Fcfile|StringEE.fcfx|EEStrings}} | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
Line 49: | Line 54: | ||
:[[Variable Types|UINT]] ''Address'' | :[[Variable Types|UINT]] ''Address'' | ||
− | ::The address, in elements, to | + | ::The address, in elements, to write the data to |
:[[Variable Types|UINT]] ''Value'' | :[[Variable Types|UINT]] ''Value'' | ||
Line 67: | Line 72: | ||
==Property reference== | ==Property reference== | ||
− | ''This | + | <span style="font-weight: normal;"><u>EE Size</u></span> |
+ | |||
+ | This property is of type ''Line of text'' and can be referenced with the variable name ''EESize''. | ||
+ | |||
+ | Number of memory locations available in EEPROM onboard the target microcontroller. | ||
+ | |||
+ | <span style="font-weight: normal;"><u>EE Bit Depth</u></span> | ||
+ | |||
+ | This property is of type ''Line of text'' and can be referenced with the variable name ''EEbitdepth''. | ||
+ | |||
+ | Number of bits in each EEPROM memory location onboard the target microcontroller. | ||
+ | |||
+ | <span style="font-weight: normal;"><u>Initial Values</u></span> | ||
+ | |||
+ | This property is of type ''Line of text'' and can be referenced with the variable name ''InitialValues''. | ||
+ | |||
+ | Comma seperated list of values to assign to the EEPROM memory while programming the device. | ||
+ | |||
+ | The simulation will automatically load these values into the simulated EE locations on simulation start. | ||
+ | |||
+ | Leave blank to remove initialisation code from the compiled C code | ||
+ | |||
+ | Supported Formats | ||
+ | |||
+ | Decimal 0 - 255 | ||
+ | |||
+ | Hexadecimal 0x00 - 0xFF | ||
+ | |||
+ | ASCII character 'x' | ||
+ | |||
+ | Strings "text" |
Latest revision as of 12:12, 21 July 2016
Author | Matrix Ltd |
Version | 1.1 (Release) |
Category | Storage |
Contents
EEPROM component
A means of reading data from and writing data to the EEPROM memory onboard the microcontroller. Fully functional with simulation but the target microcontroller must have EEPROM memory available to allow compilation to work.
Examples
Reads a value from location 0 in the EEPROM and writes back the value incremented by one, the values are displayed on to a LCD.
Starting and stopping the simulation or resetting the microcontroller will allow the program to resume counting from where it left off as opposed to a standard RAM based variable which would reset to an undetermined value. EEPROM Example showing how to store and retrieve strings to and from the EEPROM memory. EEStrings
Downloadable macro reference
Read
Reads a packet of bits from the EEPROM
The number of bits read is 8 or 16, depending on the platform
Parameters
- UINT Address
- The address, in elements, to read the data from
Return value
Write
Writes a packet of bits from the EEPROM
The number of bits written is 8 or 16, depending on the platform
Parameters
- UINT Address
- The address, in elements, to write the data to
- UINT Value
- The 8 or 16 bit value to store in EEPROM
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
EE Size
This property is of type Line of text and can be referenced with the variable name EESize.
Number of memory locations available in EEPROM onboard the target microcontroller.
EE Bit Depth
This property is of type Line of text and can be referenced with the variable name EEbitdepth.
Number of bits in each EEPROM memory location onboard the target microcontroller.
Initial Values
This property is of type Line of text and can be referenced with the variable name InitialValues.
Comma seperated list of values to assign to the EEPROM memory while programming the device.
The simulation will automatically load these values into the simulated EE locations on simulation start.
Leave blank to remove initialisation code from the compiled C code
Supported Formats
Decimal 0 - 255
Hexadecimal 0x00 - 0xFF
ASCII character 'x'
Strings "text"