## Physical Device Driver Reference

[prev][next][parent][TOC]

### ASYNC_EXTSETBAUDRATE (43h) - Fraction

Fraction This field is a binary integer value that represents the fraction of the bit rate to set. It is used for setting a very precise bit rate. In most cases, this field is set to 0.

If the Fraction field needs to be set, the user must understand how bit rates are handled in the system. Bit rate is calculated using the following formula:

       DIVISOR COUNT - BAUD CLOCK / SCALER / BINARY BIT RATE

For the Enhanced UART, the BAUD CLOCK is 22.1184 MHz and the SCALER is 32. The DIVISOR COUNT is a 16-bit value that is loaded into the ASYNC device's divisor latch to generate the final bit rate clock. Any fractional amount is rounded to the nearest divisor count to get the closest bit rate. This integer is put into the following formula to get the actual output bit rate value:

       OUTPUT BIT RATE = BAUD CLOCK / SCALER / DIVISOR COUNT

For the value of the Fraction field, the resultant fraction obtained from the above formula is multiplied by 256. When setting a bit rate the physical device driver passes the bit rate and fraction directly to ABIOS.

For bit rates up to 19200 bps, the physical device driver sets the rate only if the hardware can support the rate within .01% margin of error to maintain compatibility. The exceptions are for 110 and 2000 bps, which can have an error of up to .026% and .69%, respectively. In all other cases, if the requested rate cannot be achieved by the hardware within .01% tolerance, the IOCtl fails with an ERROR_INVALID_PARAMETER return code.

For bit rates beyond 19200 bps, the physical device driver does not check the .01% margin of error. It is the user's responsibility to maintain the bit rate tolerance. After calling Function 43h, the user should call Function 63h to check the actual bit rate set on a COM port.

The recommended bit rate values are:

110
150
300
600
1200
1800
2000
2400
3600
4800
7200
9600
19200
38400
57600
76800 *
115200 *
230400 *
345600 *

* Note: Use IOCtl Function 74h.