Jump to content

Component: FTDI (FT800) (FT800) (Misc): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(19 intermediate revisions by 2 users not shown)
Line 14: Line 14:
==FTDI (FT800) component==
==FTDI (FT800) component==
The FT800 provides a powerful feature set in a small package to create dynamic HMI interfaces. The device supports line by line graphics rendering to 1/16 of a pixel on displays with resolution up to 512 x 512 with 262K colours. The chip includes a touch controller for sensing touch feedback from a TFT display with a resistive touch panel as well as a sound synthesizer and audio playback with a PWM output to drive a speaker.
The FT800 provides a powerful feature set in a small package to create dynamic HMI interfaces. The device supports line by line graphics rendering to 1/16 of a pixel on displays with resolution up to 512 x 512 with 262K colours. The chip includes a touch controller for sensing touch feedback from a TFT display with a resistive touch panel as well as a sound synthesizer and audio playback with a PWM output to drive a speaker.
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_FTDI-FT800.fcfx FC_Comp_Source_FTDI-FT800.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_FTDI-FT800.fcfx FC_Comp_Source_FTDI-FT800.fcfx]


==Detailed description==
==Detailed description==




Line 25: Line 51:




''<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;" | '''IncrementCommandOffset'''
|-
| colspan="2" | Adds commandSize to the currentOffset. Checks for 4K ring-buffer offset roll-over  &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | currentOffset
|-
| colspan="2" | graphics processor command list pointer&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | commandSize
|-
| colspan="2" | number of bytes to increment the offset&nbsp;
|-
| 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''
|}




{| 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;" | '''MemRead16'''
|-
| colspan="2" | Reads a single unsigned int from the FT800 internal address space&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
| 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''
|}




{| 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;" | '''MemRead8'''
|-
| colspan="2" | Reads a single data byte from the FT800 internal address space&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Address
|-
| colspan="2" | &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;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MemRead32'''
|-
| colspan="2" | Reads a single unsigned long from the FT800 internal address space&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| 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;" | '''MemWrite16'''
|-
| colspan="2" | Writes a unsigned int value to the FT800 internal address space&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| 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;" | '''MemWrite8'''
|-
| colspan="2" | Writes a byte value to the FT800 internal address space&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Address
|-
| colspan="2" | &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;"
 
 
 
 
 
 
''<span style="color:red;">No additional examples</span>''
 
 
 
 
 
 
 
 
 
 
 
==Macro reference==
 
===CommandWrite===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CommandWrite'''
| width="90%" class="mtx-class-macrohead" | '''CommandWrite'''
|-
|-
| colspan="2" | Sends FT800 command&nbsp;
| colspan="2" | Sends FT800 command&nbsp;
Line 170: Line 104:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===IncrementCommandOffset===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MemWrite32'''
| width="90%" class="mtx-class-macrohead" | '''IncrementCommandOffset'''
|-
|-
| colspan="2" | Writes a unsigned long value to the FT800 internal address space&nbsp;
| colspan="2" | Adds commandSize to the currentOffset. Checks for 4K ring-buffer offset roll-over  &nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Address
| width="90%" | currentOffset
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | graphics processor command list pointer&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
| width="90%" | commandSize
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | number of bytes to increment the offset&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Initialise===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | System initialization routines.  Executed once on reset. Returns 0 if device not detected or 1 if device is correctly initialised.&nbsp;
| colspan="2" | System initialization routines.  Executed once on reset. Returns 0 if device not detected or 1 if device is correctly initialised.&nbsp;
Line 206: Line 142:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MemRead16===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadFileLength'''
| width="90%" class="mtx-class-macrohead" | '''MemRead16'''
|-
|-
| colspan="2" | Returns the number of bytes in the current sector that are used by the current open file. Return = 512 - Sector is filled with file data Return < 512 - Last sector of the file, Retval specifies how many bytes of data are remaining in the sector&nbsp;
| colspan="2" | Reads a single unsigned int from the FT800 internal address space&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Address
|}
 
 
{| 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;" | '''OpenFile'''
|-
| colspan="2" | Searches for and opens a file for reading or writing from within the current directory on the disk. Returns 0 for success.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Filename
|-
| colspan="2" | 8.3 filename of the file we are trying to open e.g. "file.txt"&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;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteFileSector'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MemRead32===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AppendStringToFile'''
| width="90%" class="mtx-class-macrohead" | '''MemRead32'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Reads a single unsigned long from the FT800 internal address space&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Data_String
| width="90%" | Address
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &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;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadFileSize'''
|-
| colspan="2" | Reads the entire size of the current file in bytes.&nbsp;
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
Line 281: Line 180:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MemRead8===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadFileLength'''
| width="90%" class="mtx-class-macrohead" | '''MemRead8'''
|-
|-
| colspan="2" | Returns the number of bytes in the current sector that are used by the current open file. Return = 512 - Sector is filled with file data Return < 512 - Last sector of the file, Retval specifies how many bytes of data are remaining in the sector&nbsp;
| colspan="2" | Reads a single data byte from the FT800 internal address space&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -  
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Address
|}
 
 
{| 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" | &nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OpenFile'''
|-
| colspan="2" | Searches for and opens a file for reading or writing from within the current directory on the disk. Returns 0 for success.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Filename
|-
| colspan="2" | 8.3 filename of the file we are trying to open e.g. "file.txt"&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 312: Line 199:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MemWrite16===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteFileSector'''
| width="90%" class="mtx-class-macrohead" | '''MemWrite16'''
|-
|-
| colspan="2" | Overwrites the current sector on the memory card with the contents of the local sector buffer. See write_byte_to_buffer function. Return = 0 - File sector written successfully. Return > 0 - File sector write error&nbsp;
| colspan="2" | Writes a unsigned int value to the FT800 internal address space&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Address
|}
 
 
{| 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" | &nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFileIndex'''
|-
|-
| colspan="2" | Sets the current file index and used to switch between several open file streams. Default = 0. &nbsp;
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Data
|-
|-
|-
| colspan="2" | &nbsp;
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | File_Index
|-
| colspan="2" | File index ranges from 0 to (Max Concurrent Files - 1)&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 343: Line 223:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MemWrite32===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AppendStringToFile'''
| width="90%" class="mtx-class-macrohead" | '''MemWrite32'''
|-
|-
| colspan="2" | Adds the contents of the data string parameter to the end of the currently open file. Returns 0 for success.&nbsp;
| colspan="2" | Writes a unsigned long value to the FT800 internal address space&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Data_String
| width="90%" | Address
|-
| colspan="2" | Data to append to the end of the file&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;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetByte'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Int
| width="90%" | Data
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Ix
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 389: Line 247:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MemWrite8===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadFileSize'''
| width="90%" class="mtx-class-macrohead" | '''MemWrite8'''
|-
|-
| colspan="2" | Reads the entire size of the current file in bytes.&nbsp;
| colspan="2" | Writes a byte value to the FT800 internal address space&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| 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;" | '''GetByte'''
|-
| colspan="2" | Gets a byte from an int&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Int
| width="90%" | Address
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Ix
| width="90%" | Data
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &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;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTimeAndDate'''
|-
| colspan="2" | Sets the current time and date.  Time = (Hour << 11) + (Min << 5) + (Sec >> 1) Date = (YearFrom1980 << 9) + (Month << 5) + (Day) Additional details can be found here: http://www.maverick-os.dk/FileSystemFormats/FAT16_FileSystem.html#TimeFormat&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Time
|-
| colspan="2" | Sets the current Time in FAT Time format hhhhhmmmmmmsssss - S=Secs/2&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Date
|-
| colspan="2" | Sets the current Date in FAT Date format yyyyyyymmmmddddd - Y=Years since 1980&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 448: Line 271:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
==Property reference==
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
|-
| colspan="2" | Attempts to communicate with the SD card and if successful sets up the file system. Returns 0 for success. &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;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
| colspan="2" | Must be called before any other CAN component macros to enable and initialise the CAN peripheral. &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''
|}
==Property reference==
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| width="90%" class="mtx-class-propfolder" | SPI Properties
|-
|-
|-
|-
Line 508: Line 307:
|-
|-
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master.&nbsp;
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master.&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Pin Connections
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
Line 518: Line 321:
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Display Properties
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Line 584: Line 391:
| colspan="2" | Define active edge of PCLK &nbsp;
| colspan="2" | Define active edge of PCLK &nbsp;
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
| 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 14:37, 13 July 2026

Author MatrixTSL
Version 2.0
Category Misc


FTDI (FT800) component

The FT800 provides a powerful feature set in a small package to create dynamic HMI interfaces. The device supports line by line graphics rendering to 1/16 of a pixel on displays with resolution up to 512 x 512 with 262K colours. The chip includes a touch controller for sensing touch feedback from a TFT display with a resistive touch panel as well as a sound synthesizer and audio playback with a PWM output to drive a speaker.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_FTDI-FT800.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_FTDI-FT800.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

CommandWrite

CommandWrite
Sends FT800 command 
- BYTE Command
 
- VOID Return


IncrementCommandOffset

IncrementCommandOffset
Adds commandSize to the currentOffset. Checks for 4K ring-buffer offset roll-over  
- UINT currentOffset
graphics processor command list pointer 
- BYTE commandSize
number of bytes to increment the offset 
- UINT Return


Initialise

Initialise
System initialization routines. Executed once on reset. Returns 0 if device not detected or 1 if device is correctly initialised. 
- BYTE Return


MemRead16

MemRead16
Reads a single unsigned int from the FT800 internal address space 
- ULONG Address
 
- UINT Return


MemRead32

MemRead32
Reads a single unsigned long from the FT800 internal address space 
- ULONG Address
 
- ULONG Return


MemRead8

MemRead8
Reads a single data byte from the FT800 internal address space 
- ULONG Address
 
- BYTE Return


MemWrite16

MemWrite16
Writes a unsigned int value to the FT800 internal address space 
- ULONG Address
 
- UINT Data
 
- VOID Return


MemWrite32

MemWrite32
Writes a unsigned long value to the FT800 internal address space 
- ULONG Address
 
- ULONG Data
 
- VOID Return


MemWrite8

MemWrite8
Writes a byte value to the FT800 internal address space 
- ULONG Address
 
- BYTE Data
 
- VOID Return


Property reference

Properties
SPI Properties
Channel
SPI Channel selector 
Prescale
Prescale option selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Pin Connections
Power Pin
 
CS Pin
 
Display Properties
Width
Active width of LCD display 
Height
Active height of LCD display 
HCycle
Total number of clocks per line 
HOffset
Start of active line 
HSync0
Start of horizontal sync pulse 
HSync1
End of horizontal sync pulse 
VCycle
Total number of lines per screen 
VOffset
Start of active screen 
VSync0
Start of vertical sync pulse 
VSync1
End of vertical sync pulse 
PixelClock
Pixel Clock  
Swizzle
Define RGB output pins 
Clock Polarity
Define active edge of PCLK  
Simulation
Scope Traces
Selects if the scope traces are automatically generated or not 
Console Data
Selects if the console data is automatically generated or not 
API