Skip to main content

Subsection 3.1.1 One Wire, Two States

Suppose we want to send the letter ‘E’ from the STM32C031C6 to your laptop. The simplest possible connection is one wire: that wire is either HIGH (3.3 V) or LOW (0 V). To send ‘E’, the STM32C031C6 first looks up its ASCII (American Standard Code for Information Interchange) code, 69, converts it to binary (\(64 + 4 + 1 = 69\text{,}\) so 0b01000101), and then puts those eight bits on the wire one at a time: HIGH for a 1, LOW for a 0.
This is the job of the serializer inside the USART, which is the STM32C031C6’s own name for this peripheral and which we come back to in Subsection 3.1.6. The serializer accepts the parallel byte from your code (all 8 bits at once, over the 32-bit APB, the Advanced Peripheral Bus) and converts it to a sequential bit stream. On the other end, the receiver’s deserializer does the reverse, reassembling the incoming bits back into a parallel byte.
Figure 3.1.1. A UART transmitter serializes parallel data into a bit stream; the receiver deserializes it back. Both sides share a timing agreement (the baud rate) but no clock wire, the “asynchronous” in UART.