Difference between revisions of "Component: UART Software (Timer) (Comms: Interface)"
From Flowcode Help
Jump to navigationJump to searchLine 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_UART_Software_Timer.fcfx FC_Comp_Source_UART_Software_Timer.fcfx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_UART_Software_Timer.fcfx FC_Comp_Source_UART_Software_Timer.fcfx] |
==Detailed description== | ==Detailed description== | ||
Line 76: | Line 76: | ||
{{Fcfile|UART_Timer_Example.fcfx|UART_Timer_Example}} | {{Fcfile|UART_Timer_Example.fcfx|UART_Timer_Example}} | ||
+ | |||
+ | |||
Revision as of 13:13, 7 February 2023
Author | MatrixTSL |
Version | 1.0 |
Category | Comms: Interface |
Contents
UART Software (Timer) component
Creates a reliable software UART that can be driven using a timer interrupt setup by the user. The timer interrupt must be interrupting at the required baud rate. e.g 9600Hz.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_UART_Software_Timer.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_UART_Software_Timer.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Simple example showing how to enable a timer interrupt at the desired baud rate then receive a string. If anything is received then it will be echoed back out and displayed on a LCD
Macro reference
CheckBuffer
![]() |
CheckBuffer |
Returns the number of values in the transmit or receive buffer | |
![]() |
Buffer |
0=Transmit / 1=Receive | |
![]() |
Return |
Initialise
![]() |
Initialise |
Initialises the UART component pins ready to send and receive data | |
![]() |
Return |
ReceiveArray
![]() |
ReceiveArray |
Gets an array of values from the receive buffer. Returns number of values received. | |
![]() |
Values |
![]() |
NumValues |
![]() |
Timeout |
Time in milliseconds to wait for data | |
![]() |
Return |
ReceiveString
![]() |
ReceiveString |
Gets a string from the receive buffer | |
![]() |
MaxChars |
![]() |
Timeout |
Time in milliseconds to wait for data | |
![]() |
Return |
ReceiveValue
![]() |
ReceiveValue |
Gets a single value from the receive buffer | |
![]() |
Timeout |
Time in milliseconds to wait for data | |
![]() |
Return |
SendArray
![]() |
SendArray |
Sends an array of values to the transmit buffer | |
![]() |
Values |
![]() |
NumValues |
![]() |
Return |
SendString
![]() |
SendString |
Sends an string to the transmit buffer | |
![]() |
Data |
![]() |
Return |
SendValue
![]() |
SendValue |
Sends a single value to the transmit buffer | |
![]() |
Value |
![]() |
Return |
UART_Timer_Process
![]() |
UART_Timer_Process |
Called as part of a timer interrupt at the specific UART baud rate. | |
![]() |
Return |