Author
|
Matrix TSL
|
Version
|
1.0
|
Category
|
Storage
|
Embed File component
A component to simplify the process of embedding files into ROM. Stores the file inside a ROM look up table.
Detailed description
No detailed description exists yet for this component
Examples
Basic example program which embeds a text file into the microcontrollers ROM memory and then prints the file out to a LCD display.
EmbedFileExample
Text file to go with the example, must be placed into the same directory as the Flowcode file.
File:TextFile.txt
Here is an archive which packages the example and text file together for you.
Embed File Example Files
The file is selected using the File component property.
Clicking the small arrow to the right of the property and selecting Browse allows you to select a file using a Windows file explorer.
Downloadable macro reference
|
GetFileByte
|
Reads a single byte from the file at the specified address.
|
- UINT
|
Address
|
Address range 0 to NumBytesInFile - 1
|
- BYTE
|
Return
|
|
GetFileLength
|
Returns the file size in bytes.
|
- UINT
|
Return
|
|
SetByteArray
|
Writes an array of bytes to the EE memory.
|
- UINT
|
Address
|
Starting address of the first value to write
|
- BYTE
|
Data
|
|
- BYTE
|
Count
|
Number of bytes to write to the EE memory, Range: 1 to 128 bytes
|
- VOID
|
Return
|
|
SetInt
|
Writes a 16-bit value to the EE memory. For consecutive 16-bit values the address must be incremented by 2.
|
- UINT
|
Address
|
Address of the value to write
|
- UINT
|
Value
|
16-bit value to write
|
[[File:]] -
|
MSBFirst
|
0: LSB is the first byte, 1: MSB is the first byte
|
- VOID
|
Return
|
|
AddressSpecificDevice
|
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.
|
- STRING
|
SerialNumber
|
48-bit Serial Number e.g. "32DF4A3C1901"
|
- VOID
|
Return
|
|
GetSerialString
|
Gets the Serial String for the current addressed device.
|
- STRING
|
Return
|
|
AddressNextDevice
|
Scans for the next connected device with a matching family code. Goes through the device list generated by the ScanBus macro.
|
- VOID
|
Return
|
|
SetLong
|
Writes a 32-bit value to the EE memory. For consecutive 32-bit values the address must be incremented by 4.
|
- UINT
|
Address
|
Address of the value to write
|
- ULONG
|
Value
|
32-bit value to write
|
[[File:]] -
|
MSBFirst
|
0: LSB is the first byte, 1: MSB is the first byte
|
- VOID
|
Return
|
|
GetFloat
|
Reads a 32-bit floating point value starting from the specified byte address. For consecutive float values the address must be incremented by 4.
|
[[File:]] -
|
Address
|
The starting byte address
|
[[File:]] -
|
MSBFirst
|
0: LSB is the first byte, 1: MSB is the first byte
|
[[File:]] -
|
Return
|
|
GetLong
|
Reads a 32-bit value starting from the specified byte address. For consecutive 32-bit values the address must be incremented by 4.
|
[[File:]] -
|
Address
|
The starting byte address
|
[[File:]] -
|
MSBFirst
|
0: LSB is the first byte, 1: MSB is the first byte
|
- ULONG
|
Return
|
|
GetInt
|
Reads a 16-bit value starting from the specified byte address. For consecutive 16-bit values the address must be incremented by 2.
|
[[File:]] -
|
Address
|
The starting byte address
|
[[File:]] -
|
MSBFirst
|
0: LSB is the first byte, 1: MSB is the first byte
|
- UINT
|
Return
|
|
GetByteArray
|
Reads an array of bytes starting from the selected address.
|
- UINT
|
Address
|
Starting address of the first value to read
|
- BYTE
|
Data
|
Byte array to store incoming data
|
- UINT
|
Count
|
Number of bytes to read from the EE memory, Range: 1 to 128 bytes
|
- VOID
|
Return
|
|
SetByte
|
Writes a single byte to the EE memory.
|
- UINT
|
Address
|
Address of the value to write
|
- BYTE
|
Data
|
|
- VOID
|
Return
|
|
GetByte
|
Reads a single byte from the selected address.
|
- UINT
|
Address
|
Address of the value to read
|
- BYTE
|
Return
|
|
SetFloat
|
Writes a 32-bit floating point value to the EE memory. For consecutive float values the address must be incremented by 4.
|
- UINT
|
Address
|
Address of the value to write
|
[[File:]] -
|
Value
|
Floating point value to write
|
[[File:]] -
|
MSBFirst
|
0: LSB is the first byte, 1: MSB is the first byte
|
- VOID
|
Return
|
|
Initialise
|
Configures each matching sensor on the bus with the specified conversion bits.
|
- VOID
|
Return
|
|
SendBinaryFloat
|
Sends out a 32-bit binary floating point value split across four bytes.
|
[[File:]] -
|
Value
|
|
[[File:]] -
|
MSBfirst
|
0=Least significant byte first, 1=Most significant byte first
|
- VOID
|
Return
|
|
GetProp
|
Allows the property filter for the COM port list to be copied to a parent component.
|
- STRING
|
PropName
|
|
- STRING
|
Return
|
|
ReceiveByteArray
|
Attempts to receive an array of bytes using the COM port Returns the number of bytes received.
|
- BYTE
|
Data
|
|
- UINT
|
MaxLength
|
Max number of bytes to try and read
|
- UINT
|
Timeout
|
Time to wait for incoming data in milliseconds
|
- UINT
|
Return
|
|
ReceiveString
|
Attempts to receive an string using the COM port Returns the number of bytes received.
|
- UINT
|
Timeout
|
Time to wait for incoming data in milliseconds
|
- UINT
|
MaxLength
|
Max number of bytes to try and read
|
- STRING
|
Return
|
|
PWMEnable
|
Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD
|
- BYTE
|
EnableMask
|
Range 0-63 or 0b00000 to 0b111111
|
- VOID
|
Return
|
|
Initialise
|
|
- VOID
|
Return
|
|
GetProp
|
Allows the property filter for the COM port list to be copied to a parent component.
|
- STRING
|
PropName
|
|
- STRING
|
Return
|
Property reference
|
Properties
|
|
File
|
File you wish to embed into the program
|
|
File Length
|
File size in bytes. Max recommended file size = 65535 bytes 8-bit PICs may struggle with files larger than 256 bytes.
|
|
ROM Size
|
Number of bytes available in the target device ROM memory
|
|
Connections
|
|
Simulations
|