Serial Ports, TTL, and RS485: Concepts, Relationships, and Selection Guide
This article clarifies the relationship between serial ports, UART/USART, TTL/CMOS levels, and RS232/RS422/RS485 by separating them into protocol, electrical-level, and physical-interface layers. It explains 8N1 framing and baud-rate calculations, compares common logic-level thresholds, discusses USB-to-TTL modules, and summarizes practical selection considerations.
1. Separate the Three Layers
Serial-related terms can be confusing because they belong to three different layers. Once the layers are clear, most questions become easier to resolve.
- Protocol layer: Defines how data is packaged into a bitstream. UART (Universal Asynchronous Receiver/Transmitter) and USART (Universal Synchronous/Asynchronous Receiver/Transmitter) belong to this layer. They define how start bits, data bits, parity bits, and stop bits are organized. UART refers both to a communication method and to the hardware module that implements it.
- Electrical-level layer: Defines the voltages used to represent logic 0 and logic 1. TTL and CMOS levels belong to this layer. These levels are suitable for on-board or short-distance connections and are usually used directly between chips on the same circuit board.
- Physical-interface layer: Defines wires, connection methods, driving methods, and transmission distance. RS232, RS422, and RS485 belong to this layer. They are defined by industry standards and mainly address long-distance and multi-node communication.
With these layers in mind, several common terms become clear. “Serial port” is the broadest term. It generally refers to a communication interface that transmits data bit by bit in serial form; the underlying electrical level may be TTL, RS232, or RS485. “COM port” is the name an operating system gives to a serial port. COM comes from the abbreviation of Communication. It describes the port’s identity in the system, not an electrical standard.
2. Protocol Layer: How UART Organizes a Frame
UART uses asynchronous transmission. The transmitter and receiver do not share a clock line, so they must synchronize using an agreed baud rate. A data frame is structured as follows:
- When idle, the line remains high.
- Start bit: one low bit, which tells the receiver that reception is starting.
- Data bits: usually 8 bits, transmitted least significant bit first.
- Parity bit: optional; common options are no parity, odd parity, or even parity.
- Stop bit: one or two high bits, which end the frame.
In engineering practice, “8N1” is commonly used to mean 8 data bits, no parity, and 1 stop bit.
The baud rate determines the duration of each bit. At 115200 bps, for example, each bit lasts about 8.68 microseconds. An 8N1 frame contains 10 bits in total, or about 86.8 microseconds, so the effective throughput is about 11,520 bytes per second. The baud rate, data bits, parity, and stop bits must match on both sides; otherwise, the receiver will get garbled data.
USART adds a clock line to UART and can operate in synchronous mode, with the host providing the clock. Its data-format conventions are the same as those of UART, so the two are often referred to collectively as a “serial port” in engineering practice.
The following illustrative code helps explain the bit-by-bit transmission of an 8N1 frame. Real projects usually use a hardware UART module, which handles this timing automatically.
/* Example: software-send one byte in 8N1 format* gpio_write and delay_us are platform-provided functions* bit_time_us = 1000000 / baud rate*/void uart_send_byte_soft(uint8_t data, uint32_t bit_time_us){gpio_write(TX_PIN, 0); /* Start bit */delay_us(bit_time_us);for (int i = 0; i < 8; i++) { /* Data bits, LSB first */gpio_write(TX_PIN, (data >> i) & 0x01);delay_us(bit_time_us);}gpio_write(TX_PIN, 1); /* Stop bit */delay_us(bit_time_us);}
3. Electrical-Level Layer: TTL and CMOS
TTL stands for Transistor-Transistor Logic. Early 74-series and 54-series devices used this bipolar process. Today most digital chips are manufactured using CMOS processes, but engineers still use the term “TTL level” to refer to a class of single-ended digital levels.
Common logic levels can be divided into 5 V, 3.3 V, 2.5 V, and 1.8 V families. The following table lists typical thresholds. Refer to the datasheet of the specific device for exact values.
| Level Type | Output High | Output Low | Input High | Input Low |
|---|---|---|---|---|
| Standard TTL (5 V family) | ≥2.4 V | ≤0.4 V | ≥2.0 V | ≤0.8 V |
| LVTTL (3.3 V family) | ≥2.4 V | ≤0.4 V | ≥2.0 V | ≤0.8 V |
| CMOS (supply voltage VCC) | ≥0.9×VCC | ≤0.1×VCC | ≥0.7×VCC | ≤0.3×VCC |
These parameters directly affect wiring:
- A 3.3 V output driving a 5 V TTL input generally works because the high level from the 3.3 V output meets the 2.0 V threshold of the 5 V TTL input.
- When a 3.3 V output drives a 5 V CMOS input, the high level may not reach the 0.7×5 V = 3.5 V threshold, so level conversion is required.
- Connecting a 5 V output directly to the input pin of a 3.3 V device may exceed its voltage tolerance. Use a voltage divider or level converter.
TTL-level communication distance is limited to on-board or short-cable connections, typically within tens of centimeters. Beyond that range, signals are more susceptible to interference and attenuation, and RS-series standards are needed.
How USB-to-TTL Modules Work
The USB side follows the USB protocol. A converter chip inside the module restores USB data to UART frames and outputs TTL levels. The operating system recognizes the module as a virtual COM port. Therefore, the output of a USB-to-TTL module is TTL level, not RS232 level. To connect to an RS232 device, an additional level-conversion circuit is required.
4. Physical Interface Layer: RS232, RS422, and RS485
RS232, RS422, and RS485 are three industry standards. They specify voltage ranges, drive capability, topology, and transmission distance, but they do not specify the data format. They are often used together with UART: UART handles the protocol, while the RS-series standards convert levels into physical signals suitable for long-distance transmission. RS232 uses single-ended signaling referenced to ground.
5. Practical Selection Considerations
Use TTL/CMOS levels only for on-board or short connections. When the link must cover a longer distance or support multiple nodes, use an RS-series physical interface. A USB-to-TTL adapter provides TTL-level UART signals and appears as a virtual COM port; it does not provide RS232 levels. Connecting to an RS232 device requires additional level conversion. Keep UART settings matched on both ends: baud rate, data bits, parity, and stop bits.
