Table of contents

0. Introduction

1. Pinout variations.

2. Voltage levels.

3. Serial data format.

4. The 8250 and descendant chips in the PCs.

5. Where do you find the ports?

6. Baud-rates.

7. Programming on DOS, including DOS boxes under Windows.

8. 32-bit programming on Windows NT/2000/XP.

9. Programming on Unix-systems: Xenix, HP-UX, BSD, and Linux

10. Programming on Unix-systems: Linux

11. The other IO lines

12. USB-serial converters under Linux.

13. On shared interrupts under Linux.

Table of ASCII codes

To index page

0. Introduction.

This summarizes what I have found out about the traditional serial ports on various operating systems and hardware. This is a working document that will be updated occasionally.

This is all about the traditional asynchronous serial communications. Sometimes referred to as RS-232, these are the kinds of communication ports traditionally used with terminals and modems, and that exist in more or less identical and compatible forms on the largest variety of computer hardware.

This does not discuss the USB, Firewire, Ethernet, or other, higher integrated serial communications links, even though at least the Ethernet is another fairly ubiquitous and very useful kind of interconnection. These all have some kind of link-level protocols, and for Ethernet, there is the whole software stack of protocols on various levels to play with. They tend to be better defined, but this comes at the cost of complexity of implementation. Asynchronous serial port hardware that works reasonably well can be constructed from a few SSI TTL chips, this is not possible with the others. Instead, we have to depend on specialty hardware to a larger extent.

However, USB-to-serial converters as they operate under Linux are discussed.

There is also the matter of the availability of a few extra bits (2 outputs and 4 inputs in the most common implementations) beyond the standard communications channel. These can be put to use for many wonderful purposes, if and when they can be harnessed. To some extent, these extra bits and wires can be more fun than the details of the data-channel part.