PC Serial Ports
E-2
Issue 1 January 1997
Under DOS (and Windows, which works cooperatively with DOS), the serial port
interfaces in a PC are uniquely identified by specific device names: COM1 (“serial
communications port 1”), COM2 (“serial communications port 2”), and so on, usually up
through COM4. A particular PC might have none of these devices, some of them, or all
of them installed. For example, most PCs currently on the market arrive from the
manufacturer with two serial ports already installed (COM1 and COM2), often integrated
onto the computer’s main system board. Installing additional serial ports (for example,
COM3 or COM4) is usually accomplished by purchasing an add-on card and installing it
into a free expansion slot.
For most purposes (such as configuring software), the generic description of serial ports
provided by their device names is sufficient. For example, during the MERLIN LEGEND
Reporter installation procedure, you are asked to provide the name of the serial port to
which you are going to connect your telephone system (for example, COM2).
Unfortunately, this abstract view of serial ports is not sufficient for other purposes,
notably for troubleshooting problems: to be able to do this effectively, a basic
understanding of serial port hardware is required. In particular, it’s essential to
understand the mechanics by which the computer’s microprocessor communicates with
serial port hardware.
The microprocessor/serial port communication consists of two aspects: an I/O port
address and an interrupt request signal (IRQ). The I/O port address represents a small
region of the microprocessor's input/output memory space that is used to pass data back
and forth to the serial port. This memory region acts something like a mailbox: outgoing
mail (data from the microprocessor to be transmitted to the peripheral device) is placed in
the mailbox by the owner (the microprocessor) to be picked up by the mail carrier (the
serial port hardware) for subsequent delivery to the destination party (the peripheral
device). In turn, the mail carrier (the serial port hardware) places incoming mail (data
from the peripheral device) into the box to be picked up by the owner (the
microprocessor). This analogy illustrates an additional important point about I/O port
addresses: just as individual mailboxes help the residents in a neighborhood keep their
mail from getting mixed up, each device using an I/O port address to communicate with
the microprocessor should have a unique address that doesn’t conflict with that of any
other device.
IRQ Mechanism
The mailbox analogy is also helpful in understanding the IRQ mechanism. Normally, we
place our outgoing mail in our mailbox at any convenient time before the mail carrier
arrives to pick it up. The outgoing mail sits in our mailbox until the mail carrier arrives, at
which time it is picked up and possibly some incoming mail is placed in the mailbox.
Then, some time later, we check our mailbox and retrieve our new incoming mail. The
problem with this scheme is that it’s not very efficient; both the outgoing and incoming
mail spends some time just sitting in the mailbox. A better approach would be if the mail
carrier provided some sort of signal (for example, ringing the doorbell) to announce his or
her arrival, in which case we could hand over the outgoing mail and pick up the incoming
mail immediately.
In the PC architecture, IRQs act like the doorbell in our analogy: they provide a method
by which hardware devices in the computer can get the microprocessor’s attention to
deal efficiently with some process. The serial port hardware makes use of an IRQ to
Содержание MERLIN LEGEND Reporter
Страница 1: ...MERLIN LEGEND Reporter Installation and Use...
Страница 96: ...PSU at a Polled Site Issue 1 January 1997 7 5...
Страница 121: ...Worksheets Issue 1 January 1997 A 15...