Quatech | DS-102 | User`s manual | Quatech DS-102 User`s manual

DS-102
Dual Channel RS-232 Asynchronous
Communications Adapter
for ISA compatible machines
INTERFACE CARDS FOR IBM PC/AT AND PS/2
User's Manual
QUATECH, INC.
662 Wolf Ledges Parkway
Akron, Ohio 44311
TEL: (330) 434-3154
FAX: (330) 434-1409
BBS: (330) 434-2481
Table of Contents
I. GENERAL INFORMATION
II. INSTALLATION
III. ENABLING AND ADDRESSING PORTS
1
2
4
Setting the address
4
Enabling or disabling ports
6
IV. SETTING INTERRUPT LEVELS (IRQS)
Interrupt Sharing
V. EXTERNAL CONNECTIONS
VI. SERIAL PORT FUNCTIONAL
DESCRIPTION
8
9
10
14
Accessing the Serial Port registers
15
INTERRUPT ENABLE REGISTER
16
INTERRUPT IDENTIFICATION REGISTER
16
FIFO CONTROL REGISTER (16550 only)
18
LINE CONTROL REGISTER
19
MODEM CONTROL REGISTER
20
LINE STATUS REGISTER
21
MODEM STATUS REGISTER
22
SCRATCHPAD REGISTER
22
FIFO INTERRUPT MODE OPERATION (16550 UART
only)
23
FIFO polled mode operation (16550 UART only)
24
BAUD RATE SELECTION
25
VII. SPECIFICATIONS
VIII. TROUBLESHOOTING
Quatech DS-102 User's Manual
27
28
WARRANTY INFORMATION
Quatech, Inc. warrants the DS-102 to be free of defects for
one (1) year from the date of purchase. Quatech, Inc. will repair or
replace any board that fails to perform under normal operating conditions
and in accordance with the procedures outlined in this document during
the warranty period. Any damage that results from improper installation,
operation, or general misuse voids all warranty rights.
Please complete the following information and retain for your
records. Have this information available when requesting warranty
service.
DATE OF PURCHASE:
MODEL NUMBER:
DS-102
PRODUCT DESCRIPTION: Dual Channel RS-232 Asynchronous
Communications Adapter
SERIAL NUMBER:
Quatech DS-102 User's Manual
© 1993, Quatech, Inc.
NOTICE
The information contained in this document cannot be reproduced
in any form without the written consent of Quatech, Inc. Likewise, any
software programs that might accompany this document can be used only
in accordance with any license agreement(s) between the purchaser and
Quatech, Inc. Quatech, Inc. reserves the right to change this
documentation or the product to which it refers at any time and without
notice.
The authors have taken due care in the preparation of this
document and every attempt has been made to ensure its accuracy and
completeness. In no event will Quatech, Inc. be liable for damages of any
kind, incidental or consequential, in regard to or arising out of the
performance or form of the materials presented in this document or any
software programs that might accompany this document.
Quatech, Inc. encourages feedback about this document. Please
send any written comments to the Technical Support department at the
address listed on the cover page of this document.
IBM PCTM, PC-AT TM, PS/2™, and Micro Channel™ are trademarks of International
Business Machines Corporation.
Quatech DS-102 User's Manual
I.
GENERAL INFORMATION
The Quatech, Inc. DS-102 provides two RS-232 asynchronous serial
communication interfaces for IBM-compatible personal computer systems
using the ISA (Industry Standard Architecture) expansion bus.
The DS-102's two serial ports are implemented using 16450
Universal Asynchronous Receiver/Transmitters (UARTs). For higher
performance, 16550 UARTs can be installed in place of the 16450 UARTs.
The 16550 contains a hardware buffer that reduces processing overhead.
Software must be aware of the 16550 UART for the device's extra
capabilities to be used, otherwise it will act as a 16450 UART. The 16550
is suggested for multitasking environments and for applications involving
high data rates.
The DS-102 is highly flexible with respect to addressing and
interrupt level use. The base I/O address of each serial port can be
independently set anywhere within the range of 0000 hex to 07FF hex,
and available interrupt levels include IRQ2 through IRQ7.
Quatech DS-102 User's Manual
1
II.
INSTALLATION
If the default address and interrupt settings are sufficient, the
DS-102 can be quickly installed and put to use. The factory defaults are
listed in Figure 1.
PORT
ADDRESS
IRQ
ENABLED ?
Serial 1
3F8 hex (COM1)
4
YES
Serial 2
2F8 hex (COM2)
3
YES
Figure 1 --- Default address and IRQ settings for DS-102
The serial port outputs on the DS-102 are CN1 and CN2, which are
shielded D-9 connectors. Serial 1 is available on CN1 and Serial 2 is
available on CN2.
1. If the default settings are correct, skip to step 2, otherwise refer to
sections III and IV of this document for detailed information on
how to set the address and IRQ level for each port, and for how to
disable or enable each port.
2. Turn off the power of the computer system in which the DS-102 is
to be installed.
3. Remove the system cover according to the instructions provided by
the computer manufacturer.
4. Install the DS-102 in any vacant expansion slot. The board should
be secured by installing the Option Retaining Bracket (ORB) screw.
5. Replace the system cover according to the instructions provided by
the computer manufacturer.
6. Attach and secure the D-9 connectors to the desired equipment.
2
Quatech DS-102 User's Manual
Set addresses here
(SW1, SW2)
(Diagram not to scale)
16450/16550
CN1
J1
16450/16550
J2
J3
SW1
Serial 1
J4
Serial 1
J8
Serial 2
SW2
Serial 2
IRQ2
IRQ3
IRQ4
IRQ5
IRQ6
IRQ7
J5 Serial 1
J6 Serial 2
QUATECH INC. DS-102
J7
CN2
Set IRQ levels here
(J5, J6)
Figure 2 --- Diagram of DS-102
Quatech DS-102 User's Manual
3
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.
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,
two, and one, hence the maximum value of 8+4+2+1 = 15.
A common serial port address is 03F8 hex. The example below shows
how the hex digits are broken down into binary bits.
Binary bits
0 0 0 0
0 0 1 1
1 1 1 1
1 0 0 0
Bit weight
8 4 2 1
8 4 2 1
8 4 2 1
8 4 2 1
Sum of bits
0+0+0+0
0+0+2+1
8+4+2+1
8+0+0+0
Hex digits
0
3
F
8
These address bits are set by the switches.
All other bits are considered to be zero.
0 0 0 0
0 0 1 1
1 1 1 1
1 0 0 0
Figure 3 --- Examination of a serial port base address
4
Quatech DS-102 User's Manual
Switch on
bit = 0
Serial 1 uses SW1
Serial 2 uses SW2
Switch off
bit = 1
Factory default setting for Serial 1 --- 03F8 hex (COM1)
SW1
ON
1
2
3
4
5
6
7
8
0
2
1
8
4
2
1
8
3
8
F
Factory default setting for Serial 2 --- 02F8 hex (COM2)
SW2
ON
1
2
3
4
5
6
7
8
0
2
0
8
4
2
1
8
2
8
F
Example: 03E8 hex (typical for COM3)
ON
1
2
3
4
5
6
7
8
0
2
1
8
4
2
0
8
3
8
E
Example: 02E8 hex (typical for COM4)
ON
1
2
3
4
5
6
7
8
0
2
0
8
4
2
0
8
2
E
8
Figure 4 --- Serial Port base I/O address selection switches
Quatech DS-102 User's Manual
5
The standard addresses for serial ports COM1 and COM2 are listed
in Figure 5. Recommended addresses for serial ports COM3 and COM4
are also listed. The switch settings for these addresses are shown in
Figure 4.
PORT
TYPICAL I/O ADDRESS
NOTES
COM1
03F8 hex
Factory default for Serial 1.
COM2
02F8 hex
Factory default for Serial 2.
COM3
03E8 hex
COM4
02E8 hex
Recommendations only. No official
standards exist for COM3 and COM4.
Figure 5 --- Recommended addresses for serial ports
Enabling or disabling ports
Each port of the DS-102 may be individually enabled or disabled.
To enable a port, install a jumper between the appropriate pins of jumper
pack J4. To disable a port, remove the appropriate jumper from J4. This
is illustrated in Figure 6 below.
The factory default configuration is both serial ports enabled.
3
4
3
4
1
2
1
2
Serial 1 disabled
Serial 2 disabled
Serial 1 enabled
Serial 2 disabled
3
4
3
4
1
2
1
2
Serial 1 disabled
Serial 2 enabled
Serial 1 enabled
Serial 2 enabled
(factory default)
J4
Figure 6 --- Enabling and disabling ports
6
Quatech DS-102 User's Manual
(This page intentionally left blank.)
Quatech DS-102 User's Manual
7
IV. SETTING INTERRUPT LEVELS (IRQS)
IRQ2
IRQ3
IRQ4
IRQ5
IRQ6
IRQ7
IRQ2
IRQ3
IRQ4
IRQ5
IRQ6
IRQ7
The DS-102 interrupt circuitry allows each port to use any interrupt
level in the range IRQ2 through IRQ7. The interrupt levels are selected
using jumper packs J5 for Serial 1 and J6 for Serial 2. In Figure 7, the
factory default settings for Serial 1 and Serial 2 are shown.
Serial 1
J5
Default is IRQ 4
Serial 2
J6
Default is IRQ 3
Figure 7 --- Interrupt level (IRQ) selection
8
Quatech DS-102 User's Manual
Interrupt Sharing
An interrupt sharing circuit allows a port on the DS-102 to share an
interrupt with the other port on the board or with another Quatech
adapter supporting sharable interrupts. When interrupt sharing is used,
the software must query each port attached to a given IRQ level when an
interrupt for that IRQ is received by the computer.
Use of this feature is beyond the capabilities of most commercial
applications. If the software to be used with the DS-102 is not specially
written to take advantage of interrupt sharing, then ensure that each port
being used is connected to a different IRQ level.
Interrupt sharing is controlled by jumper J2 as described by Figure
8 and Figure 9. To maintain 100% ISA bus compatibility, these jumpers
should be set to the dedicated interrupt level positions.
CHANNEL
Serial 1
Serial 2
CONNECTION
INTERRUPT OPERATION
J2: 2-3 and 5-6
Dedicated interrupt level (default)
J2: 1-2 and 4-5
Interrupt sharing enabled
J3: 2-3 and 5-6
Dedicated interrupt level (default)
J3: 1-2 and 4-5
Interrupt sharing enabled
Figure 8 --- Interrupt sharing modes
Serial 1 uses J2
Serial 2 uses J3
4
5
6
2 3
1
Sharing enabled
4
5
6
2 3
1
Dedicated interrupt
(non-sharing)
Figure 9 --- J2, J3 settings
Quatech DS-102 User's Manual
9
V.
EXTERNAL CONNECTIONS
RS-232-C devices are classified by their function as either Data
Terminal Equipment (DTE) or Data Communication Equipment (DCE).
Generally, data terminal equipment is defined as the communication
source and data communication equipment is defined as the device that
provides a communication channel between two DTE-type devices.
Terminal
DTE
Modem
RS-232-C
DCE
Telephone
line
Terminal
Modem
RS-232-C
DCE
DTE
Figure 10 --- Use of DTEs and DCEs in a communications link
DTE- and DCE-type devices have complementary pinouts to allow
terminals and modems to be connected directly using a one-to-one cable
as shown in Figure 11. In many applications, DCEs are unnecessary, and
in these cases a cable called a "null modem cable" or "modem eliminator
cable" is used to directly connect two DTE-type devices. A typical null
modem cable is also shown in Figure 11.
(3)
(2)
(4)
(5)
(20)
(6)
(8)
(22)
(7)
RxD
TxD
RTS
CTS
DTR
DSR
DCD
RI
GND
TxD
RxD
CTS
RTS
DSR
DTR
DCD
RI
GND
Typical DTE-to-DCE cable
(3)
(2)
(4)
(5)
(20)
(6)
(8)
(22)
(7)
(3)
(2)
(4)
(5)
(20)
(6)
(8)
(22)
(7)
RxD
TxD
RTS
CTS
DTR
DSR
DCD
RI
GND
RxD
TxD
RTS
CTS
DTR
DSR
DCD
RI
GND
(3)
(2)
(4)
(5)
(20)
(6)
(8)
(22)
(7)
Typical DTE-to-DTE null modem cable
Figure 11 --- Cabling requirements for RS-232-C devices
(cables using 25-pin connectors shown)
10
Quatech DS-102 User's Manual
To simplify connections to other devices, each port on the DS-102 is
equipped with a jumper block that allows the port to be configured as
either a DTE- or DCE-type device. This allows the DS-102 to
communicate with either DTE- or DCE-type devices without using a null
modem cable. J7 is used for Serial 1 and J8 is used for Serial 2. The
DTE/DCE selection jumper blocks are illustrated in Figure 12.
TxD
1
7
pin 3
pin 2
2
8
RxD
RTS
3
9
pin 7
pin 8
4
10
CTS
DTR
5
11
pin 4
pin 6
6
12
DSR
TxD
1
7
pin 3
TxD
1
7
pin 3
pin 2
2
8
RxD
pin 2
2
8
RxD
RTS
3
9
pin 7
RTS
3
9
pin 7
pin 8
4
10
CTS
pin 8
4
10
CTS
DTR
5
11
pin 4
DTR
5
11
pin 4
pin 6
6
12
DSR
pin 6
6
12
DSR
DTE configuration
(factory default)
J7 -- Serial 1
J8 -- Serial 2
These jumper blocks are used to
connect RS-232 signals to the
various pins of the D-9 connectors.
DCE configuration
Figure 12 --- DTE or DCE output selection
(Jumpers J7 and J8)
Quatech DS-102 User's Manual
11
The DS-102 connects to peripheral equipment through male D-9
connectors. Adapters are available to convert these connectors into
standard D-25 male connectors. The standard serial port connections are
listed in Figure 13.
RS-232 Signal
Description
DTE Connection
DCE Connection
D-9
D-25
D-9
D-25
(DCD)
1
8
1
8
Receive Data
(RxD)
2
3
3
2
Transmit Data
(TxD)
3
2
2
3
Data Terminal Ready
(DTR)
4
20
6
6
5
7
5
7
Data Carrier Detect
Signal Ground
Data Set Ready
(DSR)
6
6
4
20
Request To Send
(RTS)
7
4
8
5
Clear To Send
(CTS)
8
5
7
4
Ring Indicator
(RI)
9
22
9
22
Figure 13 --- DS-102 connector definitions for RS-232-C
13
25
12
24
11
23
10
22
5
9
9
8
8
7
7
6
6
4
3
2
1
21
20
19
18
5
17
4
D-9 connector
(CN1 and CN2)
16
3
15
2
14
1
D-25 connector
(using adapter cable)
Figure 14 --- DS-102 Output connectors
12
Quatech DS-102 User's Manual
(This page intentionally left blank.)
Quatech DS-102 User's Manual
13
VI. SERIAL PORT FUNCTIONAL
DESCRIPTION
This section contains information intended for advanced users
planning to do custom programming with the DS-102. The information
presented here is a technical description of the interface to the 16450 or
16550 UART.
The 16450 UART is an improved functional equivalent of the 8250
UART, performing serial-to-parallel conversion on received data and
parallel-to-serial conversion on output data. Designed to be compatible
with the 16450, the 16550 UART enters character (non-FIFO) mode on
reset. In this mode, the 16550 appears as a 16450 to application software.
An additional mode, FIFO mode, can be invoked through software
to reduce CPU overhead. FIFO mode increases performance by providing
two 16-byte hardware buffers, one for transmit and one for receive. This
can reduce the frequency of interrupts issued to the CPU by the UART.
Other features of the 16450 and 16550 include:
| Programmable baud rate, character length, parity,
and number of stop bits.
| Automatic control of start, stop, and parity bits.
| Independent and prioritized interrupts.
| Transmit clock output / receive clock input.
The DS-102's serial ports are controlled by the 16450 or 16550
UARTs labeled U7 and U8. The serial ports will generate interrupts in
accordance with the bits set in the interrupt enable register of the UARTs.
In order to maintain compatibility with earlier personal computer
systems, the user-defined output OUT2 is used as an external interrupt
enable and must be set active for interrupts to be acknowledged. OUT2 is
accessed through the UART's MODEM control register.
The following pages provide a brief summary of the internal
registers available within the 16450 and 16550 UARTs. Registers and
functions specific to the 16550 will be indicated with boldface italic
notations.
14
Quatech DS-102 User's Manual
Accessing the Serial Port registers
Figure 15 lists the address map for the 16450 and 16550 UARTs.
Each register can be accessed by reading from or writing to the proper
I/O address. This I/O address is determined by adding an offset to the
base address set for the particular serial port. The base address is set
using DIP switches on the DS-102 (see section III).
Notice that two locations access different registers depending on
whether an I/O read or I/O write is attempted. Address [base+0]
accesses the receive buffer on an I/O read, or the transmit buffer on an
I/O write. Address [base+2] accesses the Interrupt Identification register
on an I/O read or the FIFO control register (16550 only) on an I/O write.
Also, notice that if address [base+0] or [base+1] is used with the DLAB bit
from the Line Control Register set to '1', the baud rate divisor latches are
accessed.
NOTE: All figures displaying bitmapped registers are
formatted such that bit 7 is the high-order bit.
UART Addressing
Register Description
DLAB
I/O Address
0
Base + 0
Receive buffer (read)
Transmit holding register (write)
0
Base + 1
Interrupt enable
X
Base + 2
Interrupt identification (read) (16450 and 16550)
FIFO control (write) (16550 only)
X
Base + 3
Line control
X
Base + 4
MODEM control
X
Base + 5
Line status
X
Base + 6
MODEM status
X
Base + 7
Scratchpad
1
Base + 0
Baud rate divisor latch (LSB) *
1
Base + 1
Baud rate divisor latch (MSB) *
(X = don't care)
* DLAB in Line Control Register must be set to access baud rate divisor latch.
Figure 15 --- Serial port register address map for 16450/16550 UART
Quatech DS-102 User's Manual
15
INTERRUPT ENABLE REGISTER
This register is located at I/O address [base+1]. It enables the five
types of UART interrupts. Interrupts can be totally disabled by setting all
of the enable bits in this register to a logic 0. Setting any bit to a logic 1
enables that particular interrupt.
BIT
DESCRIPTION
7
0 --- reserved
6
0 --- reserved
5
0 --- reserved
4
0 --- reserved
3
EDSSI --- MODEM Status Interrupt:
When set (logic 1), enables interrupt on clear to send, data set ready,
ring indicator, and data carrier detect.
2
ELSI --- Receiver Line Status Interrupt:
When set (logic 1), enables interrupt on overrun, parity, framing
errors, and break indication.
1
ETBEI --- Transmitter Holding Register Empty Interrupt:
When set (logic 1), enables interrupt on transmitter holding register
empty.
0
ETBEI --- Received Data Available Interrupt:
When set (logic 1), enables interrupt on received data available. For
16550 FIFO mode, interrupts are also enabled for receive FIFO trigger
level reached and for receive timeout.
Figure 16 --- Interrupt Enable Register bit definitions
INTERRUPT IDENTIFICATION REGISTER
This read-only register is located at I/O address [base+2]. When
this register is read, the UART freezes all interrupts and indicates the
highest priority interrupt. During this time, new interrupts are detected
by the UART, but are not reported in this register until the access
completes.
For the 16550 only, this register can be used to indicate whether
the FIFO mode is engaged by examining bits 6 and 7.
16
Quatech DS-102 User's Manual
BIT
DESCRIPTION
7
FFE --- FIFO enable: (16550 only)
When logic 1, indicates FIFO mode enabled. Always logic 0 for the 16450.
6
FFE --- FIFO enable: (16550 only)
When logic 1, indicates FIFO mode enabled. Always logic 0 for the 16450.
5
0 --- reserved
4
0 --- reserved
3
IID2 --- Interrupt Identification:
IID1 --- Indicates highest priority interrupt pending if any. See Figure 18.
NOTE: IID2 is always a logic 0 on the 16450 or in non-FIFO mode
IID0 --- on the 16550.
2
1
0
IP --- Interrupt pending:
When logic 0, indicates that an interrupt is pending and the contents of the
interrupt identification register may be used to determine the interrupt
source. See Figure 18.
Figure 17 --- Interrupt Identification Register bit definitions
Figure 18 gives the detail of the IIDx bits in the Interrupt
Identification Register. These bits are examined to determine the source
of an interrupt.
IIDx bits IP Priority Interrupt Type
2
1
don't
care
0
1
N/A
None
0
1
1 0
1st
Receiver Line Status: Indicates overrun, parity, framing errors
or break interrupts. The interrupt is cleared by reading the line
status register.
0
1
0 0
2nd
Received Data Ready (16450 or 16550): Indicates receive data
available. The interrupt is cleared by reading the receive buffer.
In 16550 FIFO mode, indicates the receiver FIFO trigger level
has been reached. The interrupt is reset when the FIFO drops
below the trigger level.
1
1
0 0
2nd
Character Timeout (16550 FIFO mode only): Indicates no
characters have been removed from or input to the receiver
FIFO for the last four character times and there is data present
in the receiver FIFO. The interrupt is cleared by reading the
receiver FIFO.
0
0
1 0
3rd
Transmitter Holding Register Empty : Indicates the transmitter
holding register is empty. The interrupt is cleared by reading
the interrupt identification register or writing to the transmitter
holding register. (Indicates transmit FIFO empty for 16550.)
0
0
0 0
4th
MODEM Status: Indicates clear to send, data set ready, ring
indicator, or data carrier detect have changed state. The
interrupt is cleared by reading the MODEM status register.
Figure 18 --- IIDx bit decoding
Quatech DS-102 User's Manual
17
FIFO CONTROL REGISTER (16550 only)
This register, which applies only to the 16550 UART, is a
write-only register located at I/O address [base+2]. It is used to enable
the FIFO mode, clear the FIFOs, set the threshold level for the receive
FIFO to generate interrupts, and to set the mode under which the device
uses DMA. Note that DMA mode is NOT supported by the DS-102
adapter.
BIT
DESCRIPTION
7
RXT1 ---
6
RXT0 ---
5
0 --- reserved
4
0 --- reserved
3
DMAM --- DMA mode select (16550 only):
When set (logic 1), RxRDY and TxRDY change from mode 0 to mode 1 for
DMA transfers. (DMA mode is not supported on the DS-102.)
2
XRST --- Transmit FIFO reset (16550 only):
When set (logic 1), all bytes in the transmitter FIFO are cleared and the
counter is reset. The shift register is not cleared. XRST is self-clearing.
1
RRST --- Receive FIFO reset (16550 only):
When set (logic 1), all bytes in the receiver FIFO are cleared and the counter
is reset. The shift register is not cleared. RRST is self-clearing.
0
FE --- FIFO enable (16550 only):
When set (logic 1), enables transmitter and receiver FIFOs. When cleared
(logic 0), all bytes in both FIFOs are cleared. This bit must be set when
other bits in the FIFO control register are written to or the bits will be
ignored.
Receiver FIFO Trigger Level (16550 only):
Determines the trigger level for the receiver FIFO interrupt
RXT1
RXT0
Receiver FIFO trigger level (bytes)
0
0
1
0
1
4
1
0
8
1
1
14
Figure 19 --- 16550 FIFO Control Register bit definitions
18
Quatech DS-102 User's Manual
LINE CONTROL REGISTER
This register is located at I/O address [base+3]. It is used for
specifying the format of the asynchronous serial data to be processed by
the UART, and to set the Divisor Latch Access Bit (DLAB) allowing access
to the baud rate divisor latches.
BIT
DESCRIPTION
7
DLAB --- Divisor latch access bit:
DLAB must be set to logic 1 to access the baud rate divisor latches. DLAB
must be set to logic 0 to access the receiver buffer, transmitting holding
register and interrupt enable register.
6
BKCN --- Break control:
When set (logic 1), the serial output (SOUT) is forced to the spacing state
(logic 0).
5
STKP --- Stick parity:
Forces parity to logic 1 or
logic 0 if parity is enabled.
EPS --- Even parity select:
4.00 Selects even or odd parity if
0
parity is enabled.
3
PEN --- Parity enable:
Enables parity on
transmission and verification
on reception.
2
STB --- Number of stop bits:
Sets the number of stop bits
transmitted.
1
0
STKP EPS
x
x
0
0
0
1
1
0
1
1
PEN
0
1
1
1
1
PARITY
None
Odd
Even
Logic 1
Logic 0
STB WLS1 WLS0 WORD LEN STOP BITS
0
0
0
5 bits
1
0
0
1
6 bits
1
0
1
0
7 bits
1
0
1
1
8 bits
1
1
0
0
5 bits
1.5
1
0
1
6 bits
2
1
1
0
7 bits
2
1
1
1
8 bits
2
WLS1 --- Word length select:
Determines the
WLS0 --number of bits per
transmitted word.
Figure 20 --- Line Control Register bit definitions
Quatech DS-102 User's Manual
19
MODEM CONTROL REGISTER
This register is located at I/O address [base+4], and is used to
control the interface with the modem or device used in place of a modem.
This register allows the states of the "modem control signals" to be
changed. These are DTR (Data Terminal Ready) and RTS (Request To
Send). It is also possible to place the UART in a loopback mode for
testing. Finally, the user-defined outputs OUT1 and OUT2 are controlled
from this register.
The DS-102 handles the OUT1 and OUT2 signals in the manner
appropriate for maintaining compatibility with standard PC serial ports:
| The OUT1 output is not connected.
| The OUT2 output is used to globally enable interrupts to
the computer. It should be active at all times if interrupts
are being used.
BIT
DESCRIPTION
7
0 --- reserved
6
0 --- reserved
5
0 --- reserved
4
LOOP --- Loopback enable:
When set (logic 1), the transmitter shift register is connected directly to the
receiver shift register. The MODEM control inputs are internally connected
to the MODEM control outputs and the outputs are forced to the inactive
state. All characters transmitted are immediately received to verify
transmit and receive data paths. Transmitter and receiver interrupts still
operate normally. MODEM control interrupts are available but are now
controlled through the MODEM control register.
3
OUT2 --- Output 2:
When this bit is set (logic 1), the OUT2 output is forced active to a logic 0.
When cleared (logic 0), the OUT2 output is forced inactive to a logic 1.
Used for interrupt enable on the DS-102.
2
OUT1 --- Output 1:
When this bit is set (logic 1), the OUT1 output is forced active to a logic 0.
When cleared (logic 0), the OUT1 output is forced inactive to a logic 1.
Not connected on the DS-102.
1
RTS --- Request to send:
When this bit is set (logic 1), the RTS output is forced active to a logic 0.
When cleared (logic 0), the RTS output is forced inactive to a logic 1.
0
DTR --- Data terminal ready:
When this bit is set (logic 1), the DTR output is forced active to a logic 0.
When cleared (logic 0), the DTR output is forced inactive to a logic 1.
Figure 21 --- Modem Control Register bit definitions
20
Quatech DS-102 User's Manual
LINE STATUS REGISTER
This register is located at I/O address [base+5]. It is used to
provide various types of status information concerning the data transfer.
As Figure 22 shows, the Line Status Register indicates several types of
errors, an empty transmit buffer, a ready receive buffer, or a break on the
receive line.
BIT
DESCRIPTION
7
FFRX --- Error in RCVR FIFO (16550 FIFO mode only):
Always logic 0 in 16450 or 16550 non-FIFO mode.
Indicates one or more parity errors, framing errors, or break indications in the
receiver FIFO. FFRX is reset by reading the line status register.
6
TEMT --- Transmitter empty:
Indicates the transmitter holding register or FIFO (16550) AND the transmitter
shift register are empty and are ready to receive new data. TEMT is reset by
writing a character to the transmitter holding register.
5
THRE --- Transmitter holding register empty:
Indicates the transmitter holding register or FIFO (16550) is empty and it is
ready to accept new data. THRE is reset by writing data to the transmitter
holding register.
4
BI --- Break interrupt:
Indicates the receive data input has been in the spacing state (logic 0) for longer
than one full word transmission time. In 16550 FIFO mode, only one zero
character is loaded into the FIFO and transfers are disabled until the serial data
input goes to the mark state (logic 1) and a valid start bit is received.
3
FE --- Framing error:
Indicates the received character had an invalid stop bit. The stop bit following
the last data or parity bit was a 0 bit (spacing level).
2
PE --- Parity error:
Indicates that the received data does not have the correct parity.
1
OE --- Overrun error:
Indicates the receive buffer was not read before the next character was received
and the character is destroyed. In 16550 FIFO mode, indicates the receive FIFO
is full and another character has been shifted in. The character in the shift
register is destroyed but is not transferred to the FIFO.
0
DR --- Data ready:
Indicates data is present in the receive buffer or FIFO (16550). DR is reset by
reading the receive buffer register or receiver FIFO.
Figure 22 --- Line Status Register bit definitions
Bits BI, FE, PE, and OE are the sources of receiver line status
interrupts. The bits are reset by reading the line status register. In 16550
FIFO mode, these bits are associated with a specific character in the FIFO
and the exception is revealed only when that character reaches the top of
the FIFO.
Quatech DS-102 User's Manual
21
MODEM STATUS REGISTER
This register is located at I/O address [base+6]. It reports on the
status of signals coming from the modem or equipment used in place of a
modem. It allows the current states of "modem control signals" to be
sensed. These signals include the DCD (Data Carrier Detect), RI (Ring
Indicator), DSR (Data Set Ready), and CTS (Clear To Send).
The Modem Status Register also provides change information for
each of these signals. When a modem control signal changes state, the
appropriate change bit is set to logic 1. The change bits (3, 2, 1, and 0) are
reset to logic 0 whenever the Modem Status Register is read.
A modem status interrupt is generated whenever any of bits 3, 2, 1
or 0 is set by the UART to a logic 1.
BIT
DESCRIPTION
7
DCD --- Data carrier detect:
Complement of the DCD input.
6
RI --- Ring indicator:
Complement of the RI input.
5
DSR --- Data set ready:
Complement of the DSR input.
4
CTS --- Clear to send:
Complement of the CTS input.
3
DDCD --- Delta data carrier detect:
Indicates the Data Carrier Detect input has changed state.
Cleared when this register is read.
2
TERI --- Trailing edge ring indicator:
Indicates the Ring Indicator input has changed from a low to a high
state.
Cleared when this register is read.
1
DDSR --- Delta data set ready:
Indicates the Data Set Ready input has changed state.
Cleared when this register is read.
0
DCTS --- Delta clear to send:
Indicates the Clear to Send input has changed state.
Cleared when this register is read.
Figure 23 --- Modem Status Register bit definitions
SCRATCHPAD REGISTER
This register is located at I/O address [base+7]. It is not used by
the 16450 or 16550. It may be used by the programmer for temporary
data storage. The Scratchpad Register is eight bits wide and can be read
or written.
22
Quatech DS-102 User's Manual
FIFO INTERRUPT MODE OPERATION (16550 UART only)
When the receiver FIFO and receiver interrupts are enabled:
1. The receive data interrupt is issued when the receive FIFO reaches
the trigger level. The interrupt is cleared as soon as the receive
FIFO falls below the trigger level.
2. The Interrupt Identification Register's receive data available
indicator is set and cleared along with the receive data interrupt
when the receive FIFO falls below the trigger level.
3. The data ready indicator is set as soon as a character is transferred
into the receiver FIFO and is cleared when the FIFO is empty.
4. A FIFO timeout interrupt will occur if the receive FIFO contains at
least one character, at least four character-times have passed since
receipt of the last character, and the last read of the FIFO by the
CPU was done more than four character-times ago.
5. Timeout interrupts are cleared when a read of the receive FIFO is
done.
6. The receive FIFO timeout timer is reset whenever a new character
is received into the FIFO or a read of the FIFO is done.
When the transmit FIFO and transmit interrupts are enabled:
1. The transmitter holding register empty interrupt occurs when the
transmit FIFO is empty, and is cleared when a character is written
to the FIFO or when the Interrupt Identification Register is read.
2. Transmitter FIFO empty indications are delayed by one
character-time less the last stop bit time when the transmitter
holding register is empty and there have not been at least two
bytes together in the transmit FIFO since the last time the
transmitter holding register was empty.
3. The first transmitter interrupt after enabling the FIFO mode will be
immediate if that interrupt is enabled.
Quatech DS-102 User's Manual
23
FIFO polled mode operation (16550 UART only)
The receiver and transmitter are operated independently, which
would allow either or both to be used in a polled mode rather than using
interrupts to determine when the UART needs to be serviced.
To use the UART in a polled mode, the software is responsible for
continuously checking for the conditions that normally cause interrupts to
occur. This would be done using the Line Status Register.
1. The Data Ready bit will be set to logic 1 whenever there is at least
one byte in the receive FIFO.
2. Errors can be detected using the various error bits.
3. The Transmitter Holding Register Empty bit can be used to
determine when the transmit FIFO is empty.
4. The Transmitter Empty bit indicates that the transmitter shift
register is empty as well as the transmit FIFO being empty.
5. Trigger levels and FIFO timeouts do not apply. Both FIFOs are
fully capable of holding multiple characters at any time.
24
Quatech DS-102 User's Manual
BAUD RATE SELECTION
The 16450 or 16550 UART determines the baud rate of the serial
output using a combination of the clock input frequency and the value
written to the divisor latches. Standard personal computer serial
interfaces use an input clock of 1.8432 MHz. To increase versatility, the
DS-102 uses an 18.432 MHz crystal and a frequency divider circuit to
produce the standard clock frequency.
Jumper block J1 is used to set the frequency input to the UART. It
may be connected to divide the clock input by 1, 2, 5, or 10. A table of
baud rates available using the 1.8432 MHz input is given in Figure 25.
For compatibility with standard serial ports, J1 should be
configured to divide by 10 as shown in Figure 24(d).
J1
4
5
6
4
5
6
1
2
3
1
2
3
Divide-by-1 input clock
(A)
Divide-by-2 input clock
(B)
4
5
6
4
5
6
1
2
3
1
2
3
Divide-by-5 input clock
(C)
Divide-by-10 input clock
Factory default
(D)
Figure 24 --- Input clock frequency options
Quatech DS-102 User's Manual
25
DESIRED BAUD
DIVISOR
RATE
LATCH VALUE
ERROR BETWEEN DESIRED AND
ACTUAL VALUES (%)
50
2304
-
75
1536
-
110
1047
0.026
150
768
-
300
384
-
600
192
-
1200
96
-
1800
64
-
2000
58
0.69
2400
48
-
3600
32
-
4800
24
-
7200
16
-
9600
12
-
19200
6
-
38400
3
-
56000
2
2.86
Figure 25 --- Divisor Latch settings for common baud rates
using 1.8432 MHz input clock
26
Quatech DS-102 User's Manual
VII. SPECIFICATIONS
Bus interface:
Industry Standard Architecture (ISA)
8-bit bus
Serial ports
Controller:
Interface:
Transmit drivers:
High level output voltage:
Low level output voltage:
Switching speed:
MC1488 or compatible
+9V min, +10.5V max
-9V min, -10.5V max
55ns typ, 100ns max
Receive buffers:
High level input voltage:
Low level input voltage:
Switching speed:
MC1489 or compatible
+3V to +13V
-3V to -13V
120ns typ, 175ns max
I/O Address range:
Interrupt levels:
0000H - 07FFH
IRQ2 through IRQ7
Power requirements
+5 volts:
+12 volts:
-12 volts:
Quatech DS-102 User's Manual
16450 (16550 optional)
Two male D-9 connectors
Two male D-25 connectors
optional using adapter cables
390 mA typ, 443 mA max
38 mA typ, 46 mA max
36 mA typ, 43 mA max
27
VIII. TROUBLESHOOTING
Listed here are some common problems and frequent causes of
those problems. Suggestions for corrective action are given. If the
information here does not provide a solution, contact Quatech Customer
Service for technical support.
Any unauthorized repairs or modifications will void the DS-102's
warranty.
Computer will not boot up.
1. Is the DS-102 properly inserted? Remove the card and try again.
Perhaps try a different expansion slot.
2. Is the base address correctly set? Check for address conflicts with
other devices in the system. Set a different address if necessary.
3. The DS-102 may be defective. Contact Quatech Customer Service
for instructions.
Cannot communicate with other equipment.
1. Are the cable connections correct? Are the cables securely
attached?
2. Are the base address and interrupt level (IRQ) for the port correctly
set? Check for address and IRQ conflicts with other devices in the
system. Change the settings if necessary.
3. Are the DTE/DCE configuration jumpers properly set? If you are
trying to communicate with a DTE, a null-modem cable may be
required, or the DS-102 can be set for DCE output.
4. If possible, use a loopback connector to test the port. This
connector needs to connect the following sets of signals:
TxD and RxD (pins 2 and 3)
RTS and CTS (pins 7 and 8)
DCD, DTR, DSR, and RI (pins 1, 4, 6, and 9)
28
Quatech DS-102 User's Manual
DS-102 Dual Channel RS-232 Asynchronous Communications Adapter
User's Manual
Revision 3.00 August 13, 1993
Download PDF