Possible Serial Baud Rates on Various Machines

Last reviewed: January 21, 1997
Article ID: Q99026
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.1, 3.5, 3.51, 4.0
    

SUMMARY

Computers running Windows NT may be unable to set the same serial baud rates due to differences in serial port hardware on various platforms and machines. These differences may be important to note when writing a serial communications application that runs on different Windows NT platforms.

The simplest way to determine what baud rates are available on a particular serial port is to call the GetCommProperties() application programming interface (API) and examine the COMMPROP.dwSettableBaud bitmask to determine what baud rates are supported on that serial port.

MORE INFORMATION

Some baud rates may be available on one machine and not on another because of differences in the serial port hardware used on the two machines. Most Intel 80x86 machines use a standard 1.8432 megahertz (MHz) clock speed on serial port hardware, and therefore most Intel machines can set the same baud rates. However, on other platforms, such as MIPS, there is no standard serial port clock speed. MIPS serial ports are known to exist with 1.8432 MHz, 3.072 MHz, 4.2336 MHz, and 8.0 MHz serial port clock chips. Future NT implementations on other platforms may have different serial port clock speeds as well.

Furthermore, certain requested baud rates are special-cased in the Windows NT serial driver so that they will work. The following are these special cases:

   MHz     Requested Baud    Divisor   Resulting Baud Rate (+/- 1)
  ---------------------------------------------------------------

   1.8432      56000            2              57600
   3.072       14400           13              14769
   4.2336       9600           28               9450
   4.2336      14400           18              14700
   4.2336      19200           14              18900
   4.2336      38400            7              37800
   4.2336      56000            5              52920
   8.0         14400           35              14286
   8.0         56000            9              55556

The actual baud rate can be calculated by dividing the divisor multiplied by 16 into the clock rate. For example, for a 1.8432 MHz clock and a divisor of 2, the baud rate would be:

   1843200 Hz / (2 * 16) = 57600

For all other cases, as long as the requested baud rate is within 1 percent of the nearest baud rate that can be found with an integer divisor, the baud rate request will succeed.


KBCategory: kbprg
KBSubcategory: BseCommapi
Additional reference words: 3.10 3.50 3.51 4.00



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.