View Full Version : baudmode

01-29-2010, 11:31 PM
why do we use 9600 as default baudrate ? why do we use 16468 baudmode in bs2 as default ? any specific reasons ?

Mike Green
01-30-2010, 12:04 AM
9600 Baud is the fastest standard serial speed that most Stamps can handle on receive. Generally, you can send faster than you can receive. The BS2px is faster, so it uses 19200 Baud for the debug statements.

Standard serial speeds are generally powers of 2 of 300 Baud (300, 1200, 2400, 4800, 9600, 19200, 38400). There's a discontinuity at 56K (57.6KB = 3*19.2K) with powers of 2 of that continuing (115.2KB, 230.4KB)

Why 16468? Have you read the BASIC Stamp Syntax and Reference Manual? The chapters on SERIN and SEROUT explain how that number is constructed. "Inverted" vs. "Normal" mode depends on how the serial signal is connected to other things. Normally, the serial line idles at a logic one (high) voltage. If there's a logic inverter in the signal path (like when the signal is converted to RS232), the serial line idles at a logic zero (low) voltage and is considered to be inverted.