© National Instruments Corporation 5-1 GPIB-COM User Manual
Section Five
Programming the GPIB-COM
This section presents a description of the GPIB-COM Serial Port Emulator registers and
information on programming the GPIB-COM. You need to use this section only if you are
writing your own serial port device driver.
The GPIB-COM Registers
IBM's serial adapter is a plug-in card for the PC that handles RS-232 communication. The main
component of the adapter is an INS8250 Asynchronous Communications chip or its equivalent,
which is controlled by programming a set of registers on the I/O channel. The names of these
registers and their I/O addresses are given in Table 5-1. Each register is located at a certain offset
from the base address of the board. The addresses are given with an X for the first digit and a Y
for the second digit, where XY=3F for COM1 (base address 3F8), XY=2F for COM2 (base
address 2F8), XY=3E for COM3 (base address 3E8), and XY=2E for COM4 (base address
2E8). Notice that sometimes two registers share the same I/O address. The DLAB bit (bit 7 of
the Line Control Register) determines which register will respond when these addresses are
accessed.
Note: Throughout this section, the term set will be used to mean that a bit is a logical 1, and clear
will mean that the bit is a logical 0.
Table 5-1. GPIB-COM Registers
I/O Address Offset from
Register Type XY=3F for COM1 Base Address
XY=2F for COM2
XY=3E for COM3
XY=2E for COM4
Transmitter Holding Register write XY8 (DLAB=0) 0
Receive Buffer Register read XY8 (DLAB=0) 0
Divisor Latch LSB Register read/write XY8 (DLAB=1) 0
Divisor Latch MSB Register read/write XY9 (DLAB=1) 1
Interrupt Enable Register read/write XY9 (DLAB=0) 1
Interrupt Identification Register read XYA 2
Line Control Register read/write XYB 3
Modem Control Register read/write XYC 4
Line Status Register read XYD 5
Modem Status Register read XYE 6
The following pages describe the functions of each register on the serial adapter and on the GPIB-
COM. For a more complete description of the serial adapter, refer to the IBM Options and
Adapters Manual.