background image

Bit 7 is the DLAB discussed earlier. It must be set to zero after the divisor is loaded or else there will be 
no communications. 
 
 
The C command to set the UART for an 8-bit word, no parity, and one stop bit is: 
 
 

outportb(BA3, 0x03) 

 
The final initialization step is to flush the receiver buffers. You do this with two reads from the receiver 
buffer at Base A0. When done, the UART is ready to use. 
 
 

Reception

 
Reception can be handled in two ways: polling and interrupt-driven. When polling, reception is 
accomplished by constantly reading the Line Status Register at Base A5. Bit 0 of this register is 
set high whenever data are ready to be read from the chip. A simple polling loop must continuously check 
this bit and read in data as it becomes available. The following code fragment implements a polling loop 
and uses a value of 13, (ASCII Carriage Return) as an end-of-transmission marker: 
 

do 

while (!(inportb(BA5) & 1));    

/*Wait until data ready*/ 

data[i++]= inportb(BASEADDR); 

while (data[i]!=13);  

 

 

 

/*Reads the line until null character rec'd*/ 

 

Interrupt-driven communications should be used whenever possible and is required for high data rates. 
Writing an interrupt-driven receiver is not much more complex than writing a polled receiver but care 
should be taken when installing or removing your interrupt handler to avoid writing the wrong interrupt, 
disabling the wrong interrupt, or turning interrupts off for too long a period. 
 
The handler would first read the Interrupt Identification Register at Base A2. If the interrupt is for 
Received Data Available, the handler then reads the data. If no interrupt is pending, control exits the 
routine. A sample handler, written in C, is as follows: 
 

readback = inportb(BA2); 
if (readback & 4)  

 

 

/*Readback will be set to 4 if data are available*/ 

data[i++]=inportb(BASEADDR); 
outportb(0x20,0x20); 

 

  /*Write 

EOI to 8259 Interrupt Controller*/ 

return; 

 
 

Transmission

 
RS422 transmission is simple to implement. The AUTO feature of the card automatically enables the 
transmitter when data is ready to send so no software enabling is required. The following software 
example is for non-AUTO operation. 
 
To transmit a string of data, the transmitter must first check Bit 5 of the Line Status Register at Base 
A5. That bit is the transmitter-holding-register-empty flag. If it is high, the transmitter has sent the 
data. The process of checking the bit until it goes high followed by a write is repeated until no data 
remains. 

Manual PCI-COM-422/4 

16

Summary of Contents for PCI-COM422/4

Page 1: ...l service in house repair center WE BUY USED EQUIPMENT Sell your excess underutilized and idle used equipment We also offer credit for buy backs and trade ins www artisantg com WeBuyEquipment REMOTE INSPECTION Remotely inspect equipment before purchasing with our interactive website at www instraview com LOOKING FOR MORE INFORMATION Visit us on the web at www artisantg com for more information on ...

Page 2: ...10623 Roselle Street San Diego CA 92121 858 550 9559 FAX 858 550 7322 contactus accesio com www accesio com MODEL PCI COM422 4 USER MANUAL FILE MPCICOM422 4 E1d ...

Page 3: ...hers IBM PC PC XT and PC AT are registered trademarks of the International Business Machines Corporation Printed in USA Copyright 1995 2005 by ACCES I O Products Inc 10623 Roselle Street San Diego CA 92121 All rights reserved WARNING ALWAYS CONNECT AND DISCONNECT YOUR FIELD CABLING WITH THE COMPUTER POWER OFF ALWAYS TURN COMPUTER POWER OFF BEFORE INSTALLING A CARD CONNECTING AND DISCONNECTING CABL...

Page 4: ...y warranty Warranty commences with equipment shipment Following Years Throughout your equipment s lifetime ACCES stands ready to provide on site or in plant service at reasonable rates similar to those of other manufacturers in the industry Equipment Not Manufactured by ACCES Equipment provided but not manufactured by ACCES is warranted and will be repaired according to the terms and conditions of...

Page 5: ...llation 8 Chapter 3 Option Selection 10 Figure 3 1 Simplified Termination Schematic 10 Figure 3 2 Option Selection Map 12 Chapter 4 Address Selection 13 Chapter 5 Programming 14 Table 5 1 Baud Rate Divisor Values 15 Chapter 6 Connector Pin Assignments 18 Table 6 1 Connector Pin Assignments 18 Manual PCI COM 422 4 4 ...

Page 6: ... default and supports termination by jumpers on the card If your application requires the transmitter to be un biased please contact the factory COM Port Compatibility Type 16550 UARTs are used as the Asynchronous Communication Element ACE These include a 16 byte transmit receive buffer to protect against lost data in multitasking operating systems while maintaining 100 percent compatibility with ...

Page 7: ...es up to 460 800 is achieved by jumper selection on the card Type 16550 buffered UART Address Continuously mappable within 0000 to FFFF hex range of PCI bus addresses Conforms to PCI Specification 2 1 Receiver Input Sensitivity 200 mV differential input Common Mode Rejection 12V to 7V Transmitter Output Drive Capability 60 mA with thermal shutdown Environmental Operating Temperature Range 0 C to 6...

Page 8: ...Figure 1 1 Block Diagram Only One Serial Channel Shown Manual PCI COM 422 4 7 ...

Page 9: ...tallation The following instructions assume the CD ROM drive is drive D Please substitute the appropriate drive letter for your system as necessary DOS 1 Place the CD into your CD ROM drive 2 Type B to change the active drive to the CD ROM drive 3 Type GLQR JJ to run the install program 4 Follow the on screen prompts to install the software for this board WINDOWS 1 Place the CD into your CD ROM dr...

Page 10: ...operating system should set the PNP CMOS option to BIOS or Motherboard Save the option and continue booting the system 9 Most computers should auto detect the card depending on the operating system and automatically finish installing the drivers 10 Run PCIfind exe to complete installing the card into the registry for Windows only and to determine the assigned resources 11 Run one of the provided s...

Page 11: ...so terminate the COM A port place a jumper at the location labeled LDAO To terminate the COM B COM C and COM D ports place jumpers at locations labeled LDBO LDCO and LDDO respectively Similarly inputs are terminated at jumpers labeled LDAI LDB1 etc Also for RS422 operation there must be a bias on the Tx and Tx lines If the card is not to provide that bias contact the factory technical support Data...

Page 12: ...wsNT Workstation Resource Kit CD For example if you have a four port card configured to use address 0xFFF0 with an interrupt of 0xFFF8 the values in the Registry are assuming that every port is configured to use the same IRQ and that the addresses are configured to be consecutive and contiguous Serial2 Subkey PortAddress REG_DWORD 0xFFF0 Interrupt REG_WORD 5 DosDevices REG_SZ COM3 InterruptStatus ...

Page 13: ...Figure 3 2 Option Selection Map Manual PCI COM 422 4 12 ...

Page 14: ...spective IRQs if any allotted Alternatively some operating systems Windows95 98 2000 can be queried to determine which resources were assigned In these operating systems you can use either PCIFind Windows95 or PCINT WindowsNT or the Device Manager utility from the System Properties Applet of the control panel The card is installed in the Data Acquisition class of the Device Manager list Selecting ...

Page 15: ...nstalls into Windows as COM ports Thus the Windows standard API functions can be used In particular CreateFile and CloseHandle for opening and closing a port SetupComm SetCommTimeouts GetCommState and SetCommState to set and change a port s settings ReadFile and WriteFile for accessing a port See the documentation for your chosen language for details Under DOS the process is very different The rem...

Page 16: ...200 96 4000 ft These are theoretical maximums based on typical conditions and good quality cables based on the EIA 485 and EIA 422 standard for balanced differential drivers RS 232 communication lines have a maximum length of 50 feet regardless of speed Table 5 1 Baud Rate Divisor Values In C the code to set the chip to 9600 baud is outportb BASEADDR 0x0C outportb BASEADDR 1 0 The second initializ...

Page 17: ... rates Writing an interrupt driven receiver is not much more complex than writing a polled receiver but care should be taken when installing or removing your interrupt handler to avoid writing the wrong interrupt disabling the wrong interrupt or turning interrupts off for too long a period The handler would first read the Interrupt Identification Register at Base Address 2 If the interrupt is for ...

Page 18: ... Set RTS bit without altering states of other bits while data i While there is data to send while inportb BASEADDR 5 0x20 Wait until transmitter is empty outportb BASEADDR data i i outportb BASEADDR 4 inportb BASEADDR 4 0xFD Reset RTS bit without altering states of other bits Manual PCI COM 422 4 17 ...

Page 19: ...nector is used for interfacing to communication lines The connector is equipped with 4 40 threaded standoffs female screw lock to provide strain relief Pin No RS422 Signals 1 Rx 2 Tx 3 Tx 4 5 GND Ground 6 7 8 9 Rx Table 6 1 Connector Pin Assignments Manual PCI COM 422 4 18 ...

Page 20: ...give us some feedback please email us at manuals accesio com Please detail any errors you find and include your mailing address so that we can send you any manual updates 10623 Roselle Street San Diego CA 92121 Tel 858 550 9559 FAX 858 550 7322 www accesio com Manual PCI COM 422 4 19 ...

Page 21: ...l service in house repair center WE BUY USED EQUIPMENT Sell your excess underutilized and idle used equipment We also offer credit for buy backs and trade ins www artisantg com WeBuyEquipment REMOTE INSPECTION Remotely inspect equipment before purchasing with our interactive website at www instraview com LOOKING FOR MORE INFORMATION Visit us on the web at www artisantg com for more information on ...

Reviews: