Fraction
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: