background image

Initialization

  
Initializing the chip requires knowledge of the UART’s register set. The first step is to set the baud rate 
divisor. You do this by first setting the DLAB (Divisor Latch Access Bit) high. This bit is Bit 7 at Base 
A3. In C code, the call would be: 

  
outportb(BA3,0x80); 

  
You then load the divisor into Base A0 (low byte) and Base A1 (high byte). The 
following equation defines the relationship between baud rate and divisor: 
  

Desired Baud Rate = (UART clock frequency) ÷ (32 * divisor) 

  
When the Baud jumper is in the X1 position, the UART clock frequency is 1.8432 Mhz. When the 
jumper is in the X4 position, the clock frequency is 7.3728 Mhz. The following table lists popular divisor 
frequencies. Note that there are two columns to consider depending on the position of the Baud jumper.  

  

Baud Rate  Divisor x1

Divisor x4 

Max Diff. Cable Length* 

460800 - 

550 

ft 

230400 - 

1400 

ft 

153600 - 

2500 

ft 

115200 1 

3000 

ft 

57600 2 

4000 

ft 

38400 3 

12 

4000 

ft 

28800 4 

16 

4000 

ft 

19200 6 

24 

4000 

ft 

14400 8 

32 

4000 

ft 

9600 

12 

48 – Most Common 4000 ft 

4800 24  96 

4000 

ft 

2400 48  192 

4000 

ft 

1200 96  384 

4000 

ft 

 

* Recommended maximum distances for differentially driven data cables (RS422 or RS485) are for typical conditions. 

Table 5-1: 

Baud Rate Divisor Values

 

In C, the code to set the chip to 9600 baud is: 
  

outportb(BASEADDR, 0x0C); 
outportb(BA1,0); 

  
The second initializing step is to set the Line Control Register at Base A 3. This register 
defines word length, stop bits, parity, and the DLAB. Bits 0 and 1 control word length and allow word 
lengths from 5 to 8 bits. Bit settings are extracted by subtracting 5 from the desired word length. Bit 2 
determines the number of stop bits. There can be either one or two stop bits. If Bit 2 is set to 0, there 
will be one stop bit. If Bit 2 is set to 1, there will be two stop bits. Bits 3 through 6 control parity and 
break enable. They are not commonly used for communications and should be set to zero. Bit 7 is the 
DLAB discussed earlier. It must be set to zero after the divisor is loaded or else there will be no 
communication. 
  
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. 

Manual PCI-COM-1S 

14

Summary of Contents for LPCI-COM-1S

Page 1: ...ess underutilized and idle equipment along with credit for buybacks and trade ins Custom engineering so your equipment works exactly as you specify Critical and expedited services Leasing Rentals Demo...

Page 2: ...10623 Roselle Street San Diego CA 92121 858 550 9559 FAX 858 550 7322 contactus accesio com www accesio com MODEL PCI COM 1S USER MANUAL FILE MPCI COM 1S Ca...

Page 3: ...thers 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...

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 thos...

Page 5: ...Address Selection 12 Chapter 5 Programming 13 Initialization 14 Table 5 1 Baud Rate Divisor Values 14 Chapter 6 Connector Pin Assignments 17 Table 6 1 Connector Pin Assignments 17 Appendix A Applicati...

Page 6: ...biased please contact the factory COM Port Compatibility A 16550 UART is used as the Asynchronous Communication Element ACE It includes 16 byte transmit receive FIFO buffers to protect against lost d...

Page 7: ...yle connector compatible with RS422 and RS485 specifications Character length 5 6 7 or 8 bits Parity Even odd or none Stop Interval 1 1 5 or 2 bits Serial Data Rates Up to 115 200 baud Asynchronous Fa...

Page 8: ...TRANSCEIVER AUTO RTS CIRCUITRY OSCILLATOR PCI INTERFACE CHIP UART 16550 OR SIMILAR CO MPUTER PCI BUS DB9M Tx Rx Tx Rx RS485 MODE ONLY Tx Rx IRQ Figure 1 1 Block Diagram Manual PCI COM 1S 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 t...

Page 10: ...uter cover and turn ON the computer Enter the CMOS setup program of your system and verify that the PCI plug and play option is set appropriately for your system Systems running Windows 95 98 2000 XP...

Page 11: ...85 operations where there are multiple terminals only the RS485 ports at each end of the network should have terminating resistors as described above Also for RS485 operation there must be a bias on t...

Page 12: ...TERMOUT 485 422 TERMIN X4 X1 4 80 1 80 Figure 3 1 Option Selection Map Manual PCI COM 1S 11...

Page 13: ...any allotted Alternately some operating systems Windows 95 98 2000 can be queried to determine which resources were assigned In these operating systems you can use either PCIFind or the Device Manager...

Page 14: ...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...

Page 15: ...4000 ft 1200 96 384 4000 ft Recommended maximum distances for differentially driven data cables RS422 or RS485 are for typical conditions Table 5 1 Baud Rate Divisor Values In C the code to set the ch...

Page 16: ...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...

Page 17: ...t 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 After all data has been transmitted the RTS bit sho...

Page 18: ...9 Rx Receive Data Table 6 1 Connector Pin Assignments Data Cable Wiring The following table shows pin connections between two devices for Simplex Half Duplex and Full Duplex operations Mode Card 1 Ca...

Page 19: ...ve Balanced Differential Signals The reason that RS422 and RS485 devices can drive longer lines with more noise immunity than RS232 devices is that a balanced differential drive method is used In a ba...

Page 20: ...characteristic impedance of the cable Note You do not have to add a terminator resistor to your cables when you use the card Termination resistors for the RX and RX lines are provided on the card and...

Page 21: ...that one node be a master node and all others be slaves The network is connected so that the master communicates to all slaves and all slaves communicate only with the master This has advantages in eq...

Page 22: ...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 Dieg...

Page 23: ...uipment Have surplus equipment taking up shelf space We ll give it a new home Learn more Visit us at artisantg com for more info on price quotes drivers technical specifications manuals and documentat...

Reviews: