Shop OBEX P1 Docs P2 Docs Learn Events
Autodetect baud? — Parallax Forums

Autodetect baud?

Jimmy W.Jimmy W. Posts: 112
edited 2008-07-31 01:43 in Propeller 1
Anyone know of a good method / idea to auto detect the baud rate of an rs232 connection? The lines I would be tapping into would have data streaming consistantly but would be unknown what the contents are, it does not use a sync bit either to grab onto.


·

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-07-31 01:19
    Just keep measuring negative-going pulses. After only a few bytes you should have found the shortest one, which will be one bit time long.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • RaymanRayman Posts: 14,234
    edited 2008-07-31 01:43
    Check out my uOLED-96-Prop contest submission... It requires that the transmitter send a special code, but otherwise autodetects bauds up to 57kbps...
Sign In or Register to comment.