Component: UART Software (Timer) (Comms: Interface): Difference between revisions
Appearance
No edit summary |
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
||
| Line 89: | Line 89: | ||
===CheckBuffer=== | ===CheckBuffer=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 108: | Line 108: | ||
===Initialise=== | ===Initialise=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 122: | Line 122: | ||
===ReceiveBinary16Bit=== | ===ReceiveBinary16Bit=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 146: | Line 146: | ||
===ReceiveBinary32Bit=== | ===ReceiveBinary32Bit=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 170: | Line 170: | ||
===ReceiveBinaryFloat=== | ===ReceiveBinaryFloat=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 194: | Line 194: | ||
===ReceiveBytetArray=== | ===ReceiveBytetArray=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 223: | Line 223: | ||
===ReceiveChar=== | ===ReceiveChar=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 242: | Line 242: | ||
===ReceiveFloat=== | ===ReceiveFloat=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 266: | Line 266: | ||
===ReceiveHexNumber=== | ===ReceiveHexNumber=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 295: | Line 295: | ||
===ReceiveINTArray=== | ===ReceiveINTArray=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 329: | Line 329: | ||
===ReceiveNumber=== | ===ReceiveNumber=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 353: | Line 353: | ||
===ReceiveString=== | ===ReceiveString=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 377: | Line 377: | ||
===SendBinary16Bit=== | ===SendBinary16Bit=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 401: | Line 401: | ||
===SendBinary32Bit=== | ===SendBinary32Bit=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 425: | Line 425: | ||
===SendBinaryFloat=== | ===SendBinaryFloat=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 449: | Line 449: | ||
===SendByteArray=== | ===SendByteArray=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 473: | Line 473: | ||
===SendChar=== | ===SendChar=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 492: | Line 492: | ||
===SendFloat=== | ===SendFloat=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 511: | Line 511: | ||
===SendHexNumber=== | ===SendHexNumber=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 540: | Line 540: | ||
===SendIntArray=== | ===SendIntArray=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 569: | Line 569: | ||
===SendNumber=== | ===SendNumber=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 588: | Line 588: | ||
===SendString=== | ===SendString=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 607: | Line 607: | ||
===UART_Timer_Process=== | ===UART_Timer_Process=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 622: | Line 622: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
Revision as of 14:15, 13 July 2026
| Author | MatrixTSL |
| Version | 1.0 |
| Category | Comms: Interface |
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.
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 | |
ReceiveBinary16Bit
ReceiveBinary32Bit
ReceiveBinaryFloat
ReceiveBytetArray
| ReceiveBytetArray | |
| 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 | |
ReceiveChar
| ReceiveChar | |
| Attempts to receive a single packet from the UART interface. | |
| Timeout | |
| Time to wait in milliseconds for valid data before returning, 0=Dont wait, 255=Wait forever. | |
| Return | |
ReceiveFloat
ReceiveHexNumber
ReceiveINTArray
ReceiveNumber
ReceiveString
| ReceiveString | |
| Gets a string from the receive buffer | |
| MaxChars | |
| Timeout | |
| Time in milliseconds to wait for data | |
| Return | |
SendBinary16Bit
| SendBinary16Bit | |
| Sends out a 16-bit binary value split across two bytes. | |
| Value | |
| MSBfirst | |
| 0=Least significant byte first, 1=Most significant byte first | |
| Return | |
SendBinary32Bit
| SendBinary32Bit | |
| Sends out a 32-bit binary value split across four bytes. | |
| Value | |
| MSBfirst | |
| 0=Least significant byte first, 1=Most significant byte first | |
| Return | |
SendBinaryFloat
| SendBinaryFloat | |
| Sends out a 32-bit binary floating point value split across four bytes. | |
| Value | |
| MSBfirst | |
| 0=Least significant byte first, 1=Most significant byte first | |
| Return | |
SendByteArray
| SendByteArray | |
| Sends an array of bytes to the transmit buffer | |
| Values | |
| NumValues | |
| Return | |
SendChar
| SendChar | |
| Sends out a single packet from the UART interface. | |
| Char | |
| Return | |
SendFloat
| SendFloat | |
| Sends a single float to the transmit buffer | |
| Value | |
| Return | |
SendHexNumber
SendIntArray
| SendIntArray | |
| Sends an array of ints to the transmit buffer | |
| Data | |
| NumValues | |
| MSBfirst | |
| 0=Least significant byte first, 1=Most significant byte first | |
| Return | |
SendNumber
| SendNumber | |
| Sends out a number as an ASCII String to the transmit buffer | |
| Number | |
| Return | |
SendString
| SendString | |
| Sends an string to the transmit buffer | |
| Data | |
| Return | |
UART_Timer_Process
| UART_Timer_Process | |
| Called as part of a timer interrupt at the specific UART baud rate. | |
| Return | |
Property reference
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
FlowcodeHeader was here