Column: Embedded design
Receiving RS232 bytes when your local clock isn’t accurate enough
By Myk Dormer, Engineer and Director, Smallwireless Limited E
mbedded systems frequently use simple serial data interfaces. Asynchronous data has been around since the very start of the computer industry – and
that feels like forever. One of the most well known is the RS232 format; see Figure 1. Recovering asynchronous data is very
simple. You use the fi rst (falling) edge of the start bit to initialise a bit counter, which is then used to sample the centre point of each data bit, including the start and stop bits to ensure data integrity. T is is obviously a simplifi cation: real hardware
1 The RS232 format is the most well known (Note: the image shows inverted “UART” asynchronous)
decoders oſt en use multiple bit sampling techniques to reject noise, but in this case the example stands. T is obviously requires a local clock with at least tolerable accuracy; however, how accurate?
2 3 Assume that the timing is referenced
to that fi rst edge. By the time the decode process gets to the stop bit (9.5 bits later), the sampling point must not have driſt ed by more than ±0.5 bit – that is 5.2%,
4
Table 1: ASCII characters (Something becomes evident if you look closely at the binary values) 12 October 2025
www.electronicsworld.co.uk
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34 |
Page 35 |
Page 36 |
Page 37 |
Page 38 |
Page 39 |
Page 40 |
Page 41 |
Page 42 |
Page 43 |
Page 44