background image

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. 
  
Bits 3 through 6 control parity and break enable. They are not commonly used for communications 
and should be set to zeroes. 
  
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 or 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; 

 

Manual PCI-ICM-1S 

14

Содержание PCI-ICM-1S

Страница 1: ...MODEL PCI ICM 1S USER MANUAL FILE MPCI ICM 1S C1c...

Страница 2: ...l nor the rights of others IBM PC PC XT and PC AT are registered trademarks of the International Business Machines Corporation Printed in USA Copyright 2000 2005 by Portwell I O Products Inc All right...

Страница 3: ...anty Warranty commences with equipment shipment Following Years Throughout your equipment s lifetime Portwell stands ready to provide on site or in plant service at reasonable rates similar to those o...

Страница 4: ...ap 11 Chapter 4 Address Selection 12 Chapter 5 Programming 13 Table 5 1 Baud Rate Divisor Values 13 Chapter 6 Connector Pin Assignments 16 Table 6 1 Connector Pin Assignments 16 Table 6 2 Data Cable W...

Страница 5: ...y COM Port Compatibility A type 16550 UART is used as the Asynchronous Communication Element ACE It includes a 16 byte FIFO transmit receive buffer to protect against lost data in multitasking operati...

Страница 6: ...control feature the card is ideal for use in Windows applications Specification Communications Interface I O Connection 9 Pin DBM Connector Character length 5 6 7 or 8 bits Parity Even odd or none Sto...

Страница 7: ...Figure 1 1 Block Diagram Manual PCI ICM 1S 7...

Страница 8: ...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...

Страница 9: ...ws 3 1 or any other non PNP compliant 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 car...

Страница 10: ...o 115 200 baud When in the 4x position the baud rate range is up to 460 800 baud Note Refer to Table 5 1 Baud Rate Divisor Values Termination Jumpers A transmission line should be terminated at the re...

Страница 11: ...x1 x4 BAUD 485 422 DB9M TRM OUT TRM IN 4 80 3 30 Figure 3 2 Option Selection Map Manual PCI ICM 1S 11...

Страница 12: ...operating systems Windows95 98 2000 can be queried to determine which resources were assigned In these operating systems you can use either PCIFind DOS or PCINT Windows95 98 NT or the Device Manager u...

Страница 13: ...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 co...

Страница 14: ...ever 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 u...

Страница 15: ...atically enables the transmitter when data are ready to send No software enabling is required The following C code fragment demonstrates this process while data i While there is data to send while inp...

Страница 16: ...6 1 Connector Pin Assignments The following table shows pin connections between two devices for Simplex Half Duplex and Full Duplex operations Mode Card 1 Card 2 Rx pin 9 Tx pin 2 Simplex 2 wire rece...

Страница 17: ...erential drive method is used In a balanced differential system the voltage produced by the driver appears across a pair of wires A balanced line driver will produce a differential voltage from 2 to 6...

Страница 18: ...that end Note You do not have to add a terminator resistor to your cables when you use the PCI ICM 1S card Termination resistors for the RX and RX lines are provided on the card and are placed in the...

Страница 19: ...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...

Страница 20: ...any problems with this manual or just want to give us some feedback please email us at tech portwell com Please detail any errors you find and include your mailing address so that we can send you any...

Отзывы: