SOLVED:Identify serial protocol from logic analyzer picture?

UPDATE: The short story is that I was assuming that an RS232 output was the same as a TTL level just with higher voltages, but in fact, they are inverted! Solution was to find pins with TTL level signal (or I could have used an max232 to translate).


I'm trying to interface with a commercial digital scale to an arduino. The only external communications interface is USB and it's not a host, but appears as a serial device when hooked to a PC (using an A-A cable!). Fortunately it has screw terminals inside labeled RX,TX and GND. The menu has a baud rate and format selection which I've set to 96008N1. The output should be in the format:

<STX><p><xxxx.xx><uu><space>,<CR>,<LF>

Where
STX is 02h
p is - or space
xxxx.xx is a weight in ASCII
uu is units in ASCII
so I would expect:
0005.23g

Unfortunately I get nothing of the sort. Here's a picture of a packet and the start of one (click on picture for larger version):


The width of the narrowest bit is 0.10425ms which is about 9600 baud.

The only external communications interface is USB and it's not a host, but appears as a serial device when hooked to a PC (using an A-A cable!).

No USB uses USB protocol it does not use the asynchronous protocol of a serial port. The drivers in the PC make it look like a serial port to the PC code but that does not mean that it is ACTUALLY using a serial protocol to communicate.

Can you use the protocol analyser/decoder in Salea to display the results?

I just got the Saleae yesterday (for this problem), so I'm just figuring out its functionality. It was interpreting the signal as the exact same nonsense I was seeing via my PC and an arduino. If you look closely in the picutes you can see at the top '191', '251','251','251'...

I was trying some of the other odd canned formats the scale can use: 96007o2, 48007e1, when I noticed that it was never high for 1 bit, but often low for one bit....

I then saw the inverted selection, and voila:

 '2'____206_g___\r\n

Perfect

I'll need to look into inverted serial signals, and how to fix this in hardware. I'm going to use bluetooth between the scale and the arduino which will make my client very happy.

Thanks for everyone's input.

RyanN:
I'll need to look into inverted serial signals, and how to fix this in hardware. I'm going to use bluetooth between the scale and the arduino which will make my client very happy.

You can use logic inverter chips if needed but the Software serial has a poorly/un documented signal inversion flag. So you could connect the scales to software serial and pass results to hardware if needed.

  // public methods
  SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false);

Today I learned today that TTL level and RS-232 signals are inverted.
https://www.sparkfun.com/tutorials/215
The salea thought it was dealing with TTL levels, but I had put in some 10k resistors since I only had access to the RS-232 level signal.
My bluetooth module must assume TTL as well, as it passed the inverted signal down the chain. I could have stuck another max232 chip in there, but a little more poking around and I was able to trace and tap in to TTL level signals from the scale. Everything is communicating nicely now.