Shop OBEX P1 Docs P2 Docs Learn Events
Figuring out the baud rate of an oddball incoming data stream — Parallax Forums

Figuring out the baud rate of an oddball incoming data stream

bte2bte2 Posts: 154
edited 2014-11-27 00:30 in Propeller 1
Hi all, I'm trying to connect to a device that has a differential line driver (LTC1487 or similar). I can get the asynchronous bits into the propeller pin, but I'm having a bit(!) of trouble figuring out how to reliably get the byte of data.

The device sends one start bit, then the byte of data, with no stop bit, for a total of 9 bit times at 14.4 uSec per bit. The entire frame of 9 bits x 14.4 uSec is 129.6 uSec which I confirmed with the scope.

On the scope, the pin is low, then the start bit(1), then the byte (lsb first), then at the end of the last bit the pin goes low again. This is out of a pendant and I have no control over what they are sending, but it is always single bytes with the start bit prepended.

I've been trying to get it with FullDuplexSerial but it ain't happening. I am receiving garbage. All signals are nice and sharp with no over- or undershoot or ringing, so I don't think it is a noise issue.

Anybody have anything in the way of advice for me? I'm good at paying it forward. Thanks, bryan

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-11-26 23:21
    bte2 wrote:
    then at the end of the last bit the pin goes low again.
    That's the stop bit. Your signal is inverted, though. If you're using a differential line receiver, just reverse the + and - inputs to get the correct polarity. Otherwise, you'll have to specify reverse polarity in the call to FDS's start routine. Given your timing values, the baudrate will be 69.4 kbaud -- a highly unusual value.

    -Phil
  • bte2bte2 Posts: 154
    edited 2014-11-26 23:53
    Thank you for your reply :-) I came up with 69.444 myself and I have tried scads of different combinations of polarity selection and Baud rates to no avail. If I set the variable with a literal instead of the serial data, it reports correctly to the terminal, but the serial data is jittery garbage.

    The pendant sends the same frame with the same data every 25ms so it's not like the serial data is changing. This should be easy but I'm missing something obvious- it's just one stinking byte for Pete's sake.
  • bte2bte2 Posts: 154
    edited 2014-11-27 00:30
    Got it! There was something wrong with my FDS file. I'm not sure exactly what, but a fresh copy works perfectly. I don't recall editing that file, but I suppose it is possible. Thank you again, Phil!
Sign In or Register to comment.