
User Manual for ASSURED SYSTEMS models including: 104-COM232-8, 104-COM232-8 Official ACCES I-O Distributor and Integrator, 104-COM232-8, Official ACCES I-O Distributor and Integrator, ACCES I-O Distributor and Integrator, Distributor and Integrator, Integrator
PCI-ICM-1S - Distributeur et intégrateur officiel d'ACCES I/O
PCI-COM485/4 | Official ACCES I/O Distributor and Integrator
File Info : application/pdf, 23 Pages, 330.17KB
DocumentDocumentACCES I/O 104-COM232-8 Get Quote
10623 Roselle Street, San Diego, CA 92121 y (858) 550-9559 y Fax (858) 550-7322 contactus@accesio.com y www.accesio.com
EIGHT, FOUR, OR TWO-PORT RS-232 PC/104 SERIAL COMMUNICATION BOARD MODELS 104-COM232-8 (4, 2) USER MANUAL
File M104-COM232-8.B2j
www.assured-systems.com | sales@assured-systems.com
Page 1/23
ACCES I/O 104-COM232-8 Get Quote
Notice
The information in this document is provided for reference only. ACCES does not assume any liability arising out of the application or use of the information or products described herein. This document may contain or reference information and products protected by copyrights or patents and does not convey any license under the patent rights of ACCES, 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 2003, 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 BOARD. CONNECTING AND DISCONNECTING CABLES, OR INSTALLING BOARDS INTO A SYSTEM
WITH THE COMPUTER OR FIELD POWER ON MAY CAUSE DAMAGE TO THE I/O BOARD AND WILL VOID ALL WARRANTIES, IMPLIED OR
EXPRESSED.
2
Manual 104-COM232-8
www.assured-systems.com | sales@assured-systems.com
Page 2/23
ACCES I/O 104-COM232-8 Get Quote
Warranty
Prior to shipment, ACCES equipment is thoroughly inspected and tested to applicable specifications. However, should equipment failure occur, ACCES assures its customers that prompt service and support will be available. All equipment originally manufactured by ACCES which is found to be defective will be repaired or replaced subject to the following considerations.
Terms and Conditions
If a unit is suspected of failure, contact ACCES' Customer Service department. Be prepared to give the unit model number, serial number, and a description of the failure symptom(s). We may suggest some simple tests to confirm the failure. We will assign a Return Material Authorization (RMA) number which must appear on the outer label of the return package. All units/components should be properly packed for handling and returned with freight prepaid to the ACCES designated Service Center, and will be returned to the customer's/user's site freight prepaid and invoiced.
Coverage
First Three Years: Returned unit/part will be repaired and/or replaced at ACCES option with no charge for labor or parts not excluded by 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 the respective equipment manufacturer's warranty.
General
Under this Warranty, liability of ACCES is limited to replacing, repairing or issuing credit (at ACCES discretion) for any products which are proved to be defective during the warranty period. In no case is ACCES liable for consequential or special damage arriving from use or misuse of our product. The customer is responsible for all charges caused by modifications or additions to ACCES equipment not approved in writing by ACCES or, if in ACCES opinion the equipment has been subjected to abnormal use. "Abnormal use" for purposes of this warranty is defined as any use to which the equipment is exposed other than that use specified or intended as evidenced by purchase or sales representation. Other than the above, no other warranty, expressed or implied, shall apply to any and all such equipment furnished or sold by ACCES.
3
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 3/23
ACCES I/O 104-COM232-8 Get Quote
TABLE OF CONTENTS
Chapter 1: FUNCTIONAL DESCRIPTION...........................................................................5
Figure 1-1: BLOCK DIAGRAM .................................................................................................................. 5
Chapter 2: INSTALLATION.................................................................................................6 Chapter 3: OPTION SELECTION ......................................................................................11
Figure 3-1: Option Selection Map............................................................................................................ 11
Chapter 4: ADDRESS SELECTION ..................................................................................13
Table 4-1: Standard Address Assignments for Computers ..................................................................... 13
Chapter 5: PROGRAMMING .............................................................................................15 Chapter 6: CONNECTOR PIN ASSIGNMENTS ................................................................19
Connector P2 (4- and 8-port boards) .................................................................................................... 19 Connector P3 (8-port board only) ......................................................................................................... 20
Chapter 7: SPECIFICATION..............................................................................................21
4
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 4/23
ACCES I/O 104-COM232-8 Get Quote
Chapter 1: FUNCTIONAL DESCRIPTION
This serial interface board contains either eight, four, or two independent ports and provides effective RS232 communication. The boards are designed in the PC/104 format. It's dimensions are approximately 3.775 inches X 3.550 inches. Signal connections are made on the eightport model through two 40 pin connectors, mounted on edges of the board; four-port models connect through only one 40-pin header and two-port models connect through only one 20-pin header.
IRQ SUPPORT The board supports the use of IRQ resources, and includes an on-board IRQ status register for use with operating systems that support this feature, such as Microsoft's Windows NT. The status register is located at an address of the COM A address + 400H.
PC/104 BUS 40 PIN HEADER
WITH AUTO-RTS
CIRCUITRY
Figure 1-1: BLOCK DIAGRAM (Only one serial channel shown)
5
Manual 104-COM232-8
www.assured-systems.com | sales@assured-systems.com
Page 5/23
ACCES I/O 104-COM232-8 Get Quote
Chapter 2: INSTALLATION
A printed Quick-Start Guide (QSG) is packed with the board for your convenience. If you've already performed the steps from the QSG, you may find this chapter to be redundant and may skip forward to begin developing your application.
The software provided with this PC/104 Board is on CD and must be installed onto your hard disk prior to use. To do this, perform the following steps as appropriate for your operating system.
CD Installation
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 drive. 2. The system should automatically run the install program. If the install program does not run
promptly, click START | RUN and type BGLQR?JJ, click OK or press -. 3. Follow the on-screen prompts to install the software for this board.
LINUX 1. Please refer to linux.htm on the CD-ROM for information on installing serial ports under linux.
6
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 6/23
ACCES I/O 104-COM232-8 Get Quote
Installing the Hardware
Before installing the board, carefully read Chapter 3 and Chapter 4 of this manual and configure the board according to your requirements. The SETUP Program can be used to assist in configuring jumpers on the board. Be especially careful with Address Selection. If the addresses of two installed functions overlap, you will experience unpredictable computer behavior. To help avoid this problem, refer to the FINDBASE.EXE program installed from the CD. The setup program does not set the options on the board, these must be set by jumpers.
This multi-port serial communication board uses software-programmable address ranges for each UART, stored in an onboard EEPROM. Configure the address of the EEPROM using the onboard Address Selection jumper block, then use the provided Setup program to configure addresses for each onboard UART.
To Install the Board
1. Install jumpers for selected options and base address according to your application requirements, as mentioned above.
2. Remove power from the PC/104 stack. 3. Assemble standoff hardware for stacking and securing the boards. 4. Carefully plug the board onto the PC/104 connector on the CPU or onto the stack, ensuring proper
alignment of the pins before completely seating the connectors together. 5. Install I/O cables onto the board's I/O connectors and proceed to secure the stack together or repeat
steps 3-5 until all boards are installed using the selected mounting hardware. 6. Check that all connections in your PC/104 stack are correct and secure then power up the system. 7. Run one of the provided sample programs appropriate for your operating system that was installed
from the CD to test and validate your installation.
Installing COM Ports in Windows Operating Systems
*NOTE: COM boards can be installed in virtually any operating system and we do support installation in earlier versions of Windows, and are very likely to support future version as well. For use in WinCE, contact the factory for specific instructions.
Windows NT4.0
To install the COM ports in Windows NT4 you'll need to change one entry in the registry. This entry enables IRQ sharing on multi-port COM boards. The key is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Serial\. The name of the value is PermitShare and the data should be set to 1.
You'll then add the board's ports as COM ports, setting the base addresses and IRQs to match your board's settings.
To change the registry value, run RegEdit from the START|RUN menu option (by typing REGEDIT [ENTER] in the space provided). Navigate down the tree view on the left to find the key, and double click on the name of the value to open a dialog allowing you to set the new data value.
7
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 7/23
ACCES I/O 104-COM232-8 Get Quote
To add a COM port, use START|CONTROL PANEL|PORTS applet and click ADD, then enter the correct UART address and Interrupt number. When the "Add New Port" dialog is configured click OK, but answer "Don't Restart Now" when prompted, until you've added any other ports as well. Then restart the system normally, or by selecting "Restart Now."
Windows XP
To install the COM ports in Windows XP you will be manually installing "standard" communications ports, then changing the settings for resources used by the ports to match the hardware. Run the "Add Hardware" applet from the Control Panel. Click "Next" at the "Welcome to the Add New Hardware Wizard" dialog. You'll briefly see a "...searching..." message, then Select "Yes, I have already connected the hardware" and Click "Next"
Select "Add a new hardware device" from the bottom of the list presented and Click "Next." Select "Install the hardware that I manually select from a list" and Click "Next." Select "Ports (COM & LPT) and Click "Next" Select "(Standard Port Types)" and "Communications Port" (the defaults), Click "Next." Click "Next."
8
Manual 104-COM232-8
www.assured-systems.com | sales@assured-systems.com
Page 8/23
ACCES I/O 104-COM232-8 Get Quote
Click the "View or change resources for this hardware (Advanced)" link.
Click the "Set Configuration Manually" button. Select "Basic Configuration 8" from the "Settings Based on:" drop-down list. Select "I/O Range" in the "Resource Settings" box and Click the "Change Settings..." button. Enter the base address of the board, and Click "OK"
9
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 9/23
ACCES I/O 104-COM232-8 Get Quote
Select "IRQ" in the "Resource Settings" box and Click the "Change Settings" button. Enter the IRQ of the board and Click "OK". Close the "Set Configuration Manually" dialog and Click "Finish." Click "Do Not Reboot" if you wish to install more ports. Repeat all of the above steps, entering the same IRQ but using the configured Base address for each additional UART. When you are done installing ports, reboot the system normally.
10
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 10/23
ACCES I/O 104-COM232-8 Get Quote
Chapter 3: OPTION SELECTION
P2
Pin 1
P3
Pin 1
Figure 3-1: Option Selection Map
To help you locate the jumpers described in this section, refer to the Option Selection Map above. Operation of the serial communications section is determined by jumper installation as described in the following paragraphs.
DATA CABLE WIRING The following connections are used to communicate between two ports (usually on different devices):
Mode RS-232
Cable Pins
Port 1
to
RX
to
Port 2 TX
TX
to
RX
Ground
to Ground
INTERRUPTS: The board supports interrupt levels 2, 3, 5, 7, 10, and 11 (Except those reserved by other installed hardware). The same interrupt is used for all channels, it must be entered into the interrupt location in the EEPROM.
11
Manual 104-COM232-8
www.assured-systems.com | sales@assured-systems.com
Page 11/23
ACCES I/O 104-COM232-8 Get Quote
Please note: In WindowsNT, changes must be made to the System Registry to support IRQ sharing. The following is excerpted from "Controlling Multiport Serial I/O Boards" provided by Microsoft in the MSDN library.Document id: mk:@ivt:nt40res/D15/S55FC.HTM, also available in the Windows NT Resource Kit. The text enclosed in brackets ("[]") denotes a comment by ACCES.
The Microsoft serial driver can be used to control many dumb multiport serial boards. Dumb indicates that the control includes no on-board processor. Each port of a multiport board has a separate subkey under the CurrentControlSet\Services\Serial subkey in the Registry. In each of these subkeys, you must add values for DosDevices, Interrupt, InterruptStatus, Port Address, and PortIndex because these are not detected by the Hardware Recognizer. (For descriptions and ranges for these values, see Regentry.hlp, the Registry help file on the Windows NT Workstation Resource Kit CD.)
For example, if you have an eight-port COM board configured to use address 0x100 with an interrupt of 0x5, the values in the Registry are: [assuming every port is configured to use the same IRQ, and the addresses are configured to be consecutive and contiguous]
Serial2 subkey: PortAddress = REG_DWORD 0x100 Interrupt = REG_DWORD 5 DosDevices = REG_SZ COM3 InterruptStatus = REG_DWORD 0x500 PortIndex = REG_DWORD 1
Serial3 subkey: PortAddress = REG_DWORD 0x108 Interrupt = REG_DWORD 5 DosDevices = REG_SZ COM4 InterruptStatus = REG_DWORD 0x500 PortIndex = REG_DWORD 2
Serial4 subkey: PortAddress = REG_DWORD 0x110 Interrupt = REG_DWORD 5 DosDevices = REG_SZ COM5 InterruptStatus = REG_DWORD 0x500 PortIndex = REG_DWORD 3
Serial5 subkey: PortAddress = REG_DWORD 0x118 Interrupt = REG_DWORD 5 DosDevices = REG_SZ COM6 InterruptStatus = REG_DWORD 0x500 PortIndex = REG_DWORD 4
Serial6 subkey: PortAddress = REG_DWORD 0x120 Interrupt = REG_DWORD 5 DosDevices = REG_SZ COM7 InterruptStatus = REG_DWORD 0x500 PortIndex = REG_DWORD 5
Serial7 subkey: PortAddress = REG_DWORD 0x128 Interrupt = REG_DWORD 5 DosDevices = REG_SZ COM8 InterruptStatus = REG_DWORD 0x500 PortIndex = REG_DWORD 6
Serial8 subkey: PortAddress = REG_DWORD 0x130 Interrupt = REG_DWORD 5 DosDevices = REG_SZ COM9 InterruptStatus = REG_DWORD 0x500 PortIndex = REG_DWORD 7
Serial9 subkey: PortAddress = REG_DWORD 0x138 Interrupt = REG_DWORD 5 DosDevices = REG_SZ COM10 InterruptStatus = REG_DWORD 0x500 PortIndex = REG_DWORD 8
12
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 12/23
ACCES I/O 104-COM232-8 Get Quote
Chapter 4: ADDRESS SELECTION
The board uses a control block base address, and each port has its own base address. Each base address can be selected anywhere within an I/O address range 100-3F8 hex, providing that the address does not overlap with other functions. If in doubt, refer to the table below for a list of standard address assignments. (The primary and secondary binary synchronous communication ports are supported by the Operating System.) The FINDBASE base address locator program provided with your board will assist you to select a base address that will avoid this conflict.
Table 4-1: Standard Address Assignments for Computers
HEX RANGE USAGE
000-00F 020-021 040-043 060-06F 070-07F 080-09F 0A0-0BF 0C0-0DF 0F0-0F1 0F8-0FF 170-177 1F0-1F8 200-207 238-23B 23C-23F 278-27F 2B0-2BF 2C0-2CF 2D0-2DF 2E0-2E7 2E8-2EF 2F8-2FF 300-30F 310-31F 320-32F 370-377 378-37F 380-38F 3A0-3AF 3B0-3BB 3BC-3BF 3C0-3CF 3D0-3DF 3E8-3EF 3F0-3F7 3F8-3FF
8237 DMA Controller 1 8259 Interrupt 8253 Timer 8042 Keyboard Controller CMOS RAM, NMI Mask Reg, RT Clock DMA Page Register 8259 Slave Interrupt Controller 8237 DMA Controller 2 Math Coprocessor Math Coprocessor Fixed Disk Controller 2 Fixed Disk Controller 1 Game Port Bus Mouse Alt. Bus Mouse Parallel Printer EGA EGA EGA GPIB (AT) Serial Port Serial Port reserved reserved Hard Disk (XT) Floppy Controller 2 Parallel Printer SDLC SDLC MDA Parallel Printer VGA EGA CGA Serial Port Floppy Controller 1 Serial Port
13
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 13/23
ACCES I/O 104-COM232-8 Get Quote
The address jumpers determine the address of the control block; the addresses and interrupts of the ports are taken from the onboard EEPROM. The interrupt sharing register (mainly used in NT4) is referenced to the address of Channel A.
The address bytes entered into the EEPROM represent address lines A9 thru A3. The easiest way to determine the byte to write for a desired address is to divide the address by 8. For instance, a base address of 300 would be 300/8 = 60, an address of 308/8 = 61, and so on. (All addresses are in hex.)
ADDRESS JUMPERS
1st Digit
2nd Digit
Jumper Label
A9 A8 A7 A6 A5 A4
Address Line Controlled
A9 A8 A7 A6 A5 A4
Hexadecimal Value 200 100 80 40 20 10
In order to read the address jumper setup, assign a binary "1" to jumpers that are not installed and a binary "0" to jumpers installed. For example, as illustrated in the following table, jumper selection corresponds to binary 10 0000 xxxx (hex 200). The "xxx" represents address lines A3, A2, A1, and A0 used on the board to select individual registers, as described in the PROGRAMMING section of this manual.
EXAMPLE ADDRESS SETUP
Jumper Label Conversion Factors Jumper Installed Binary Representation Hex Representation
A9 A8 A7 A6 A5 A4
2 1
8
4
2
1
NO YES YES YES YES YES
1 0
0
0
0
0
2
0
Review the ADDRESS SELECTION TABLE carefully before selecting the board address. If the addresses of two installed functions overlap you will experience unpredictable computer behavior.
14
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 14/23
ACCES I/O 104-COM232-8 Get Quote
Chapter 5: PROGRAMMING
The port addresses and IRQs are selected by software through a control block; the base address of the control block is selected by jumpers. The functions within the control block are shown in the control block register map below.
Address
Control Block Register Map
Read Function
Write Function
Base Address + 0
--
Enable IRQs
Base Address + 1
--
EEPROM Address
Base Address + 2
--
EEPROM Data
Base Address + 3
--
Load EEPROM To Registers
Notes:
1) Once the EEPROM has been loaded, its data will be automatically transferred to the appropriate registers on power up. Therefore, it should normally only be necessary to issue the load to registers command when the data has been changed and it is desired to use the board without rebooting.
2) The IRQs are normally enabled when the first write to any UART occurs. It is not normally necessary to issue an enable IRQ command when using the board.
The addresses and IRQs of the ports are loaded from an EEPROM on the board. In addition to automatically loading them at power-on, they can be loaded by software by a write to the control block. The addresses and interrupts are stored in the EEPROM as shown on the EEPROM address map below.
EEPROM Address Map
EEPROM Address
EEPROM Data Meaning
1
Address for Channel A
2
Address for Channel B
3
Address for Channel C
4
Address for Channel D
5
Address for Channel E (-8 Only)
6
Address for Channel F (-8 Only)
7
Address for Channel G (-8 Only)
8
Address for Channel H (-8 Only)
9
IRQ for Channel A
A
IRQ for Channel B
B
IRQ for Channel C
C
IRQ for Channel D
D
IRQ for Channels E,F,G,H (-8 Only)
15
Manual 104-COM232-8
www.assured-systems.com | sales@assured-systems.com
Page 15/23
ACCES I/O 104-COM232-8 Get Quote
As mentioned elsewhere, the addresses entered represent A3 - A9. Therefore, the data entered is the desired address, divided by 8.
The IRQ entry is the number of the desired IRQ.
When the board is first installed in a system, the ports are not necessarily at unused addresses. To prevent conflicts with other devices in the system, the board has a jumper that disables the ports, next to the base address jumpers and labeled "DF". The control block remains enabled in this mode, allowing software to set the port addresses appropriately. When the DF jumper is then removed, the ports will then be at the configured addresses.
To write data to the EEPROM, first write the address to the EEPROM Address register, then write to or read from the EEPROM Data register. The data transfer inside the board takes 2 milliseconds, during which the board should not be accessed. For example, to set Channel A to address 3F8, IRQ 5, with the control block base address set to 200 (by jumpers):
Write 01 to 201. Write 7F to 202. Wait 2ms. Write 09 to 201. Write 05 to 202. Wait 2ms. Then write anything to 203 to start using these values.
All data may be entered into the EEPROM and then written to the appropriate registers with a single write to base address + 3.
SAMPLE PROGRAMS
Sample programs are installed with the CD that ships with the board. See the CD for details.
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 Address +3. In C code, the call would be:
outportb(BASEADDR +3,0x80);
You then load the divisor into Base Address +0 (low byte) and Base Address +1 (high byte). The following equation defines the relationship between baud rate and divisor:
desired baud rate = (clock frequency) / (16 * divisor)
16
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 16/23
ACCES I/O 104-COM232-8 Get Quote
Clock frequencies of 1.8432 MHz (Standard) and 14.7456 MHz (X8) are provided. Below is a table for the popular divisor frequencies:
BAUD RATE DIVISOR VALUES*
Baud Rate Divisor (Std) Divisor (X8)
Notes
230400
-
115200
1
57600
2
38400
3
28800
4
19200
6
14400
8
9600
12
4800
24
2400
48
1200
96
4
8
16
24
32
48
64
96
Most Common
192
384
768
* RS-232 communication lines have a maximum length of 50 feet, regardless of speed.
In C, the code to set the chip to 9600 baud is:
outportb(BASEADDR, 0x0C); outportb(BASEADDR +1,0);
The second initializing step is to set the Line Control Register at Base Address +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 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(BASEADDR +3, 0x03)
17
Manual 104-COM232-8
www.assured-systems.com | sales@assured-systems.com
Page 17/23
ACCES I/O 104-COM232-8 Get Quote
The final initialization step is to flush the receiver buffers. You do this with two reads from the receiver buffer at Base Address +0. 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 Address +5. 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(BASEADDR +5) & 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 Address +2. 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(BASEADDR +2);
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
To transmit a string of data, the transmitter must first check Bit 5 of the Line Status Register at Base Address +5. 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.
The following C code fragment demonstrates this process:
outportb(BASEADDR +4, inportb(BASEADDR +4)|0x02);
/*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*/
18
Manual 104-COM232-8
www.assured-systems.com | sales@assured-systems.com
Page 18/23
ACCES I/O 104-COM232-8 Get Quote
Chapter 6: CONNECTOR PIN ASSIGNMENTS
Two popular 40 pin IDC male connectors are used for interfacing to communication lines. Optionally, a cable is available to allow the 40 Pin Header to be split into four, 9-pin Male connectors. The pins are numbered on each connector as shown:
Connector pin assignments are as follows:
Pin
Ch
1
A
2
A
3
A
4
A
5
A
6
A
7
A
8
A
9
A
10
11
B
12
B
13
B
14
B
15
B
16
B
17
B
18
B
19
B
20
Connector P2 (4- and 8-port boards)
Function
Pin
Ch
CD
21
C
DSR
22
C
RX
23
C
RTS
24
C
TX
25
C
CTS
26
C
DTR
27
C
RI
28
C
Ground
29
C
30
CD
31
D
DSR
32
D
RX
33
D
RTS
34
D
TX
35
D
CTS
36
D
DTR
37
D
RI
38
D
Ground
39
D
40
Function CD DSR RX RTS TX CTS DTR RI
Ground
CD DSR RX RTS TX CTS DTR
RI Ground
19
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 19/23
ACCES I/O 104-COM232-8 Get Quote
Pin
Ch
1
E
2
E
3
E
4
E
5
E
6
E
7
E
8
E
9
E
10
11
F
12
F
13
F
14
F
15
F
16
F
17
F
18
F
19
F
20
Connector P3 (8-port board only)
Function
Pin
Ch
CD
21
G
DSR
22
G
RX
23
G
RTS
24
G
TX
25
G
CTS
26
G
DTR
27
G
RI
28
G
Ground
29
G
30
CD
31
H
DSR
32
H
RX
33
H
RTS
34
H
TX
35
H
CTS
36
H
DTR
37
H
RI
38
H
Ground
39
H
40
Function CD DSR RX RTS TX CTS DTR RI
Ground
CD HSR RX RTS TX CTS HTR
RI Ground
20
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 20/23
ACCES I/O 104-COM232-8 Get Quote
Chapter 7: SPECIFICATION
COMMUNICATIONS INTERFACE
Number of Ports
Varies by card version (8, 4, or 2)
Type of Port Connectors
RS232
Two 40-pin connectors are provided on the 8-port board One 40-pin connector is provided on the 4-port board One 20-pin connector is provided on the 2-port board
Control Signals
DTR, DSR, RTS, CTS, RI, TxD, RxD, CD
Bus
PC/104, ISA
UART
16C654 (8-port board - 16L788)
Output Driver
Sipex 211E Output Voltage Swing: ±5V Minimum, ±7V Typical Input Voltage Swing: ±15V Receiver Threshold: 2.8V high, 0.8V low, Maximum input ±15V
Throughput
Individually programmed, up to 230.4 kbps
I/O Addressing
Each port address is user programmed into an onboard EEPROM Each port uses 8 consecutive addresses
Interrupts
Interrupts are user programmed into an onbbard EEPROM
Individual interrupts for ports A-D and common interrupt for ports E-H on 8 channel only
ENVIRONMENTAL
Operating Temperature Range: 0 to +60 °C
Storage Temperature Range: -50 to +120 °C
Humidity:
5% to 95%, non-condensing
Power Required:
+5 VDC at 400 mA typical, 800 mA maximum (8 channel card)
Size:
PC/104 format, 3.5" by 3.75"
21
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 21/23
ACCES I/O 104-COM232-8 Get Quote
Customer Comments
If you experience any problems with this manual or just want to 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
22
www.assured-systems.com | sales@assured-systems.com
Manual 104-COM232-8
Page 22/23
ACCES I/O 104-COM232-8 Get Quote
Assured Systems
Assured Systems is a leading technology company with over 1,500 regular clients in 80 countries, deploying over 85,000 systems to a diverse customer base in 12 years of business. We offer high-quality and innovative rugged computing, display, networking and data collection solutions to the embedded, industrial, and digital-out-of-home market sectors.
US
sales@assured-systems.com
Sales: +1 347 719 4508 Support: +1 347 719 4508
1309 Coffeen Ave Ste 1200 Sheridan WY 82801 USA
EMEA
sales@assured-systems.com
Sales: +44 (0)1785 879 050 Support: +44 (0)1785 879 050
Unit A5 Douglas Park Stone Business Park Stone ST15 0YJ United Kingdom
VAT Number: 120 9546 28 Business Registration Number: 07699660
www.assured-systems.com | sales@assured-systems.com
Page 23/23