# How to calculate baud rate and determine the number of stop bits in asynchronous serial

Below is the given question: For my understanding, 1/baud_rate = 104.16 However, when I tried to do reverse division, the result is so different than expected.

1. My calculation to find baud rate: 1/104.16 =9.6006 * 10^-3

Is my calculation of baud rate wrong?

2.How do I determine the number of stop bits in this case?

• The link just provides some dark blue background page, without it I have no idea what you are asking. – PlasmaHH Dec 8 '16 at 15:51
• Any receiver can handle the specified number of stop bits or arbitrarily more. Almost all modern UARTS only need one stop bit on receive. Sending out 2 is occasionally used to pace data but is a RARE need after the days of Teletype terminals, paper tapes punches and primitive protocol converters. – KalleMP Dec 8 '16 at 19:17

## 2 Answers

Baud rate is $\dfrac{1}{104.16\times 10^{-6}}$ = 9600.6 bits per second.

How do I determine the number of stop bits in this case?

It looks like 2 stop bits on the example you give but it could also be regarded as 1 stop bit and an indeterminate idling period.

• Hi, I would like to ask how do you determine is 10^-6 to calculate the baud rate? Is base on experience or have to count the number of bits to determine ? – beginnerK Dec 8 '16 at 16:01
• @beginnerK doesn't the word "microseconds" clearly written on your picture mean anything to you? 1 micro second is 10^-6 seconds. – Andy aka Dec 8 '16 at 16:06

You've forgotten the prefix. It's not 104.15 s, it's 104.16 us. So 1/(104.16 us) = 9.60061 kHz. Because 9600 baud is a very common baud rate, I'd round to that.

Your second question is more murky. You appear to have marked the last bit as the stop bit, which I think is correct, because the next bit period is marked as idle. So it would appear that the stop bit length is 1 stop bit. In general, however, without knowing the length of the stop bit, you can't figure it out from a scope trace because you can't differentiate between the stop bit and the line idling.