Logic Analyzer - Serial Communications

I am using the TX1 and RX1 pins to communicate with a UART device but I am sending a bad command somewhere. So I am trying to debug using a logic analyzer(haven't used one in 25yrs). The only problem is I can't seem get the right data when connected to the transmit line. Does anyone know a good source for figuring out how to set the # of bits, parity and such...I've read a dozen or so wiki pages and understand that the it can be half or full duplex, 8 bit, no parity....it depends on the hardware. The device I have hooked up seems to work, but fails on one command and i just want to see what is actually being sent.

Trying for several hours now with no luck.....any help is great!

I gather your LA has a serial decoder but you can't get the right settings? Normaly there's an autobaud feature that will remove some of the variables.

Otherwise just look at the data and measure the bit times etc. It's normally pretty easy for a human to see the patterns.

Can you post a pic of a trace showing some data?


Rob

Generally 8 bits, no parity, 1 stop bit. Do you have a RS223 to USB adapter cable? You can connect your TX pin & ground to the RX pin and ground on the cable and monitor on a PC also, might be easier than a logic analyzer (since what you really want is a protocol analyzer). I have several of these laying around for some reason. I think mine have a Prolific chip in them.

You can obtain one as a 'dongle' also:

http://www.dealextreme.com/p/usb-to-rs232-dongle-with-extension-cable-5859

The device I have hooked up seems to work, but fails on one command and i just want to see what is actually being sent.

So then why are you trying to trouble shoot parity and number of bits...

If the above is true... fails on one command -- but not others then how can you have it set wrong? Unless you have tried only one sequence and it always fails in the same place -- then it could be a multitude of issues -- but probably handshaking...

The problem is simply in the command.... If that is the case then you can use a PC WITH THE PROPER INTERFACE as a "dumb observer" and see what you are sending...

You need a level converter unless you are already at RS232C levels (+- 12V)

Now we know nothing about the device you are hooking to, you have shown no code... so best I can do.

All,
Thanks for the suggestions and I got it working! The transmit line is 7bits, 1stop, no parity, LSB, non inverted…really makes debugging stuff easy…

fileopenworks.png

I see you have a Salaea Logic, they are great little gadgets. How people debug comms stuff without one I have no idea :)


Rob

If you have an old PC with two serial ports lying around, there's a Linux app called "scope" that's great for simple protocol analysis. No fancy graphics, but it creates a text log file that makes it easy to see what's going back and forth between the two devices.

Will it work on a setup like Puppy linux?

Afaik, it's only available in source form (here's the website). So you'd need to run it on a PC with gcc, or use a "compact" distro that makes it easy for you to build custom images on a desktop system. Does Puppy do that? I've used Pebble when I needed a tiny "embedded" Linux, and DSL for "rescue" CDs, but never really researched Puppy.

Graynomad: I see you have a Salaea Logic, they are great little gadgets. How people debug comms stuff without one I have no idea :)


Rob

I really wish they'd get their linux drivers implemented...