[GreenKeys] Precise baud timing
Harold Hallikainen
harold at w6iwi.org
Wed Nov 19 13:48:04 EST 2025
The multiple samples per bit is interesting. I recently was notified that
the software uart in the DSP TU would have errors on data received from a
Teletype machine on the local loop. This turned out to be due to contact
bounce in the keyboard or TD distributor. The line spends the vast
majority of the bit time in the right state, but might not be in the right
state when the bit is sampled (the middle of the bit). To deal with this,
I put a low pass filter with a cutoff frequency of 0.5 times the baud rate
between the loop current detector and the software uart. This eliminated
the contact bounce issue, and the local keyboard and TD data now shows
correctly. Some notes are at https://w6iwi.org/rtty/DspTU3/ .
Harold
https://w6iwi.org
On Tue, November 18, 2025 11:06 pm, John Nagle via GreenKeys wrote:
> 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
> ______________________________________________________________
> GreenKeys mailing list
> Home: http://mailman.qth.net/mailman/listinfo/greenkeys
> Help: http://mailman.qth.net/mmfaq.htm
> Post: mailto:GreenKeys at mailman.qth.net
>
>
>>>> Jordan Spencer Cunningham's GreenKeys Search Tool:
>>>> https://teletype.net/gksearch
>>>> 2002-to-present greenkeys archive:
>>>> http://mailman.qth.net/pipermail/greenkeys/
>>>> 1998-to-2001 greenkeys archive:
>>>> http://mailman.qth.net/archive/greenkeys/greenkeys.html
>>>> Randy Guttery's 2001-to-2009 GreenKeys Search Tool:
>>>> http://comcents.com/tty/greenkeyssearch.html
>>>>
>
> This list hosted by: http://www.qsl.net
> Please help support this email list: http://www.qsl.net/donate.html
> Message delivered to harold at w6iwi.org
>
>
--
Not sent from an iPhone.
More information about the GreenKeys
mailing list