Difference between revisions of "Component: String Initialiser (Storage)"

From Flowcode Help
Jump to navigationJump to search
 
(4 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
==String Initialiser component==
 
==String Initialiser component==
 
A component allowing an easy way to initialise string variables using ROM memory. A simple and efficient way to populate string variables helping to save on RAM usage. Allows up to 16 strings to be stored. For additional strings simply use more String Initialiser components.
 
A component allowing an easy way to initialise string variables using ROM memory. A simple and efficient way to populate string variables helping to save on RAM usage. Allows up to 16 strings to be stored. For additional strings simply use more String Initialiser components.
 +
 +
==Component Pack==
 +
 +
STORAGE
  
 
==Detailed description==
 
==Detailed description==
  
''No detailed description exists yet for this component''
 
  
==Examples==
 
  
  
''<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;" | '''GetString'''
 
|-
 
| colspan="2" | Gets a string stored in ROM memory and loads into a RAM string variable&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | Range: 0-15 Depending on number of strings&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;" | '''ReadDataByte'''
 
|-
 
| colspan="2" | Reads a single data byte from the specified address.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | PageAddress
 
|-
 
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ByteAddress
 
|-
 
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&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;"
+
''No detailed description exists yet for this component''
|-
+
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
==Examples==
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadUniqueID'''
+
 
|-
+
 
| colspan="2" | Reads the 8-byte unique identifier from the IC. Useful if you need each board to have it's own guarenteed unique address or identifier.&nbsp;
+
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ID
 
|-
 
| colspan="2" | 8-Byte data array to store the unique ID read back from the IC.&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;" | '''WriteDataArray'''
 
|-
 
| colspan="2" | Writes an array of data bytes atarting at the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly. Note that all bytes will be written to the same page.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | PageAddress
 
|-
 
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ByteAddress
 
|-
 
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Count
 
|-
 
| colspan="2" | Number of bytes to write.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| 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;" | '''EraseChip'''
 
|-
 
| colspan="2" | Erases all data stored on the chip. Chip erase takes between 20 seconds and 100 seconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Blocking
 
|-
 
| colspan="2" | Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait&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;" | '''WriteDataByte'''
 
|-
 
| colspan="2" | Writes a single data byte to the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | PageAddress
 
|-
 
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ByteAddress
 
|-
 
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Data
 
|-
 
| colspan="2" | Data byte to write&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;" | '''EraseBlock'''
 
|-
 
| colspan="2" | Erases a block of data stored on the chip. Erase takes between 45 milliseconds and 2000 milliseconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | EraseMode
 
|-
 
| colspan="2" | 0=4KB / 1=32KB / 2=64KB&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | PageAddress
 
|-
 
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Blocking
 
|-
 
| colspan="2" | Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait&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''
 
|}
 
  
 +
''<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;" | '''ReadDataArray'''
 
|-
 
| colspan="2" | Reads up to 256 data bytes starting from the specified address. Note that all bytes will be read from the same page.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | PageAddress
 
|-
 
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ByteAddress
 
|-
 
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Count
 
|-
 
| colspan="2" | Number of bytes to read.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Data
 
|-
 
| colspan="2" | Byta array to store the incoming read data.&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''
 
|}
 
  
 +
==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;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetString'''
 
|-
 
|-
| colspan="2" | Initialises the SPI bus ready for communications.&nbsp;
+
| colspan="2" | Gets a string stored in ROM memory and loads into a RAM string variable&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Index
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Range: 0-15 Depending on number of strings&nbsp;
| 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-string-icon.png]] - STRING
|-
 
|-
 
| 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 276: Line 93:
 
|-
 
|-
 
| colspan="2" | String data index 1&nbsp;
 
| colspan="2" | String data index 1&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 Ltd
Version 1.0
Category Storage


String Initialiser component

A component allowing an easy way to initialise string variables using ROM memory. A simple and efficient way to populate string variables helping to save on RAM usage. Allows up to 16 strings to be stored. For additional strings simply use more String Initialiser components.

Component Pack

STORAGE

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png GetString
Gets a string stored in ROM memory and loads into a RAM string variable 
Fc9-u8-icon.png - BYTE Index
Range: 0-15 Depending on number of strings 
Fc9-string-icon.png - STRING Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Number of Strings
 
Fc9-type-10-icon.png String 0
String data index 0 
Fc9-type-10-icon.png String 1
String data index 1