Shop OBEX P1 Docs P2 Docs Learn Events
Active "autobaud" using multiple smartpins — Parallax Forums

Active "autobaud" using multiple smartpins

Hi All

I was messing around with smartpins today and ended up with this small utility.

Six smartpins are configured to select their input source frm P63.
The input selector of a smartpin has a reach of +/- 3 pins. I skip P62 (Tx).
Also each smartpin is set to a different bit clock.

The program defaults to 115200 baud and via a terminal program (I use PST) it
echoes any characters reeived.

At any time you can change the baudrate simply by changing the terminal baudrate to
one of the user defined baudarates and sending a "baud" string.
The code will acknowledge the baudrate change with a text message at the new baudrate.


Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2018-05-04 12:26
    Interesting tid-bit ;)

    Got to be some useful timing things to be possible with this scenario.
  • Cluso99Cluso99 Posts: 18,069
    Could make for a nifty serial obfuscation method :)
    Only a P2 or FPGA would be able to send/receive the serial mess :)
  • jmgjmg Posts: 15,173
    ozpropdev wrote: »
    Active "autobaud" using multiple smartpins

    Interesting but not quite what most call autobaud, more of a baud-smorgasbord ( or is that smorgasbaud ;) )

    This has multiple uarts, running concurrently at known agreed baud rates (which can be any strange value, but needs a crystal, not RC osc), and each can report what they make of the incoming data.

    You could embed secret tokens at high baud, buried into the normal lower baud strings using this too, that would completely mess with most reverse engineering tools..

  • jmgjmg Posts: 15,173
    Cluso99 wrote: »
    Could make for a nifty serial obfuscation method :)
    Only a P2 or FPGA would be able to send/receive the serial mess :)

    :) yes, I've also seen industrial protocols that use edge position modulation, so rather like data over PWM - 16 possible variants, can send 4 bits.
    You could send an otherwise normal serial stream, with edges modulated, but not enough to hit the UART sampling points.

  • jmg wrote: »
    Interesting but not quite what most call autobaud, more of a baud-smorgasbord ( or is that smorgasbaud ;) )
    From Wikipedia
    autobaud
    (telecommunications) The automatic detection of a suitable baud rate by examining the incoming data.
    Same isn't it?
    I now prefer "smorgasbaud" though :)


  • jmgjmg Posts: 15,173
    ozpropdev wrote: »
    From Wikipedia
    autobaud
    (telecommunications) The automatic detection of a suitable baud rate by examining the incoming data.
    Same isn't it?
    well, yes, as far as a single sentence goes..

    Most Autobaud designs allows ANY baud rate (within hardware limits), not a choice from a list of 6, and one main purpose is to operate with no firm restrictions on system clock rates.


  • This is a neat idea. I suspect the basic technique of "throwing a few neighboring smartpins at the same signal" might be something we do regularly with the P2.
  • jmgjmg Posts: 15,173
    Tubular wrote: »
    This is a neat idea. I suspect the basic technique of "throwing a few neighboring smartpins at the same signal" might be something we do regularly with the P2.

    Yup, if you want high precision PWM decode, you need 2 smart pins.
Sign In or Register to comment.