Active "autobaud" using multiple smartpins
ozpropdev
Posts: 2,792
in Propeller 2
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.
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
Got to be some useful timing things to be possible with this scenario.
Only a P2 or FPGA would be able to send/receive the serial mess
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..
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.
I now prefer "smorgasbaud" though
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.
Yup, if you want high precision PWM decode, you need 2 smart pins.