III.ENABLING AND ADDRESSING PORTS

Setting the address

Each serial port on the DS-102 uses 8 consecutive I/O locations in
the range of 0000 hex to 07FF hex. The base address of each port is set
using a DIP switch pack on the DS-102. When setting the address
selection switches, a switch in the "ON" position specifies that the
corresponding address line must be a logic 0 for the port to be selected.
Similarly, a switch in the "OFF" position forces the corresponding address
line to be a logic 1 for the port to be selected.
Switch SW1 selects address lines A10 through A3 for Serial 1.
Switch SW2 serves the same purpose with respect to Serial 2. The
remaining address lines (A2, A1 and A0) are used by the UART to select
the register being accessed. Address lines A11 through A15 must be at
logic 0 for a port to be selected. The serial ports may be independently
enabled or disabled by installing or removing a jumper from jumper pack
J4. Figure 3 shows how the switches on the DS-102 represent the
address values for serial ports. This figure can be used to explain the
examples shown in Figure 4 .
two, and one, hence the maximum value of 8+4+2+1 = 15.
A serial port's address is a 16-bit quantity that is most often expressed
in four hexadecimal (base 16) digits. A hex digit can hold a value from 0 to
15 (decimal), and is made up of four binary bits given weights of eight, four,
A common serial port address is 03F8 hex. The example below shows
how the hex digits are broken down into binary bits.
Bit weight
Binary bits
Sum of bits
Hex digits 3F8
0
8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
0+0+0+0 0+0+2+1 8+4+2+1 8+0+0+0
0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0
0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0
These address bits are set by the switches.
All other bits are considered to be zero.
Figure 3 --- Examination of a serial port base address
4
Quatech
DS-102 User's Manual