Component: FAT Dummy (File)
Author | Matrix Ltd. |
Version | 2.7 |
Category | File |
Contents
FAT Dummy component
FAT component allowing access to read and write files on a SD, SDHC or MMC card. The component automatically detects the filesystem on the card on initialise so FAT16 and FAT32 are fully supported.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_File_Dummy.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_File_Dummy.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Reading data from a text file
Example to read a text file from a SD card or from a text file in simulation and display on a 16 x 2 character LCD. The text file needs to be in the same directory as the Flowcode .fcfx project file for the simulation to run correctly.
FAT Read File
File:Test.txt
Console showing current 512 byte sector data
Console showing high level FAT status
Parsing a standard .BMP image file
Example to read a bitmap image file from a SD card or from a bitmap file in simulation and display on a graphical LCD. The bitmapfile needs to be in the same directory as the Flowcode .fcfx project file for the simulation to run correctly.
FAT display Bitmap
Demo bitmap files referenced in the example.
Picture showing a bitmap being displayed on a GLCD component.
Data logger Simple
Example showing how to take a collection of analogue readings and save them into a text based file, the simple way.
FAT data logger simple but slow
Data logger Advanced
Example showing how to take a collection of analogue readings and save them into a text based file, the fast way.
FAT data logger fast
Log Keypad Presses
Example showing how to poll a keypad for key presses. Each key press is shown on an LCD and appended to a log file as an ASCII character using the FAT component.
Keypad Press Log
Streaming Audio Files
Example showing how to steam out .wav audio files from an SD card using a 16-bit @ 16KHz file format. A free program such as Audacity can be used to create or edit the .wav files.
WAV Streaming
Macro reference
AppendByteToFile
![]() |
AppendByteToFile |
![]() |
Data |
![]() |
Return |
AppendStringToFile
![]() |
AppendStringToFile |
![]() |
Data_String |
![]() |
Return |
CloseFile
![]() |
CloseFile |
![]() |
Return |
CreateFile
![]() |
CreateFile |
![]() |
Filename |
![]() |
Return |
DeleteFile
![]() |
DeleteFile |
![]() |
Filename |
![]() |
Return |
MoveToNextFileSector
OpenFile
OpenFolder
![]() |
OpenFolder |
![]() |
Folder_Name |
![]() |
Return |
ReadByteFromFile
ReadByteFromIndex
![]() |
ReadByteFromIndex |
Reads a byte of data from the local sector buffer. Return = Data byte read from the local sector buffer. | |
![]() |
Address |
![]() |
Return |
ReadFileLength
ReadFileSize
![]() |
ReadFileSize |
Reads the entire size of the current file in bytes. | |
![]() |
Return |
WriteByteToBuffer
![]() |
WriteByteToBuffer |
![]() |
Address |
![]() |
Data |
![]() |
Return |
WriteFileSector
![]() |
WriteFileSector |
![]() |
Return |
Property reference
![]() |
Properties |