Help to decode a differential signal - Page 1
Forum section: electronics / general

author: d.bocc
author_rank: Newbie
timestamp: September 10, 2022, 09:35:38 pm
content: Hello, I'm having trouble decoding this signal. I have 4 wires, + - A B, Ic is LPC2368FBD100, it looks like modbus on rs485, with a 57600 baudrate. Do you have a better idea to identify protocol o decode it? Thanks!Samples are taken with saleae's logic, the software hasn't "math" operations, so one capture uses 2 channels, one for A and one for B, referred to gnd.The other two captures, to see A-B and B-A on single channel, have gnd referred to B and A.

author: WattsThat
author_rank: Frequent Contributor
timestamp: September 10, 2022, 11:24:37 pm
content: Well, sure, that looks to be about the correct bit rate for 57,600 baud. Turn off the protocol decoders until you can decode it manually, otherwise you’re just adding to the confusion factor.Your post is lacking necessary things like where are the probes connected in the circuit?

author: d.bocc
author_rank: Newbie
timestamp: September 11, 2022, 10:32:03 am
content: Thanks, I tried decoders could likely help me, without succes. Highs and lows haven't the same lenght, the only idea I have is divide the whole lenght by baudrate and take a 1 if high and 0 if low

author: WattsThat
author_rank: Frequent Contributor
timestamp: September 11, 2022, 07:31:55 pm
content: Please use a new post when adding information, don’t edit unless you’re correcting an error. Editing a previous post to add information will get overlooked and then quite possibly ignored when your follow up post adds nothing to the conversation.If the Saleae is a clone (or the original design), you cannot decode 485 directly, you’ll need a 485 receiver chip to convert to a logic level you can decode. One of those $1 Arduino 485 modules will work just fine for the purpose.If you have one of the current Saleae models with analog threshold ability, those can be used when configured correctly.https://support.saleae.com/protocol-analyzers/analyzer-user-guides/using-async-serial/decode-rs-232-rs-485-and-rs-422As an after thought to your original post, if the connector has both a supply and signal, check the voltage supply. If it’s greater than 5 volts, it’s possible the comms is CAN based, not 485.

author: d.bocc
author_rank: Newbie
timestamp: September 13, 2022, 02:13:39 pm
content: Supply voltage is 12v, however signal amplitude is 5v, checked again with the oscilloscope, and signal looked symmetrical. Sampled again with ligic and looks specular, as a Can signal. It makes sense, Ic has 2 Can channel, the device has 2 signal output. Ordered a 485 and a Can modules, are on the way!

author: NaDobraNich
author_rank: Regular Contributor
timestamp: September 14, 2022, 04:59:11 am
content: I really doubt that is CAN.You would be looking at 2.5V to 5V on the positive line and 0V to 2.5V on the negative line, I can’t tell what you have but it doesn’t look right.Differential CAN requires a transceiver. It doesn’t come out of the micro like that.I’m not seeing a clear start of frame, and CRC section followed by an end of frame. For that bit speed, the SOF looks too short.I’ve also never heard of CAN running at that old UART speed.The image that shows that looks like a + and - capture seems to show a difference. CAN can’t really get that as the twisted pair is usually terminated together. I don’t know what that irregular pulse at the start bit is.485 or something is my bet.

author: Berni
author_rank: Super Contributor
timestamp: September 14, 2022, 06:04:31 am
content: Yep that looks like RS485 by the voltage levels.To get the correct settings in terms of number of bits, start bits, stop bits, pairity etc.. it is mostly trial and error until you find settings that appear to line up with the signal.After you get the bytes coming out it is then reverse engineering to figure out the protocol if you don't have documentation. That's mostly recording a lot of activity while messing with the system and manually looking at raw data in various forms to find patterns.