[GreenKeys] Precise baud timing

John Nagle nagle at animats.com
Wed Nov 19 01:06:47 EST 2025


If you're writing a software UART, it's customary to poll three times
per bit time, not just once in the middle of the bit time.

"The receive (RX) operation is initiated by the receipt of a valid start 
bit. It consists of a negative edge at URXD, followed by the taking of a 
majority vote from three samples, where 2 of the samples must be zero. 
These samples occur at n/2-x, n/2 and n/2+x of BRCLK periods after the 
negative edge. This sequence provides false start bit rejection,
and also locates the center of bits in the frame, where the bits will be 
read on a majority basis. The timing of x is 1/32 to 1/63 times of 
BRCLK, but at least BRCLK, depending on the division rate of the baud 
rate generator."

This was normal when the other end might be a mechanical teletype or
something that didn't get its timing from a really good source.
Teletype machines are supposed to track signals off by as much as
7% in speed, which might happen with a governed motor.

New UARTs tend not to bother with this.

Ref: https://www.ti.com/sc/docs/products/micro/msp430/userguid/ag_12.pdf

There were some really error tolerant software UARTs in the early days. 
One of the early time sharing services automatically recognized baud
rate, and would sign on with "You are on line at 301.42 baud".
It was a while before everybody was counting from a crystal.

				John Nagle


More information about the GreenKeys mailing list