Component: UART Software (Timer) (Comms: Interface): Difference between revisions
Appearance
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
||
| Line 91: | Line 91: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckBuffer''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckBuffer''' | ||
|- | |- | ||
| Line 110: | Line 110: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | ||
|- | |- | ||
| Line 124: | Line 124: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary16Bit''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary16Bit''' | ||
|- | |- | ||
| Line 148: | Line 148: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary32Bit''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary32Bit''' | ||
|- | |- | ||
| Line 172: | Line 172: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinaryFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinaryFloat''' | ||
|- | |- | ||
| Line 196: | Line 196: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBytetArray''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBytetArray''' | ||
|- | |- | ||
| Line 225: | Line 225: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveChar''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveChar''' | ||
|- | |- | ||
| Line 244: | Line 244: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveFloat''' | ||
|- | |- | ||
| Line 268: | Line 268: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveHexNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveHexNumber''' | ||
|- | |- | ||
| Line 297: | Line 297: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveINTArray''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveINTArray''' | ||
|- | |- | ||
| Line 331: | Line 331: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveNumber''' | ||
|- | |- | ||
| Line 355: | Line 355: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString''' | ||
|- | |- | ||
| Line 379: | Line 379: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary16Bit''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary16Bit''' | ||
|- | |- | ||
| Line 403: | Line 403: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary32Bit''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary32Bit''' | ||
|- | |- | ||
| Line 427: | Line 427: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinaryFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinaryFloat''' | ||
|- | |- | ||
| Line 451: | Line 451: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByteArray''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByteArray''' | ||
|- | |- | ||
| Line 475: | Line 475: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendChar''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendChar''' | ||
|- | |- | ||
| Line 494: | Line 494: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendFloat''' | ||
|- | |- | ||
| Line 513: | Line 513: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendHexNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendHexNumber''' | ||
|- | |- | ||
| Line 542: | Line 542: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendIntArray''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendIntArray''' | ||
|- | |- | ||
| Line 571: | Line 571: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendNumber''' | ||
|- | |- | ||
| Line 590: | Line 590: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | ||
|- | |- | ||
| Line 609: | Line 609: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UART_Timer_Process''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UART_Timer_Process''' | ||
|- | |- | ||
Revision as of 14:17, 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