Microsoft KB Archive/99026

{|
 * width="100%"|

INFO: Possible Serial Baud Rates on Various Machines

 * }

Q99026

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * the operating system: Microsoft Windows NT, versions 3.1, 3.5, 3.51, 4.0
 * the operating system: Microsoft Windows 2000

-

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.

Additional query words: 3.10 3.50

Keywords : kbAPI kbCommPort kbKernBase kbOSWinNT310 kbOSWinNT350 kbOSWinNT351 kbOSWinNT400 kbOSWin2000 kbDSupport kbGrpDSKernBase kbSerial

Issue type : kbinfo

Technology : kbAudDeveloper kbWin32sSearch kbWin32API