UART Baud and Bit rate Measurement With a scope.

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jay_dee
Posts: 250
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 99 times
Been thanked: 68 times

UART Baud and Bit rate Measurement With a scope.

Post by jay_dee »

HI, I'm battling UART and my trusted method to check Baud is to measure the width of a bit using a scope.
When sending 0x55, I have always used the Cursors to measure a single high or low pulse width.

I'm getting some subtle timing errors so I thought I would check my basic method with google, then ChatGPT (sorry, I know!)
but ChatGPT gave this method that measures the PERIOD of the wave form...surely this is wrong?

ChatGPT gives...

3. Correct Measurement Technique
Send a repeating character (0x55 ideal), because it produces a clean alternating bit pattern (10101010).
Set the oscilloscope trigger on a falling or rising edge.
Zoom in until you see several adjacent bit transitions.
Use cursor Δt or automated period measurement between two similar edges (e.g., rising → next rising).
Convert the measured Δt into baud = 1/(Δt).


Below is the Methods I beleive to be the propper measurement technique. (image robbed from internet!)
bit.jpg
bit.jpg (84.02 KiB) Viewed 67 times
thoughts? J.

LeighM
Valued Contributor
Posts: 518
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 88 times
Been thanked: 274 times

Re: UART Baud and Bit rate Measurement With a scope.

Post by LeighM »

Yep, AI is wrong, as usual :roll:
Depends what you asked though.
Your screen shot method is correct for UART baud.

jay_dee
Posts: 250
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 99 times
Been thanked: 68 times

Re: UART Baud and Bit rate Measurement With a scope.

Post by jay_dee »

Thanks for the clarification Leigh! exactly what I needed.

Fair Point regarding the question, everything is down to interpretation.
I asked "when measuring UART baud rate with an oscilloscope do you measure the period or pulse width"
hey ho. :) J.

medelec35
Valued Contributor
Posts: 2203
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 669 times
Been thanked: 748 times

Re: UART Baud and Bit rate Measurement With a scope.

Post by medelec35 »

Hi J.
This is what I have stated in the past.
medelec35 wrote:
Fri Feb 24, 2023 8:28 am
If you have a scope or a logic analyser Just send an upper-case U and measure either one bit mark or space duration, then baud rate = 1/mark or space duration.
Martin

Post Reply