Copyright 1996 CONTEC Co., LTD. ALL RIGHTS RESERVED No part of this document may be copied or reproduced in any form by any means without prior written consent of CONTEC Co., LTD. CONTEC Co., LTD. makes no commitment to update or keep current the information contained in this document.
Check the contents to make sure that you have everything listed above. If you do not have all the items, contact your distributor or CONTEC group office where you purchased. Note! Do not remove the board from its protective packaging until the computer case is open and ready for installation.
Table of Contents Copyright ................i Trademarks ................i Product Configuration ............. ii 1. Introduction ............. 1 About the COM-2(PC)F Board ........1 Support Software of Option..........1 Features.................1 Limited Three-Year Warranty........2 How to Obtain Service..........2 Liability .................2 About the Manual ............3 2. How to Use the Board ..........5 Compatible Mode and Enhanced Mode ......5 Compatible Mode ............5 Enhanced Mode.............5...
Page 5
Mounting Method............28 Connecting the External Devices........31 Connecting the Cable............32 4. System Reference............ 33 Specifications..............33 Circuitry Diagrams ............34 Block Diagram..............34 5. Troubleshooting ............35 QUESTIONS: ..............35 Is the pilot light on?............35 Did the system boot up? ..........35 Does your program work?...........35 Does the sample program work?........36 Is the input data accurate?.........36 Still have a probrem?..........36...
Page 6
List of Figures Figure 3.1. Names of Board Components and Default Factory Settings ..............23 Figure 3.2. I/O Address DIP Switch..........25 Figure 3.3. Interrupt Level Settings..........26 Figure 3.4. Rear Panel of IBM-PC/AT......... 28 Figure 3.5. Removing the Cover..........28 Figure 3.6.
Page 7
Figure 6.11.Flowchart of Sample Program 9 ........ 53 Figure 6.12.Flowchart of Sample Program10 ....... 54 Figure 6.13.Flowchart of Sample Program 11 ......55 Figure 6.14. IVR Bit Function in Enhanced Mode......61 Figure 6.15.Difference in Jumpers (JP1~JP3)....... 64 COM-2(PC)F...
Page 8
List of Tables Table 2.1. COM Port Support for Various Programming Languages..............21 Table 3.1. I/O Address Settings ..........25 Table 3.2. Example Compatible Mode Settings ......27 Table 4.1. Specifications............33 Table 6.1. Data Format .............. 40 Table 6.2. Switch and Jumper Settings of Sample Program 1, 2, and 5 .................
Introduction 1. Introduction About the COM-2(PC)F Board The COM-2(PC)F is an IBM PC/AT ISA-Bus add-on interface board for multi-channel RS-232C asynchronous communications. It features two serial communication ports and a programmable communication rate ranging from 50 to 115,200 bps for communication or modem control.
Introduction Limited Three-Year Warranty CONTEC Interface boards are warranted by CONTEC Co., LTD to be free from defects in material and workmanship for up to three years from the date of purchase by the original purchaser. Repair will be free of charge only when this device is returned...
Introduction About the Manual This manual consists of the following chapters : Chapter 1 Introduction Chapter 2 How to Use the Board Chapter 3 Hardware Setup Chapter 4 I/O Ports and Registers Chapter 5 System Reference Chapter 6 Troubleshooting Chapter 7 Index COM-2(PC)F...
The COM-2(PC)F uses the I/O addresses assigned to the standard serial ports. As the COM-2(PC)F channels operate as standard serial ports, the board can be accessed using either the CONTEC driver software (purchased separately) or some other driver software that supports standard serial ports.
How to Use the Board Operating under Windows Me/98 This section describes the procedure for using the board under Windows Me/98 and lists a number of points to note. Procedure When using the board under Windows Me/98, the OS must be set to recognize the I/O address and interrupt level used by the COM-2(PC)F.
Page 16
How to Use the Board Compatible Mode Installation Procedure 1 1. Set the operation mode (I/O address) and interrupt level for the COM-2(PC)F. Set the COM-2(PC)F switch and jumpers as described in Hardware Setup. Set an interrupt level that is not currently used by the computer.
Page 17
[Copy manufacturer's file from:], then click [OK]. 8. The next screen displays the board type. Select [CONTEC Co., Ltd. - COM-2(PC)F, V, H Compatible] from [Models:]. 9. Next, the resource items and settings are displayed. Take a note of the displayed I/O address and interrupt level.
Page 18
LPT)] folder. For Enhanced mode, double click on the [Multi-function adapters] folder. 3. Double click on the [CONTEC Co., Ltd. - COM-2(PC)F] or [COM*] folder to display the properties screen. 4. Select [Resources]. Check the resource items and settings, and look for any conflicts.
How to Use the Board Operating under Windows 95 This section describes the procedure for using the board under Windows 95 and lists a number of points to note. Procedure When using the board under Windows 95, the OS must be set to recognize the I/O address and interrupt level used by the COM-2(PC)F.
Page 20
How to Use the Board Compatible Mode Installation Procedure 1 1. Set the operation mode (I/O address) and interrupt level for the COM-2(PC)F. Set the COM-2(PC)F switch and jumpers as described in Hardware Setup. Set an interrupt level that is not currently used by the computer.
Page 21
[Copy manufacturer's file from:], then click [OK]. 8. The next screen displays the board type. Select [CONTEC Co., Ltd. - COM-2(PC)F, V, H Compatible] from [Models:]. 9. Next, the resource items and settings are displayed. Take a note of the displayed I/O address and interrupt level.
Page 22
LPT)] folder. For Enhanced mode, double click on the [Multi-function adapters] folder. 3. Double click on the [CONTEC Co., Ltd. - COM-2(PC)F] or [COM*] folder to display the properties screen. 4. Select [Resources]. Check the resource items and settings, and look for any conflicts.
How to Use the Board Operating under Windows 2000 This section describes the procedure for using the board under Windows 2000 and lists a number of points to note. Procedure When using the board under Windows 2000, the OS must be set to recognize the I/O address and interrupt level used by the COM-2(PC)F.
Page 24
How to Use the Board Compatible Mode Installation Procedure 1 It can’t be used with Compatible Mode when API-SIO(98/PC)NT of packing together is used for API-PAC(W32). 1. Set the operation mode (I/O address) and interrupt level for the COM-2(PC)F. Set the COM-2(PC)F switch and jumpers as described in Hardware Setup.
Page 25
[Copy manufacturer's file from:], then click [OK]. 9. The next screen displays the board type. Select [CONTEC Co., Ltd. - COM-2(PC)F, V, H Compatible] from [Models:]. 10. Next, the resource items and settings are displayed. Take a note of the displayed I/O address and interrupt level.
Page 26
LPT)] folder. For Enhanced mode, double click on the [Multi-function adapters] folder. 3. Double click on the [CONTEC Co., Ltd. - COM-2(PC)F] or [COM*] folder to display the properties screen. 4. Select [Resources]. Check the resource items and settings, and look for any conflicts.
How to Use the Board Operating under Windows NT This section describes the procedure for using the board under Windows NT and lists a number of points to note. Procedure First, set the operation mode (I/O address) and interrupt level for the COM-2(PC)F.
How to Use the Board Operating under Windows 3.1 This section describes the procedure for using the board under Windows 3.1 and lists a number of points to note. Procedure First, set the operation mode (I/O address) and interrupt level for the COM-2(PC)F.
[COM3 I/O address] [COM4 I/O address] Example: C>SETCOM 3F8 2F8 NONE NONE COM-2(PC) series compatible mode setting software by CONTEC I/O address data: COM1:[3F8] COM2:[2F8] COM3:[NONE] COM4:[NONE] C> The I/O addresses used by the COM-2(PC)F do not need to be set for the system area of the PC when using the board in Enhanced mode.
How to Use the Board Note! When used in Compatible mode, COM3 and COM4 are not supported by some programming languages. Check the specifications of the language you are using. Table 2.1. lists the COM ports supported by a number of common programming languages.
Hardware Setup 3. Hardware Setup Names of Board Components Figure 3.1. shows the names of various board components. The switch and jumper settings shown in the figure are the default factory settings. Figure 3.1. Names of Board Components and Default Factory Settings COM-2(PC)F...
Hardware Setup I/O Address Setting The board is an I/O device controlled by I/O instructions from the PC. I/O devices include expansion boards and devices inside the PC. The various devices are identified by their I/O addresses. I/O addresses are represented as four digit hexadecimal values (e.g.
Hardware Setup Setting Procedure The I/O address is set using a DIP switch (SW1) on the board. MODE 1 2 3 4 Figure 3.2. I/O Address DIP Switch Table 3.1. I/O Address Settings Interrupt Vector Function I/O Address Bit 1 Bit 2 Register Address Enhanced...
Hardware Setup Interrupt Level Setting The signal from the LSI (NS16550 equivalent) on the board can be used as an interrupt request signal based on the JP1, JP2, and JP3 settings. Note! When using interrupts, set an interrupt level that is not used by any other device.
Note! If using the PC's RS-232C ports as COM 1 and COM 2 at the same time as using the CONTEC board as COM3 and COM4, COM3 and COM4 must be set to interrupt levels other than IRQ3 and IRQ4 because COM1 uses IRQ4 and COM2 uses IRQ3.
Hardware Setup Mounting Method There are many kinds of boards that can be mounted in a computer's extension slots, however the mounting method is identical for any slot. Before starting (1) Set the Power switch to OFF. (2) Unplug the power cable from the AC outlet. Mounting the board (1) Remove the screws from the rear of the computer.
(5) Inspect the board. Check the board for any visible damage or loose parts. If you notice any problems with the board, contact CONTEC. Don't attempt to fix the board yourself. CONTEC does not warranty boards damaged or worked-on by the customers.
Hardware Setup (7) Anchor the board with the screw. Use the screw set aside in step 3. Tighten so that the board is held in place. Figure 3.7. Anchoring the COM-2(PC)F (8) Replace the computer cover. (9) Connect the power cord. COM-2(PC)F...
Hardware Setup Connecting the External Devices Connecting the COM-2(PC)F board to external devices is via two 9-pin D-SUB connector (male) on the board. On-board Connector : DELC-J9PAF-20L9 (Male) [mfd. by JAE] Application Connector : 17JE-13090-02 (D8C) (Female) [mfd. by DDK] Figure 3.8.
Hardware Setup Connecting the Cable The RS-232C interface requires that you use a different type of cable depending on the type of device being connected. For example, modem connections and computer (PC) connections require different cables. Accordingly, check the specifications of the external device to which you are connecting and select the appropriate type of cable.
System Reference Circuitry Diagrams SN75188 TXD, RTS, DTR SN75189 RXD, CTS, DSR 15pF Figure 4.1. Circuitry Diagrams Block Diagram The following is a block diagram of the COM-2(PC)F interface board. Addr. Bus ADDRESS (A9~A3) DECODER CLOCK Addr. Bus CNTROL (A2~A0) BUFFER RS-232C NS16550...
Troubleshooting 5. Troubleshooting If you are having trouble with your board or program, answer the following questions to see if you can find the problem. QUESTIONS: STEPS TO TAKE Is the pilot light on? The system must be turned on and the power supply must be working.
- External connectors fit tightly. Separate and reattach external cables. Still have a probrem? Contact CONTEC group office where you purchased as shown in the last page of this manual. Note! Before you call, make a list of the following information. Our technical representatives will need the following information to help you.
Page 46
4. Name of the CONTEC board that you are using. 5. Names of other boards in the computer. 6. I/O addresses for the CONTEC board and all other boards. 7. Interrupt levels for the CONTEC board and all other boards.
Page 47
Troubleshooting 10. Different I/O addresses you have tried. 11. Are you using your own program or a CONTEC sample program. 12. List AUTOEXEC.BAT. 13. List CONFIG.SYS. COM-2(PC)F...
This section covers the sample programs that are supplied on the floppy disk included with this board. COM-2(PC)F Diskette CONTEC supplies a sample program diskette with each COM-2(PC)F board. This diskette contains sample programs to help you get started. Use the DOS DIR command to see a list of files on the COM-2(PC)F diskette.
Appendix Sample Programs The programs are written in GW-BASIC and Microsoft C. The sample programs transmit data entered from the keyboard and display received data on the screen. Table 6.1. lists the communications data format. The sample programs listed in Figure 6.1. are included on the floppy disk.
Page 50
Appendix Notes! - All the sample programs must be run on a PC operating under MS-DOS. - Sample programs 3, 4, 6, and 10 cannot be used on a PC that already has COM1 and COM2 ports. Similarly, sample programs 11 cannot be used on a PC that already has COM3 and COM4 ports.
Appendix Cable Connection When running the sample programs 1 to 11 (except 8 and 9), use the interconnection cable as shown in Figure 6.2. for connection with the mating device in the Compatible mode. For use in the Enhanced mode, on the other hand, use the cross cable or the interconnection configuration diagram in Figure 6.2.
Appendix Sample Program 1 This GW-BASIC sample program demonstrates the transmit-data capability of COM-2(PC)F in Enhanced mode. First, it initializes the Asynchronous Communication Element (ACE), then it transmits the data input from the keyboard to the external device through channel 1 (CN1). START Read Set Baud Rate...
Appendix Sample Program 2 This GW-BASIC sample program demonstrates the receive-data capability of COM-2(PC)F in Enhanced mode. First, it initializes the ACE, then it transmits the data input from the external device to CRT through CN1. START Set Baud Rate Read Generator Interrupt ID Register...
Appendix Sample Program 3 This GW-BASIC sample program demonstrates the transmit-data capability of COM-2(PC)F in Compatible mode. Using this [OPEN "COM1 : 9600, N, 8, 2, DS" AS #1] command opens the RS-232C communication file (COM1). It then writes the data input from the keyboard to COM1 through CN1.
Appendix Sample Program 4 This GW-BASIC sample program demonstrates the receive-data capability of COM-2(PC)F in Compatible mode. Using this [OPEN "COM1 : 9600, N, 8, 2, DS" AS #1] command opens the RS-232C communication file (COM1). It then reads the data from COM1 and outputs to CRT through CN1.
Appendix Sample Program 5 This GW-BASIC sample program demonstrates the receive/transmit-data capability of COM-2(PC)F in Enhanced mode. First, it initializes the ACE, it then receives the data input from the keyboard through CN1. Finally it outputs the data to CRT through CN2.
Appendix Sample Program 6 This GW-BASIC sample program demonstrates the receive/transmit-data capability of COM-2(PC)F in Compatible mode. Using the [OPEN "COM1 : 9600, N, 8, 2, DS" AS #1] command and the [OPEN "COM2 : 9600, N, 8, 2, DS" AS #2] command opens two RS-232C communication files (COM1 and COM2).
Appendix Sample Program 7 This GW-BASIC sample program demonstrates the receive/transmit-data capability of COM-2(PC)F in Enhanced mode with interrupt input. It calls a machine language program to register and handle interrupt input. One channel's receive/transit- data routine is processed in the interrupt handler. The received data is stored in the data buffer.
Appendix Sample Program 8 [Half-duplex data transmission (Enhanced mode)] The sample program 8 enables initialization on ACE, data transmission in the transmission mode, and waits for the receive data in the receive mode. START Set Baud Rate Generator Line Status D6 bit = 1 Set Interrupt Enable Register...
Appendix Sample Program 9 [Half-duplex data reception (Enhanced mode)] The sample program 9 enables initialization on ACE, receives 5-byte data; after transmission, the program enters the transmission mode for data transmission. START Set Baud Rate Generator Line Status D0 bit = 1 Set Interrupt Enable Register Display Receiver Buffer's...
Appendix Sample Program 10 [Data transmission and reception (COM1, COM2 mode)] Sample program 10 uses the bios_serialcom( ) function for MS-C. It first receives the data transmitted from COM1, and then receives the data at COM1 transmitted from COM2. Received data is displayed on the CRT.
Appendix Sample Program 11 [Data transmission and reception (COM3, COM4 mode)] Sample program 11 uses the bios_serialcom( ) function for MS-C. It first receives the data transmitted from COM3, and then receives the data at COM3 transmitted from COM4. Received data is displayed on the CRT.
Appendix B. Notes on Developing Driver Software Internal Registers COM-2(PC)F uses the NS16550 (National Semiconductor) as the Asynchronous Communication Element (ACE). Within the address range of each channel, the offset addresses 0 through 7 furnish access to the internal registers of each of the two ACE's. Table 6.6.
Appendix Baud Rate Selection The COM-2(PC)F board has one programmable baud rate generator for each of the two ACEs. The ACEs use a 1.8432MHz crystal oscillator as clock input. The baud rate generator takes the 1.8432MHz clock and divides it by a divisor from 1 to (2 - 1).
Due to the ever higher CPU clock rates used in PCs, restrictions apply when controlling a peripheral LSI device by software. Table 6.8. lists the LSIs used on CONTEC boards which require special consideration when accessing. Take note of the following point when accessing these LSIs.
Page 68
Appendix Example program (for accessing an i8254 or equivalent) - Microsoft Macro Assembler OUT DX, AL Access to the i8254 AL, 2EFH Execute IN AL, 2EFH once to provide the recovery time - Microsoft C/C++ outp(port, byte); /* Access to the i8254 */ rt=inp(0x2ef);...
Appendix Various Aspects of Interrupt Handling in Enhanced Mode and Compatible Mode Enhanced Mode When in Enhanced mode, two channels of the COM-2(PC)F share the same interrupt request line. The interrupt levels can be set from IRQ3~IRQ7, IRQ9~IRQ12, IRQ14, and IRQ15 by setting JP1 before installing this board.
Appendix Output Port D6 D5 D4 D3 D2 D1 D0 2BF/1BF Not Used Global Interrupt 0: Disable 1: Enable Input Port D6 D5 D4 D3 D2 D1 D0 2BF/1BF Not Used CH1 Interrupt 0: Occurred 1: Not Occurred CH2 Interrupt 0: Occurred 1: Not Occurred Global Interrupt...
Appendix D. Difference Between the COM-2(PC)F and COM-2(PC)V The COM-2(PC)F is an upgrade of the previous COM-2(PC)V board and is upwardly compatible. Therefore, the board can generally be used in the same way as the COM-2(PC)V. However, as the bus specification has changed from the XT bus to the AT bus and the board sizes are different, the COM-2(PC)F may not fit in some PCs.
Need help?
Do you have a question about the COM-2(PC)F and is the answer not in the manual?
Questions and answers