Difference between revisions of "Component: UART Software (Timer) (Comms: Interface)"
From Flowcode Help
Jump to navigationJump to search(2 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
==UART Software (Timer) component== | ==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. | 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 Pack== | ||
+ | |||
+ | COMMSC | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 24: | Line 34: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 164: | Line 180: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | Buffer | | width="90%" | Buffer | ||
|- | |- | ||
Line 218: | Line 234: | ||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Global Settings | ||
|- | |- | ||
|- | |- | ||
Line 239: | Line 259: | ||
|- | |- | ||
| colspan="2" | Allows the Receive pin to be enabled / disabled | | colspan="2" | Allows the Receive pin to be enabled / disabled | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Transmit Properties | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
Line 249: | Line 273: | ||
|- | |- | ||
| colspan="2" | Number of bytes that can be stored in the outgoing transmit buffer | | colspan="2" | Number of bytes that can be stored in the outgoing transmit buffer | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Receive Properties | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
Line 260: | Line 288: | ||
| colspan="2" | Number of bytes that can be stored in the incoming receive buffer | | colspan="2" | Number of bytes that can be stored in the incoming receive buffer | ||
|- | |- | ||
− | | width="10%" align="center" style="background-color:# | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
− | | width="90%" style="background-color:# | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|- | |- |
Latest revision as of 17:19, 9 November 2022
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 Pack
COMMSC
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
Downloadable macro reference
![]() |
SendString |
Sends an string to the transmit buffer | |
![]() |
Data |
![]() |
Return |
![]() |
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 |
![]() |
SendArray |
Sends an array of values to the transmit buffer | |
![]() |
Values |
![]() |
NumValues |
![]() |
Return |
![]() |
UART_Timer_Process |
Called as part of a timer interrupt at the specific UART baud rate. | |
![]() |
Return |
![]() |
ReceiveValue |
Gets a single value from the receive buffer | |
![]() |
Timeout |
Time in milliseconds to wait for data | |
![]() |
Return |
![]() |
SendValue |
Sends a single value to the transmit buffer | |
![]() |
Value |
![]() |
Return |
![]() |
CheckBuffer |
Returns the number of values in the transmit or receive buffer | |
![]() |
Buffer |
0=Transmit / 1=Receive | |
![]() |
Return |
![]() |
ReceiveString |
Gets a string from the receive buffer | |
![]() |
MaxChars |
![]() |
Timeout |
Time in milliseconds to wait for data | |
![]() |
Return |
![]() |
Initialise |
Initialises the UART component pins ready to send and receive data | |
![]() |
Return |