Component: Embed File (Storage)

From Flowcode Help
Revision as of 17:24, 9 November 2022 by Wiki bot (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
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.

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. FC6 Icon.png 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 Icon.png 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.

EmbedFile.jpg


Downloadable macro reference

Fc9-comp-macro.png GetFileByte
Reads a single byte from the file at the specified address. 
Fc9-u16-icon.png - UINT Address
Address range 0 to NumBytesInFile - 1 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png GetFileLength
Returns the file size in bytes. 
Fc9-u16-icon.png - UINT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-13-icon.png File
File you wish to embed into the program 
Fc9-type-21-icon.png File Length
File size in bytes. Max recommended file size = 65535 bytes 8-bit PICs may struggle with files larger than 256 bytes. 
Fc9-type-21-icon.png ROM Size
Number of bytes available in the target device ROM memory