Difference between revisions of "Component: Flash EEPROM (Storage)"

From Flowcode Help
Jump to navigationJump to search
 
(4 intermediate revisions by the same user not shown)
Line 15: Line 15:
 
Provides an emulated version of EEPROM using the microcontrollers on-board flash program memory. Requires a microcontroller with write and erase access to the flash memory.
 
Provides an emulated version of EEPROM using the microcontrollers on-board flash program memory. Requires a microcontroller with write and erase access to the flash memory.
  
==Detailed description==
+
==Component Pack==
  
''No detailed description exists yet for this component''
+
FREE
  
==Examples==
+
==Detailed description==
  
  
''<span style="color:red;">No additional examples</span>''
 
  
  
==Downloadable macro reference==
 
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read'''
 
|-
 
| colspan="2" | Reads a single value from the Flash EEPROM at the specified address&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Address
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Write'''
 
|-
 
| colspan="2" | Writes a single value to the Flash EEPROM at the specified address&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Address
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
 
| width="90%" | Data
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetByteArray'''
 
|-
 
| colspan="2" | Writes an array of bytes to the EE memory.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Address
 
|-
 
| colspan="2" | Starting address of the first value to write&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Data
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Count
 
|-
 
| colspan="2" | Number of bytes to write to the EE memory, Range: 1 to 128 bytes&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
''No detailed description exists yet for this component''
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetInt'''
 
|-
 
| colspan="2" | Writes a 16-bit value to the EE memory. For consecutive 16-bit values the address must be incremented by 2.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Address
 
|-
 
| colspan="2" | Address of the value to write&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Value
 
|-
 
| colspan="2" | 16-bit value to write&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | MSBFirst
 
|-
 
| colspan="2" | 0: LSB is the first byte, 1: MSB is the first byte&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
 +
==Examples==
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddressSpecificDevice'''
 
|-
 
| colspan="2" | Starts a temperature conversion on a specific device using a hex string identifier. SerialNumber parameter should be 12 characters and contain the 48-bit Serial.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | SerialNumber
 
|-
 
| colspan="2" | 48-bit Serial Number e.g. "32DF4A3C1901"&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSerialString'''
 
|-
 
| colspan="2" | Gets the Serial String for the current addressed device.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddressNextDevice'''
 
|-
 
| colspan="2" | Scans for the next connected device with a matching family code. Goes through the device list generated by the ScanBus macro.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLong'''
 
|-
 
| colspan="2" | Writes a 32-bit value to the EE memory. For consecutive 32-bit values the address must be incremented by 4.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Address
 
|-
 
| colspan="2" | Address of the value to write&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
 
| width="90%" | Value
 
|-
 
| colspan="2" | 32-bit value to write&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | MSBFirst
 
|-
 
| colspan="2" | 0: LSB is the first byte, 1: MSB is the first byte&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetFloat'''
 
|-
 
| colspan="2" | Reads a 32-bit floating point value starting from the specified byte address. For consecutive float values the address must be incremented by 4.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Address
 
|-
 
| colspan="2" | The starting byte address&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | MSBFirst
 
|-
 
| colspan="2" | 0: LSB is the first byte, 1: MSB is the first byte&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLong'''
 
|-
 
| colspan="2" | Reads a 32-bit value starting from the specified byte address. For consecutive 32-bit values the address must be incremented by 4.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Address
 
|-
 
| colspan="2" | The starting byte address&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | MSBFirst
 
|-
 
| colspan="2" | 0: LSB is the first byte, 1: MSB is the first byte&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
 +
''<span style="color:red;">No additional examples</span>''
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetInt'''
 
|-
 
| colspan="2" | Reads a 16-bit value starting from the specified byte address. For consecutive 16-bit values the address must be incremented by 2.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Address
 
|-
 
| colspan="2" | The starting byte address&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | MSBFirst
 
|-
 
| colspan="2" | 0: LSB is the first byte, 1: MSB is the first byte&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
  
 +
==Downloadable macro reference==
  
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetByteArray'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read'''
 
|-
 
|-
| colspan="2" | Reads an array of bytes starting from the selected address.&nbsp;
+
| colspan="2" | Reads a single value from the Flash EEPROM at the specified address&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 276: Line 62:
 
| width="90%" | Address
 
| width="90%" | Address
 
|-
 
|-
| colspan="2" | Starting address of the first value to read&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Data
 
|-
 
| colspan="2" | Byte array to store incoming data&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Count
 
|-
 
| colspan="2" | Number of bytes to read from the EE memory, Range: 1 to 128 bytes&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
Line 296: Line 72:
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetByte'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Write'''
 
|-
 
|-
| colspan="2" | Writes a single byte to the EE memory.&nbsp;
+
| colspan="2" | Writes a single value to the Flash EEPROM at the specified address&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 304: Line 80:
 
| width="90%" | Address
 
| width="90%" | Address
 
|-
 
|-
| colspan="2" | Address of the value to write&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
 
| width="90%" | Data
 
| width="90%" | Data
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetByte'''
 
|-
 
| colspan="2" | Reads a single byte from the selected address.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Address
 
|-
 
| colspan="2" | Address of the value to read&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFloat'''
 
|-
 
| colspan="2" | Writes a 32-bit floating point value to the EE memory. For consecutive float values the address must be incremented by 4.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Address
 
|-
 
| colspan="2" | Address of the value to write&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Value
 
|-
 
| colspan="2" | Floating point value to write&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | MSBFirst
 
|-
 
| colspan="2" | 0: LSB is the first byte, 1: MSB is the first byte&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
| colspan="2" | Configures each matching sensor on the bus with the specified conversion bits.&nbsp;
 
|-
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 419: Line 136:
 
|-
 
|-
 
| colspan="2" | Number of bits that can be stored or retreived using a single flash address&nbsp;
 
| colspan="2" | Number of bits that can be stored or retreived using a single flash address&nbsp;
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
|-
 
 
|}
 
|}

Latest revision as of 17:24, 9 November 2022

Author Matrix TSL
Version 1.0
Category Storage


Flash EEPROM component

Provides an emulated version of EEPROM using the microcontrollers on-board flash program memory. Requires a microcontroller with write and erase access to the flash memory.

Component Pack

FREE

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png Read
Reads a single value from the Flash EEPROM at the specified address 
Fc9-u16-icon.png - UINT Address
 
Fc9-u32-icon.png - ULONG Return


Fc9-comp-macro.png Write
Writes a single value to the Flash EEPROM at the specified address 
Fc9-u16-icon.png - UINT Address
 
Fc9-u32-icon.png - ULONG Data
 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-7-icon.png Enabled
Is the Flash EEPROM component currently supported on the selected MCU device? 
Fc9-type-16-icon.png Number Of Values
Number of individual values that can be read and written using the component. The more values you want the bigger the RAM buffer required to store the data when performing a write.  
Fc9-type-16-icon.png Flash Page
Flash Page to use as EEPROM 
Fc9-type-21-icon.png Flash Address
 
Fc9-type-10-icon.png Initialiser
 
Fc9-type-21-icon.png Bits Per Value
Number of bits available when initialising the Flash memory. 
Fc9-type-21-icon.png Bits Per Instruction
Number of bits that can be stored or retreived using a single flash address