Difference between revisions of "Component: EEPROM (Storage)"
(XML import BR) |
|||
Line 30: | Line 30: | ||
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. | 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}} | {{Fcfile|EEPROM.fcfx|EEPROM}} | ||
− | |||
− | |||
===Read and Write Ints=== | ===Read and Write Ints=== | ||
Line 39: | Line 36: | ||
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. | 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_INT.fcfx|EEPROM_INT}} | {{Fcfile|EEPROM_INT.fcfx|EEPROM_INT}} | ||
− | |||
− | |||
===String variables in EE Memory=== | ===String variables in EE Memory=== | ||
Example showing how to store and retrieve strings to and from the EEPROM memory. | Example showing how to store and retrieve strings to and from the EEPROM memory. | ||
− | |||
{{Fcfile|StringEE.fcfx|EEStrings}} | {{Fcfile|StringEE.fcfx|EEStrings}} | ||
− | |||
==Downloadable macro reference== | ==Downloadable macro reference== |
Revision as of 15:46, 16 February 2017
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
The Console window can be used to show the contents of EE memory during simulation.
Read and Write Bytes
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
Read and Write Ints
Reads a value from locations 0,1 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_INT
String variables in EE Memory
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"