background image

SERIES IOS-521 I/O SERVER MODULE                            EIA/TIA-422B SERIAL COMMUNICATION MODULE 
__________________________________________________________________________________________

 

- 15 - 

stack it into the data buffer or FIFO and these conditions are 
configured via bits 0-3 of the Enhanced Feature Register (EFR). 
 

Programming Example 

 

The following example will demonstrate data transfer 

between one channel of the host IOS-521 and another node. 
Both nodes will use the FIFO Mode of operation with a FIFO 
threshold set at 60 bytes.  The data format will use 8-bit 
characters, odd-parity, and 1 stop bit. 

 

Please refer to Table 3.1 for addr

ess locations.  The “H” following 

data below refers to the Hexadecimal 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 60H to the 

Divisor Latch LSB (DLL). 

 

This sets the divisor to 96 for 9600 baud (i.e. 9600 = 
14.7456MHz   [16*96] ). 
 

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.  Optionally, this register is also used to store the 
interrupt vector for the port.  A read of this register will be 
performed in response to an interrupt cycle. 
 

5.   Write 07H to the Interrupt Enable Register (IER). 
 

This is the first step to enable the receiver line status 
interrupt.  Note bit-

3 of the MCR must also be set to logic “1” 

to enable interrupts.  The line status interrupt is used to 
signal error cases, such as parity or overrun errors.  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 60 
bytes. 

 
7.   Read C1H from the Interrupt Status Register (ISR). 
 

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 0AH to the Modem Control Register (MCR). 
 

This enables interrupts and sets the Ready-To-Send bit and 
asserts the RTS* signal line.  It is used to enable transmit 
data output for the port.  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.   The host should begin writing data repeatedly to the 

Transmitter Holding Register. 

 

This loads the transmit FIFO and initiates transmission of 
serial data on the TxD line.  The first serial byte will take 
about 100us to transmit, so it is likely that the transmit FIFO 
will fill before the first byte has been sent. 

 
10.  Read data repeatedly from the Receiver Buffer Register. 
 

After 60 bytes have been received (or fewer bytes with a 
timeout), an interrupt will be generated.  INTREQ0* will go 
active to signal the host CPU that it can begin reading the 
receive FIFO. 
 

11  The host should acknowledge the interrupt  
 

To acknowledge and clear it, an interrupt select cycle should 
be executed.  Then begin reading the receive FIFO data. 
 

 

Содержание IOS-521 Series

Страница 1: ...G INCORPORATED Tel 248 295 0310 30765 South Wixom Road Fax 248 624 9234 P O BOX 437 Wixom MI 48393 7037 U S A solutions acromag com Copyright 2009 2011 Acromag Inc Printed in the USA Data and specific...

Страница 2: ...pecially 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 and Acromag that this i...

Страница 3: ...ver Modules installed on Acromag Industrial I O Server systems This software Model IOSSW DEV WIN consists of a low level driver and Windows 32 Dynamic Link Libraries DLLS that are compatible with a nu...

Страница 4: ...nd which is typically common to safety chassis ground when mounted on a carrier board and inserted in a backplane As such be careful not to attach signal ground to safety ground via any device connect...

Страница 5: ...1 R W Xoff 2 High Byte BF Hex 0E 11 1F Not Driven1 Port B Registers Organized as Port A3 10 1E 21 2F Not Driven1 Port C Registers Organized as Port A3 20 2E 31 3F Not Driven1 Port D Registers Organize...

Страница 6: ...lag in the LSR register will be set to a logic 1 when at least one FIFO location is available DLL DLM Divisor Latch Registers Ports A H R W The Divisor Latch Registers form the divisor used by the int...

Страница 7: ...ansitions from a logic 0 to a logic 1 RTS is not output by this module Instead RTS is used to enable the transmitter of the port This interrupt should always be disabled 71 0 Disable CTS Interrupt 1 E...

Страница 8: ...register control the format of the data character as follows Line Control Register LCR Bit FUNCTION PROGRAMMING 1 0 Word Length Sel 0 0 5 Data Bits 0 1 6 Data Bits 1 0 7 Data Bits 1 1 8 Data Bits 2 S...

Страница 9: ...ne The crystal frequency is unchanged 1 Divide by four After the crystal frequency is divided by 16 it is further divided by 4 see Table 3 2 Notes Modem Control Register 1 MCR Bit 4 provides a local l...

Страница 10: ...f the FIFO Line Status Register continued LSR Bit FUNCTION PROGRAMMING 4 Break Interrupt BI 0 No Break 1 Break the received data input has been held in the space logic 0 state for more then a full wor...

Страница 11: ...1 IOS module The EXAR UART maintains compatibility with the industry standard 16C554 654 and 68C554 654 UARTs and provides new features to enhance serial communication operation The new features provi...

Страница 12: ...nformation includes unique information required for the module The IOS 521 ID Space does not contain any variable e g unique calibration information ID Space bytes are addressed using only the even ad...

Страница 13: ...ive FIFO s simply hold characters and the Line Status Register must be read to determine the channel status FIFO Polled Mode Resetting all Interrupt Enable Register IER bits to 0 with FIFO Control Reg...

Страница 14: ...H then port A in a last serviced last out fashion Priority continues to shift in the same fashion if Port B or Port C was the last interrupt serviced This is useful in preventing continuous interrupt...

Страница 15: ...s the first step to enable the receiver line status interrupt Note bit 3 of the MCR must also be set to logic 1 to enable interrupts The line status interrupt is used to signal error cases such as par...

Страница 16: ...gic 1 by a negative voltage The line receivers convert these signals to the conventional TTL level associations EIA TIA 422B BINARY 0 SPACE OFF BINARY 1 MARK ON SIGNAL A to B to Positive Differential...

Страница 17: ...serted An Asterisk is used to indicate an active low signal IOS 521 OPERATION Connection to each serial port is provided through connector P2 refer to Table 2 1 These pins are tied to the inputs and o...

Страница 18: ...ake adequate measures UART EXAR XR16C654 RS422 RS485 PORTS Channel Configuration Eight independent non isolated EIA TIA 422B serial ports with a common signal return connection Data Rate 921 6K bits s...

Страница 19: ...COMMON GND IOS 521 BLOCK DIAGRAM T T T B R R R R I O RS 422B INTERFACE RxD RS 422 485 DRIVERS RECEIVERS RxD TxD PORT I O CONTROL BUS ADDRESS BUS 5V CONTROL LOGIC SUPPLY FILTERING NOTE TERMINATION RES...

Страница 20: ...TE OF THE TxD RxD DATA PAIRS ARE HIGH ON TxD RxD THIS CORRESPONDS TO A MARK 1 ON THE DATA LINE NOTES CONCERNING RESISTOR PLACEMENT AND REMOVAL FOR RT AND RB 4 THE TxD LINE SOURCED FROMA PORT CAN BE PE...

Страница 21: ...PORT C RxD H TERMINATION TxD C TERMINATION RxD C TERMINATION 120 OHM 120 OHM 120 OHM PORT E TxD E TERMINATION PORT H PORT E RxD E TERMINATION TxD H TERMINATION 120 OHM 120 OHM 120 OHM PORT B RxD B TER...

Отзывы: