View Full Version : Bit Banging and how baud rates got to be what they are

07-12-2006, 08:25 AM
I have pretty much ignored serial communications as far as in depth study of how it works, as I google my way through it, I start to wonder why 300 baud as the lowest typical baud rate. I can't set my scope to .003333333 seconds and I would think the founders of this communucation had less than the 100 mhz storage scope I have today. I t would seem there is some underlying reason for 300,600,1200,2400 baud rates instead of 10,20 50,100 or 1000,2000,5000,10000 like a scope division for example.

Think outside the BOX!

07-12-2006, 08:53 AM
Actually, a while ago my work had an old VAX machine that they dialed in to for monitoring equipment...it was on an old 150baud modem (or maybe it was 130 baud)....

I think they may have started with a number....and they just doubled the speed with each increment.

from a googled'd site:
"Pronounced bawd, the number of signaling elements that occur each second. The term is named after J.M.E. Baudot, the inventor of the Baudot telegraph code.
At slow speeds, only one bit of information (signaling element) is encoded in each electrical change. The baud, therefore, indicates the number of bits per second that are transmitted. For example, 300 baud means that 300 bits are transmitted each second (abbreviated 300 bps ). Assuming asynchronous communication, which requires 10 bits per character, this translates to 30 characters per second (cps). For slow rates (below 1,200 baud), you can divide the baud by 10 to see how many characters per second are sent.

At higher speeds, it is possible to encode more than one bit in each electrical change. 4,800 baud may allow 9,600 bits to be sent each second. At high data transfer speeds, therefore, data transmission rates are usually expressed in bits per second (bps) rather than baud. For example, a 9,600 bps modem may operate at only 2,400 baud.

Just noticed your total post count is currently at 232....cool!



"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."

Mike Green
07-12-2006, 09:29 AM
Except for 50 Baud, the original speeds for radio communications were all based roughly on 10 characters per second due to mechanical limitations. Initially, these used 5 bit codes (for 32 characters - 26 letters, 2 shift codes, a space code, delete code, and ACK/NAK if I remember correctly), a start bit, and a stop bit (often 1.5 bit times long). A second shifted code set included most punctuation and the digits. With a total of 7.5 bit times, the speed was 75 Baud. The first teletypes for computer use were at 110 Baud, also at 10 characters per second, but now with 7 character bits, a parity bit, start bit, and two stop bits for 11 bits total and 128 different character codes. The next step up mechanically was to 150 Baud, this time with only one stop bit for a total of 10 bits and 15 characters per second. Once the shift occurred to electronic terminals, the other speeds were multiples of this at 300, 450, 600, and 1200 Baud. Eventually, most of the intermediate speeds were dropped and we're left with 2400, 4800, 9600, 19200, 38400, and some odd combinations through about 56KBaud for modems.

07-12-2006, 09:36 AM
Could someone just explain the following three plots

Zero, 127 and 255 were sent to make 3 plots using the following basic stamp2 code

SEROUT 15, 3313, [DEC 127] ' 127 shown here

Eleven bits are sent for the number 255 using approx 110 mS in time

Only 2 bits are sent for ZERO over 30 mS in time

The serout command using 3313 is set to 300 baud 8 bit no parity TRUE so thats 300 N,8,1

I hold the line high, send the serout command and then hold it high again what confuses me is that there are eleven transitions from high to low for the byte 255 compounded by , if all bits are 1 why are the lows not the same. The first 3 (byte 255 sent) are longer than the next 3 then a longer one and three short ones followed by one long. I understand the low signal is the bit but it would seem this looks more like 00011101110

I'm confused.

Think outside the BOX!

Mike Green
07-12-2006, 09:59 AM
When you use the DEC (or BIN or HEX) prefixes, the Stamp translates the byte value into a sequence of characters. The zero becomes "0". The 127 becomes "127", and the 255 becomes "255" where the items in quotes are the ASCII codes for the digits. If you want to send a single byte with a value of 127, use SEROUT 15,3313,[127]. Similarly, sending 255 becomes SEROUT 15,3313,[255].

Mike Green
07-12-2006, 10:04 AM
Also remember that the start bit is an initial zero bit and the stop bit is a trailing one bit. The binary code %01001010 is actually transmitted as (first -> 0,0,1,0,1,0,0,1,0,1) with the start and stop bits added and the least significant bit sent first. The signal line idles at a 1 bit (high) normally so the start bit is a change from idle to a zero and the stop it just continues at a one until the next start bit occurs.

07-12-2006, 10:19 AM
BINGO, I see the scope as it should be now. I don't do much basic programming anymore as I use assembler for everything.

Thanks, that was simple.

Think outside the BOX!

PJ Allen
07-12-2006, 10:22 AM
SEROUT 15, 3313, [$17]

Maybe your triggering is a bit off or something.

Kaos Kidd
07-13-2006, 03:52 AM
Mike, your right about the baud speeds and the reasons... 50,75,110,150,300,600,1200,2400,4800,9800, ...
My first modem was a 150 in 1979 . I spent over $400 for a real Haynes cardional 1200 in '80 or '82 (??)
Which, I still have, and it still works. Everything, and I mean everything can talk to this modem, and it can talk to anything.

Just tossing my two bits worth into the bit bucket