Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

UART Troubleshooting Software

Status
Not open for further replies.

DigiTan

New Member
Does anyone know of a program (preferably for PC) that can troubleshoot μcontroller UART problems. Say for instance, you have a PIC or AVR, the UART connection isn't working and there's no explaination why. I'm mostly interested in buad rate error %, framing error detection and that type of thing. Not so much flow control errors. Are the any good tools for doing this?
 
By the way, I'm using something called RealTerm right now, but it's only helpful if the UART is problem-free. Especially when the true baud rate is unknown.
 
I'll second the PICkit2 software as both the UART tool & Logic analyzer should make troubleshooting UART problems fairly easy. *Debugger is handy too*
Although the PICkit2 is for PICs the UART tool & LA are a handy tool for any micro.
 
Set the transmitter up to send a constant stream of capital letter "U"s this will output a bit clock on your UART pin which you can time using a frequency counter or a scope to determine the exact baud rate very accurately. If you can send/receive individual characters fine but strings are getting garbled it's probably a framing or clock drift issue. Oft times simply adding a second stop bit will help framing errors go away if you don't have a good baud rate match between RX and TX intentionally adding a delay in between each character transmission will make the problem go away but will also seriously limit your throughput. A UART can handle some pretty gross baud rate mismatches on a single byte basis but they compound on strings and at high data rates.
 
With a good hardware UART and a high clock rate sure. With a software UART on either end all such assumptions are out the window, the OP hasn't given us any details other than he has a UART trouble which is more than a little vague, and there is no program or software that can solve that for you.

I'm going to asume a software uart is used on at least one end as anyone that knows how to setup the hardware UART of both a PIC and an AVR should be able to debug it and isn't going to be asking this kind of question with such a vague request as "a program that can troubleshoot UART problems" as such a request doesn't make sense in the first place.
 
With a good hardware UART and a high clock rate sure. With a software UART on either end all such assumptions are out the window, the OP hasn't given us any details other than he has a UART trouble which is more than a little vague, and there is no program or software that can solve that for you.

Doesn't matter if it's a hardware or software UART, it still syncronises every single byte, so long strings make no difference whatsoever. The only time it could make a difference, but it's nothing to do with the UART anyway, is what your program is doing with the data - with a software UART it's got to finish whatever it was doing before the end of the stop bit - but this is simply obvious programming practice.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top