Baud Mode Calculation Query
Sandgroper
Posts: 62
Hi,
Can anyone explain what the "-20" is for in the following calculation?· This is taken from the SERIN command in the PBasic manual:
"Baudmode Calculation:
I'm using a BS2-e at 2400 baud for receiving a 10-bit frame (1 start bit, 8 data bits, no parity bit, 1 stop bit).· I understand how the baud mode of 396 is derived, but not what the " -20 " is for.· Is it purely to allow space for adjusting the bit rate up to 416 us?· Or is it to identify 8-N-1 to the BS2-e?· Or is it something else?
·
Can anyone explain what the "-20" is for in the following calculation?· This is taken from the SERIN command in the PBasic manual:
"Baudmode Calculation:
- Determine the bit period (bits 0 - 11)
- BS2, BS2e, and BS2pe = INT(1,000,000 ÷ baud rate) - 20
- BS2sx and BS2p = INT(2,500,000 ÷ baud rate) - 20
- BS2px = INT(4,000,000 ÷ baud rate) - 20"
I'm using a BS2-e at 2400 baud for receiving a 10-bit frame (1 start bit, 8 data bits, no parity bit, 1 stop bit).· I understand how the baud mode of 396 is derived, but not what the " -20 " is for.· Is it purely to allow space for adjusting the bit rate up to 416 us?· Or is it to identify 8-N-1 to the BS2-e?· Or is it something else?
·
Comments