Auto detect UART baud rate of a working device

Vishal B U picture Vishal B U · Jun 15, 2017 · Viewed 10.3k times · Source

I have a device which is continuously sending data through UART.

I'm trying to read it using a terminal application on Windows-based PC. The problem is that I don't know at which baud rate the device is sending the data. The data I'm getting at higher baud rates doesn't make any sense so I have narrowed it down to lesser than or equal to 600 among the standard baud rates available on terminal.

Is there any software to detect the baud rate or a method using any microcontroller??

Answer

TomServo picture TomServo · Jun 15, 2017

No, not if you want to get done quickly. Ten years doing this type of task says an oscilloscope or even an inexpensive USB-based logic analyzer is your best solution here. This isn't a software problem yet, it's a signal detection problem. You should be able to clear this up in a few minutes with the right instrument.

I'm assuming you're only doing this exercise because the transmitting part is one for which you cannot find a datasheet. If you had a datasheet in hand, that would clear this up, or at least suggest the possible baud rates you should try.