Difference between revisions of "Component: Embed File (Storage)"
From Flowcode Help
Jump to navigationJump to search(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {| style="width:50%" | |
− | |||
− | {| | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| Matrix TSL | | Matrix TSL | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
− | | 1.0 | + | | 1.0 |
|- | |- | ||
− | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| Storage | | Storage | ||
|} | |} | ||
+ | ==Embed File component== | ||
+ | A component to simplify the process of embedding files into ROM. Stores the file inside a ROM look up table. | ||
− | == | + | ==Component Pack== |
− | |||
− | |||
− | + | STORAGE | |
− | + | ==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. | ||
+ | {{Fcfile|EmbedFileExample.fcfx|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. | ||
− | + | {{Zip|EmbedFile.zip|Embed File Example Files}} | |
− | |||
− | |||
− | File | + | 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. | |
− | + | [[File:EmbedFile.jpg]] | |
− | |||
− | + | ==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;" | '''GetFileByte''' | ||
+ | |- | ||
+ | | colspan="2" | Reads a single byte from the file at the specified address. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Address | ||
+ | |- | ||
+ | | colspan="2" | Address range 0 to NumBytesInFile - 1 | ||
+ | |- | ||
+ | | 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;" | '''GetFileLength''' | ||
+ | |- | ||
+ | | colspan="2" | Returns the file size in bytes. | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
− | |||
− | |||
− | + | ==Property reference== | |
− | Number of bytes available in the target device ROM memory | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-13-icon.png]] | ||
+ | | width="90%" | File | ||
+ | |- | ||
+ | | colspan="2" | File you wish to embed into the program | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | File Length | ||
+ | |- | ||
+ | | colspan="2" | File size in bytes. Max recommended file size = 65535 bytes 8-bit PICs may struggle with files larger than 256 bytes. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | ROM Size | ||
+ | |- | ||
+ | | colspan="2" | Number of bytes available in the target device ROM memory | ||
+ | |} |
Latest revision as of 17:24, 9 November 2022
Author | Matrix TSL |
Version | 1.0 |
Category | Storage |
Contents
Embed File component
A component to simplify the process of embedding files into ROM. Stores the file inside a ROM look up table.
Component Pack
STORAGE
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.
Here is an archive which packages the example and text file together for you.
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. | |
![]() |
Address |
Address range 0 to NumBytesInFile - 1 | |
![]() |
Return |
![]() |
GetFileLength |
Returns the file size in bytes. | |
![]() |
Return |