Jump to content

Component: UART Free (Peripheral CAL): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(14 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_UART_Free.fcfx FC_Comp_Source_UART_Free.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_UART_Free.fcfx FC_Comp_Source_UART_Free.fcfx]
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_UART_Free.fcfx FC_Comp_Source_UART_Free.fcfx]


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




Line 38: Line 50:


==Examples==
==Examples==




Line 58: Line 80:




==Downloadable macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
 
 
 
 
 
 
 
==Macro reference==
 
===Delay===
{| 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;" | '''UpdateBaud'''
| width="90%" class="mtx-class-macrohead" | '''Delay'''
|-
|-
| colspan="2" | Changes the UART Baud rate. 0 = 1200 / 1 = 2400 / 3 = 4800 / 3 = 9600 / 4 = 19200 / 5 = 38400 6 = 57600 / 7 = 115200 
| colspan="2" | Software UART Bit Delay 
|-
|-
| 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''
|}
 
 
===GetConsoleHandle===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GetConsoleHandle'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| colspan="2" |  
| width="90%" | new_baud
|-
|-
| colspan="2" | The new baud rate (0=1200, 7=115200) 
|-
|-
| 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-h32-icon.png]] - HANDLE
| 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;"
===GetList===
{| 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;" | '''GetValue'''
| width="90%" class="mtx-class-macrohead" | '''GetList'''
|-
|-
| colspan="2" | Get Value of Named property 
| colspan="2" | Gets Named property List 
|-
|-
|-
|-
Line 96: Line 139:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetValue===
{| 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;" | '''Receive'''
| width="90%" class="mtx-class-macrohead" | '''GetValue'''
|-
|-
| colspan="2" | Receive a Character 
| colspan="2" | Get Value of Named property 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Timeout
| width="90%" | Name
|-
|-
| colspan="2" | Period to wait for the character to be received 
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| 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;"
===Init===
{| 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;" | '''Send'''
| width="90%" class="mtx-class-macrohead" | '''Init'''
|-
|-
| colspan="2" | Send the Character  
| colspan="2" | Initialize the component with the specified properties 
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Char
|-
| colspan="2" | The Character to send 
|-
|-
| 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 132: Line 172:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Receive===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''Receive'''
|-
| colspan="2" | Receive a Character 
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle'''
|-
|-
| colspan="2" |  
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Timeout
|-
|-
| colspan="2" | Period to wait for the character to be received 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| 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;"
===Send===
{| 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;" | '''Init'''
| width="90%" class="mtx-class-macrohead" | '''Send'''
|-
|-
| colspan="2" | Initialize the component with the specified properties 
| colspan="2" | Send the Character  
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Char
|}
 
 
{| 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;" | '''Delay'''
|-
| colspan="2" | Software UART Bit Delay 
|-
|-
| colspan="2" | The Character to send 
|-
|-
| 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 171: Line 210:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetValue===
{| 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;" | '''SetValue'''
| width="90%" class="mtx-class-macrohead" | '''SetValue'''
|-
|-
| colspan="2" | set Value of Named property 
| colspan="2" | set Value of Named property 
Line 194: Line 234:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Uninit===
{| 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;" | '''Uninit'''
| width="90%" class="mtx-class-macrohead" | '''Uninit'''
|-
|-
| colspan="2" | Un-initialize the UART and release the resources 
| colspan="2" | Un-initialize the UART and release the resources 
Line 207: Line 248:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===UpdateBaud===
{| 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;" | '''GetList'''
| width="90%" class="mtx-class-macrohead" | '''UpdateBaud'''
|-
|-
| colspan="2" | Gets Named property List 
| colspan="2" | Changes the UART Baud rate. 0 = 1200 / 1 = 2400 / 3 = 4800 / 3 = 9600 / 4 = 19200 / 5 = 38400 6 = 57600 / 7 = 115200 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Name
| width="90%" | new_baud
|-
|-
| colspan="2" |  
| colspan="2" | The new baud rate (0=1200, 7=115200) 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 285: Line 325:
| colspan="2" | Flow Control (Handshake) enable or disable 
| colspan="2" | Flow Control (Handshake) enable or disable 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd
Version 1.3
Category Peripheral CAL


UART Free component

A low level implementation giving direct access to the CAL

Component Source Code

Please click here to download the component source project: FC_Comp_Source_UART_Free.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_UART_Free.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Example showing how to build a component using a CAL component Using CAL Components.







Macro reference

Delay

Delay
Software UART Bit Delay 
- VOID Return


GetConsoleHandle

GetConsoleHandle
 
- HANDLE Return


GetList

GetList
Gets Named property List 
- STRING Name
 
- STRING Return


GetValue

GetValue
Get Value of Named property 
- STRING Name
 
- STRING Return


Init

Init
Initialize the component with the specified properties 
- VOID Return


Receive

Receive
Receive a Character 
- BYTE Timeout
Period to wait for the character to be received 
- INT Return


Send

Send
Send the Character  
- UINT Char
The Character to send 
- VOID Return


SetValue

SetValue
set Value of Named property 
- STRING Name
 
- STRING Value
 
- VOID Return


Uninit

Uninit
Un-initialize the UART and release the resources 
- VOID Return


UpdateBaud

UpdateBaud
Changes the UART Baud rate. 0 = 1200 / 1 = 2400 / 3 = 4800 / 3 = 9600 / 4 = 19200 / 5 = 38400 6 = 57600 / 7 = 115200 
- BYTE new_baud
The new baud rate (0=1200, 7=115200) 
- VOID Return


Property reference

Properties
Channel
UART Channel selector 
TX
Pin to be used for Transmit data 
RX
Pin to be used for Receive data 
Baud Options
Baud rate option selector 
Baud Rate
 
Data Bits
Number of data bits 
Return
Return data width from Receive macro 
Echo
Echo selection 
Interrupt
Interrupt mode enable or disable 
Flow Control
Flow Control (Handshake) enable or disable 
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