PortDock

UART Waveform Drawer (Bits, Baud, RS-232 Levels)

Draw the UART bit waveform of text or hex (start, data LSB first, parity, stop) at TTL or RS-232 levels, with frame time and baud from a measured pulse.

Results
Format
Bytes
Bit time
Frame time
Max characters/s
Total (no gaps between bytes)

Drawing and maths run in your browser; nothing you type is sent anywhere.

Estimate baud from a pulse width

The shortest high or low on a scope or logic analyser. Sending 'U' (0x55) alternates every bit, so the shortest pulse is one bit.

1 ÷ pulse width
Nearest standard baud
Difference

The UART frame

  • The idle line is 1 (mark). A 0 start bit lets the receiver synchronise, then the data bits arrive LSB (bit 0) first.
  • Parity: even (E) makes the count of 1s in data + parity even, odd (O) makes it odd. Mark and space are always 1 and 0.
  • Stop bits are 1, lasting 1, 1.5 or 2 bit times. The next start bit may follow the stop bit immediately.
  • Frame time = (1 + data + parity + stop) ÷ baud. 8N1 is 10 bits, 8E1 is 11 bits.

TTL vs RS-232 levels

  • An MCU UART pin (TTL/CMOS level) has 1 = high (3.3 V or 5 V) and 0 = 0 V.
  • RS-232 (TIA/EIA-232) is inverted: 1 (mark) is negative, 0 (space) is positive. Drivers output ±5 to ±15 V; receivers read below −3 V as 1 and above +3 V as 0. An idle RS-232 line is negative and the start bit swings positive.
  • Never wire an MCU pin straight to an RS-232 (DB9) port — the voltages and polarity do not match. Use a transceiver such as a MAX232.
  • USB-UART adapters come in «TTL» and «RS-232» versions. On a scope, a positive idle level means TTL, a negative one RS-232.

Standard baud rates and bit time

Baud1 bit (µs)8N1 frame (µs)
3003333.33333333.33
6001666.66716666.67
1200833.3338333.33
2400416.6674166.67
4800208.3332083.33
9600104.1671041.67
1440069.444694.44
1920052.083520.83
2880034.722347.22
3840026.042260.42
5760017.361173.61
7680013.021130.21
1152008.68186.81
2304004.3443.4
250000440
4608002.1721.7
500000220
9216001.08510.85
1000000110

FAQ

How do I measure the baud rate with a scope?

Measure the shortest pulse (one bit) and take 1 ÷ width. 104 µs is about 9600 bps, 8.68 µs about 115200 bps. Runs of equal bits are several bits long, so use the shortest.

I get garbled characters

Likely causes: baud, data bits, parity or stop bits differ between the two sides; TTL wired straight to RS-232 (polarity and voltage); clock error. For baud error use the UART Baud Rate Error Calculator.

When are 1.5 stop bits used?

Mainly with 5 data bits (on PC UARTs, choosing «2» with 5 data bits gives 1.5). Rare in current equipment.

For baud error, use the UART Baud Rate Error Calculator; For the Modbus 3.5-character gap, use the Serial Timing Calculator. For SPI, I2C and CAN: SPI Mode Helper · I2C Tools · CAN Frame Decoder

Sources