background image

SERIES IP503 INDUSTRIAL I/O PACK                  EIA/TIA-232E & CENTRONICS COMMUNICATION MODULE
___________________________________________________________________________________________

- 16 -

Interrupt priority is assigned as follows.  Initially, with no prior

interrupt history, serial port A has the highest priority and will be
served first, followed by serial port B, then the parallel port.
However, if port A was the last interrupt serviced, then serial port
B will have the highest priority, followed by the parallel port, then
port A, in a last-serviced last-out fashion.  Priority shifts in a
similar fashion if serial port B or the parallel port was the last port
serviced.  This is useful in preventing continuous interrupts on
one port from freezing out interrupt service for another port

Programming The Parallel Port

This board includes a Centronics parallel-port programmed

via the LEM, LIM, and LPC control registers.  These registers
program the extended mode, interrupt source, data direction, and
port signal states for the parallel port.  Parallel data is read from
or written to the line printer port data register (LPT)Status
indication for this port is read from the Line Printer Status
Register (LSR)The interrupt vector for the parallel port is stored in
the Line Printer Interrupt Vector Register (LIV)

The line printer port is either output-only (default mode), or bi-

directional depending on the state of extended mode bit (LEM
register) and data direction control pins (bit 5 of the LPC register)

In Normal Mode (Extended Mode bit 0 of LEM register = 0),

reads to the line printer port data register return the last data
written to the port.  Write operations output data to the parallel
data lines (PD0-PD7)

In Extended Mode (Extended Mode bit 0 of LEM register = 1),

reads to the line printer port data register will return the last data
written to the port if the data direction bit (bit 5 of the LPC
register) is set low (write), or it will return the data that is present
on PD0-PD7 if the data direction bit is set high (read)Write
operations to the line printer port data register latch data into the
output register, but only drive the parallel data lines (PD0-PD7)
when the data direction bit is set low (write)

PROGRAMMING EXAMPLE

The following example will demonstrate the data transfer

between one serial channel of the host IP503 and another node
using an RTS/CTS protocol.  Both nodes will use the FIFO Mode
of operation with a FIFO threshold set at 14 bytes.  The data
format will use 8-bit characters, odd-parity, and 1 stop bit.  Please
refer to Table 31 for address locations.  The “H” following data
refers to the Hexadecimal data format

1 Write 80H to the Line Control Register (LCR)

This sets the Divisor Latch Access bit to permit access to the
two divisor latch bytes used to set the baud rate.  These
bytes share addresses with the Receive and Transmit
buffers, and the Interrupt Enable Register (IER)

2 Write 00H to the Divisor Latch MSB (DLM)Write 34H to the

Divisor Latch LSB (DLL)

This sets the divisor to 52 for 9600 baud (i.e. 9600 = 8MHz 

÷

[16*52] )

3 Write 0BH to the Line Control Register (LCR)

This first turns off the Divisor Latch Access bit to cause
accesses to the Receiver and Transmit buffers and the
Interrupt Enable Register.  It also sets the word length to 8
bits, the number of stop bits to one, and enables odd-parity

4 (OPTIONAL) Write xxH to the Scratch Pad Register

This has no effect on the operation, but is suggested to
illustrate that this register can be used as a 1-byte memory
cell

Alternately, the interrupt vector for the port may be written to
this register and a read will be performed on this register in
response to an interrupt select cycle

5 Write 0FH to the Interrupt Enable Register (IER)

This enables the modem status interrupts and the receiver
line status interrupts.  The modem status interrupt is used to
signal changes in CTS* to handle the protocol.  The line
status interrupt is used to signal error cases, such as parity or
overrun errors.  The modem status interrupts are expected,
but the line status interrupts are not

The received data available and transmit holding buffer
empty interrupts have also been enabled to aide control by
the host CPU in moving data back and forth

6 Write C7H to the FIFO Control Register (FCR)

This enables and initializes the transmit and receive FIFO’s,
and sets the trigger level of the receive FIFO interrupt to 14
bytes

7 Read C1H from the Interrupt Identification Register (IIR)

This is done to check that the device has been programmed
correctly.  The upper nibble “C” indicates that the FIFO’s
have been enabled and the lower nibble “1” indicates that no
interrupts are pending

8 Write 02H to the Modem Control Register (MCR)

This sets the Request-To-Send bit and asserts the RTS*
signal line.  It is used to signal a receiver that the device is
ready to transmit some data.  Note the modem control lines,
either input or output, have no effect on the parallel-to-serial
output data or serial-to-parallel input data.  These lines
interact only through CPU control to provide the handshaking
necessary for this data transfer protocol

9 Read 11H from the Modem Status Register (MSR)

This is an indication from the receiver that the Clear-To-Send
signal has been asserted and that there has been a changes
in the CTS* signal since the last read of the MSR.
Consequently, an interrupt will be generated (using
INTREQ0*) to signal the host CPU that it can begin loading
data into the transmit buffer

10 The host should acknowledge the interrupt to clear it, then

begin writing data repeatedly to the Transmitter Holding
Register

Содержание Series IP503

Страница 1: ...tion Module USER S MANUAL ACROMAG INCORPORATED 30765 South Wixom Road P O BOX 437 Wixom MI 48393 7037 U S A Tel 248 624 1541 Fax 248 624 9234 Copyright 1995 Acromag Inc Printed in the USA Data and spe...

Страница 2: ...toring system This is especially important where economic property loss or human life is involved It is important that the user employ satisfactory overall system design It is agreed between the Buyer...

Страница 3: ...m performance with precision analog I O applications The X suffix of the model number denotes the length in feet Model 5029 944 IP503 Serial Communication Cable A 5 foot long flat 50 pin cable with a...

Страница 4: ...n assignments are unique to each IP model see Table 21 and normally correspond to the pin numbers of the field I O interface connector on the carrier board you should verify this for your carrier boar...

Страница 5: ...ground to safety ground via any device connected to these ports or a ground loop will be produced and this may adversely affect operation The communication cabling of the P2 interface carries digital...

Страница 6: ...ing Little Endian uses even byte addresses to store the low order byte As such use of this module on an ISAbus PC AT carrier board will require the use of the even address locations to access the 8 bi...

Страница 7: ...transmitted then data is right justified to the LSB If parity is used then LCR bit 3 parity enable and LCR bit 4 type of parity are required Status for the receiver is provided via the Line Status Reg...

Страница 8: ...gh to low transition start bit When the start bit is detected a counter is reset and counts the 16x sampling clock to 7 1 2 which is the center of the start bit The receiver then counts from 0 to 15 t...

Страница 9: ...NOT supported by this model FIFO Control Register FCR BIT FUNCTION 0 When set to 1 this bit enables both the Tx and Rx FIFO s All bytes in both FIFO s can be cleared by resetting this bit to 0Data is...

Страница 10: ...m Control Register 1 MCR Bit 4 provides a local loopback feature for diagnostic testing of the UART channel When set high the UART serial output connected to the TXD driver is set to the marking logic...

Страница 11: ...d by a read of the IIR Line Status Register continued LSR Bit FUNCTION PROGRAMMING 6 Transmitter Empty TEMT 0 Not Empty 1 Transmitter Empty set when both the Transmitter Holding Register THR and the T...

Страница 12: ...data lines This register is either output only or bi directional depending on the state of the extended mode bit bit 0 of the LEM register and the data direction control bit bit 5 of the LPC register...

Страница 13: ...interrupt source the ACKN line of the parallel port or bit 2 of the LPS register The serial ports and the parallel port interrupts drive INTREQ0 Bit 0 of this register drives the ENIRQ line of the UA...

Страница 14: ...atus of each channel can be read by the host CPU at any time during operation Two registers are used to report the status of a serial channel the Line Status Register LSR and the Modem Status Register...

Страница 15: ...s the last stop bit time when the following occurs Bit 5 of the LSR THRE is 1 and there is not a minimum of two bytes at the same time in the transmit FIFO since the last time THRE 1The first transmit...

Страница 16: ...Divisor Latch Access bit to permit access to the two divisor latch bytes used to set the baud rate These bytes share addresses with the Receive and Transmit buffers and the Interrupt Enable Register...

Страница 17: ...puters are considered DTE devices while modems are DCE devices The EIA TIA 232E interface is the fifth revision of this standard and defines an unbalanced single ended transmission standard for unidir...

Страница 18: ...ver a null modem cable connection is required to connect two like configured DTE ports due to the imbalance of drivers and receivers see Drawing 4501 572 Pins 1 18 of field I O connector P2 provide co...

Страница 19: ...S INPUT BUSY Pin 11 Input Line Printer Busy Active high signal from the printer that is asserted when the printer is not ready to accept more Data The state of this bit is monitored via Bit 7 of the L...

Страница 20: ...o obtain parts and repair PRELIMINARY SERVICE PROCEDURE Before beginning repair be sure that all of the procedures in Section 2 Preparation For Use have been followed Also refer to the documentation o...

Страница 21: ...t maximum Choose shielded or unshielded cable according to model number The unshielded cable is recommended for digital I O while the shielded cable is recommended for optimum performance with precisi...

Страница 22: ...Boards Application This panel converts the high density ribbon cable connectors coming from the APC8600 carrier board Acromag cable Model 5029 900 to screw terminals for direct wired interfaces This p...

Страница 23: ......

Страница 24: ......

Страница 25: ......

Страница 26: ......

Страница 27: ......

Страница 28: ......

Страница 29: ......

Страница 30: ......

Страница 31: ......

Отзывы: