0
\$\begingroup\$

I'm trying to decode a RS485 bus from an alarm system. If I connect it to a computer on baud 3600 then I receive ASCII strings which match what is being shown on the alarm panel; however, when I look at the signalling from the microcontroller to the line driver, this is what I see:

enter image description here

The period between the two gray dotted lines is 2ms. It looks more like manchester encoding to me, or otherwise there are too many bits and the pulse widths vary irregularly from what I can see.

Is anyone able to help me with what is going on? It decodes ascii strings with a PC uart converter, but I'm trying to identify the characters that start and end the packets so I need to be able to read the trace but I am perhaps decoding it incorrectly?

I read it as 1001001001011011010010, which is more than 8 bits. The widths of the smaller pulses are akin to 9600bps but I cannot understand why I am receiving usable ascii at 3600bps.

\$\endgroup\$
  • \$\begingroup\$ What chip is that? Are you sure you're actually using 3600 baud? \$\endgroup\$ – CL. Jan 9 '17 at 9:26
  • \$\begingroup\$ It is an FT232 ordinary serial-USB converter \$\endgroup\$ – user7282391 Jan 9 '17 at 9:33
1
\$\begingroup\$

With an UART at 9600 baud, 8N1, this decodes to four bytes:

0 10001000 1 0 00101111 1 0 11111110 1 0 00001100 1

  0x11         0xF4         0x7F         0x30

Apparently, that chip is more than a simple line driver.

\$\endgroup\$
  • \$\begingroup\$ Hi. Thanks that's the exact decoding I'm seeing at 3600... \$\endgroup\$ – user7282391 Jan 9 '17 at 9:25
  • \$\begingroup\$ Thanks this looks like the correct solution, it is 9600bps UART. not sure what's happened my end - will have another look.. Thank you. \$\endgroup\$ – user7282391 Jan 9 '17 at 9:39
3
\$\begingroup\$

It looks like you have parity bits in the transmission (or maybe some extra ninth bit): -

enter image description here

The red arrows show the start bit positions so your payload data looks to me like: -

10010010

11110111

10001100

P = Parity (ninth bit) S = Stop

It's not Manchester encoded else the idle period would be 101010101 etc..

\$\endgroup\$
  • \$\begingroup\$ The parity values do not appear to be correct. \$\endgroup\$ – CL. Jan 9 '17 at 9:21
  • \$\begingroup\$ If it isn't a parity bit (and I take your point) then maybe it is some ninth bit that means something else? \$\endgroup\$ – Andy aka Jan 9 '17 at 9:28
  • \$\begingroup\$ On RS485 I use the 9th bit set to indicate the start of a packet, possibly they use 9th bit clear to indicate the start. \$\endgroup\$ – Steve G Jan 9 '17 at 9:53
  • \$\begingroup\$ I know some UARTS support a 9th bit and have seen it used to indicate the other 8 bits are for the address being accessed. \$\endgroup\$ – Spoon Jan 9 '17 at 12:38
  • \$\begingroup\$ That's not a parity bit, it's a stop bit. \$\endgroup\$ – WhatRoughBeast Jan 9 '17 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.