Home
Compaq Contec COM-2(PC)F User's Manual
Contents
1. On board Connector DELC J 9PAF 20L9 Male mfd by J AE Application Connector 17 E 13090 02 D8C Female mfd by DDK Figure 3 8 Interface Connectors CN1 and CN2 Signal Ground SG Data Terminal Ready DTR 9 RI Ringlndicator 81 CTS Clear to Send 7 RTS Request to Send Receive Data RXD _ 5 4 Transmit Data TXD 3 6 DSR Data Set Ready 1 Data Carrier Detect DCD CNI CN2 Figure 3 9 CN1 and CN2 Pin Assignments COM 2 PC F 31 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 The two types of cable are straight through and crossed Also if the signal lines require conditioning in the connector provide conditioning in accordance with the specifications 1 A ATXD TXD Transmit Data RXD RXD Receive Data TRTS RTS Request to Send CTS CTS Clear to Send DTR DTR Data Terminal Ready DSR DSR Data Set Ready SG SG Signal Ground Board T External Device Figure 3 10 Example Connection to a Modem 1 p ATXD TXDj RXD R
2. 56 Internal Registers e tto p nr m ete e ee 56 Baud Rate Selection ccccsssssccccessssssssssseeeeeeeeseeessee 57 LSI Recovery Tile uero tat mro gg er rate pe 58 Various Aspects of Interrupt Handling in Enhanced Mode and Compatible Mode sssssss 60 C The Details on NS16550 eene 62 D Difference Between the COM 2 PC F and COM 2 P C o sers epi ERE ERE EE 64 7 Index iii 65 iv COM 2 PC F List of Figures Figure 3 1 Names of Board Components and Default Factory SEIMS pede ais rA 23 Figure 3 2 I O Address DIP Switch eeeesess 25 Figure 3 3 Interrupt Level Settings eeeeeees 26 Figure 3 4 Rear Panel of IBM PC AT eee 28 Figure 3 5 Removing the COVers i nada ied i da etia ps 28 Figure 3 6 Expansion Slot Cover eeee 29 Figure 3 7 Anchoring the COM 2 PCF eene 30 Figure 3 8 Interface Connectors CN1 and CN2 31 Figure 3 9 CN1 and CN2 Pin Assignments seen 31 Figure 3 10 Example Connection to a Modem 32 Figure 3 11 Example Connection to a PC sseeess 32 Figure 3 12 Example Connection to a Device 32 Figure 4 1 Circuitry Diagrams etie esi etibn tei peces 34 Figure 4 2 COM 2 PC F Block Diagram eee 34 Figure 6 1
3. 2 Select the Computer folder and click Properties 3 Display the Interrupt request IRQ list and check which interrupt levels are available Check the ports 1 Select System from Control Panel and open Device Manager 2 Double click on the Ports COM amp LPT Infrared Modem folder and check which ports are already set 6 COM 2 PC F 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 Insert the COM 2 PC F in an expansion slot and turn on the power to the PC After Windows Me 98 starts select Control Panel from My Computer and start the Add New Hardware Click Next gt in response to To begin installing your new hardware click Next in the Add New Hardware Wizard Select Yes Recommended in response to Do you want Windows to search for your new hardware After following the instructions and completing detection use Details to check that the standard serial ports have been detected Next click Finish and restart your computer When Windows Me is used it doesn t need to restart After rebooting use the procedure described in the Check Resources section below to check the interrupt level assigned to the
4. 1 O Address SW1 Interrupt Level PL P2 P3 p e aE 18 BA da leis 934 5 6 7101121415NC P255 o o o o o e o o o le 934567101121415NC JP3 S o o o o o o o o o o B 934567101121415NC Table 6 5 Switch and Jumper Settings of Sample Program 11 Item Settings 1 O Address SW1 Interrupt L evel P1 JP2 JP3 JP1 ojojo ojo 10 11121415NC oo oo oo oo wl oo Wl oo o o A uy oo oO oo 00 O ojojo ojo 10 11121415NC oo oo JP2 wo oo oo w oo Aj oo 5 ul oo Ooo N o0 o o o o o o o o o o o o o oo oo JP3 uy oo w 6 71011121415NC COM 2 PC F 43 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 Signal Pin No Pin No Signal TXD 3 2 RXD RXD 2 3 TXD DTR 4 6 DSR DSR 6 4 DTR SG 5 5 SG DCD 1 7 RTS Ls 8 CTS RTS z CTS 8 1 DCD CH1 External device or CH2 Figure 6 2 9 pin Connector Diagram 44 COM 2
5. and click Next 7 Select the Ports COM amp LPT folder from the Hardware types screen 8 Click Hard Disk and the Install From Disk screen appears place the floppy disk in the drive enter the drive name in 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 1 End the operation as instructed This completes the installation of one port When using both ports in Compatible mode repeat the procedure from step 2 If the interrupt level used by a COM 2 PC F port is already used on the PC change the interrupt level to an available level 12 Turn off the power then set the operation mode I O address and interrupt level on the COM 2 PC F to the values set in steps 10 and 11 above Set the COM 2 PC F switch and jumpers as described in Hardware Setup 16 COM 2 PC F How to Use the Board Enhanced Mode Installation Procedure When it is used with Enhanced Mode API PAC W32 of the option is necessary Refer to Help HWINSTE HLP of the way of registering the hardware being attached to API PAC W32 for the way of installing it Check Resources Always check the PC resources I O address and interrupt level assigned to the COM 2 PC F before actually using the board Use the
6. Bus A2 A0 lt l OR RS 232C CN1 row NS16550 Ker Serial Port l DRIVER amp RESET RECEIVER Data Bus DATA IBM PC AT BUS l D7 D0 C BUFFER RS 232C NS16550 DRIVER amp If RECEIVER INTERRUPT VECTOR REGISTER pie INTERRUPT IRQ14 15 JUMPER COM 2 PC F Figure 4 2 COM 2 PC F Block Diagram 34 COM 2 PC F 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 Check the main power switch and the power supply Did the system boot up Does If the board has been installed and the system did not boot check the following Make sure the board has been inserted firmly Pull it out and try to reboot If your system reboots then re insert the board and try to boot again Check that cables attached to your other boards fit tightly your program work If the system booted and your program does not work check the following DIP switches have been set correctly for the desired base address Selected base address doesn t conflict with another peripheral device or card installed in the computer Selected interrupt levels don t con
7. Floppy Disk Biles itta eee tnus 40 Figure 6 2 9 pin Connector Diagram eene 44 Figure 6 3 Flowchart of Sample Program 1 45 Figure 6 4 Flowchart of Sample Program 2 46 Figure 6 5 Flowchart of Sample Program 3 47 Figure 6 6 Flowchart of Sample Program 4 48 Figure 6 7 Flowchart of Sample Program 5 49 Figure 6 8 Flowchart of Sample Program 6 50 Figure 6 9 Flowchart of Sample Program 7 51 Figure 6 10 Flowchart of Sample Program 8 32 COM 2 PC F V Figure 6 11 Flowchart of Sample Program 9 53 Figure 6 12 Flowchart of Sample Programl0 54 Figure 6 13 Flowchart of Sample Program 11 35 Figure 6 14 TVR Bit Function in Enhanced Mode 61 Figure 6 15 Difference in Jumpers JP1 JP3 64 vi COM 2 PC F List of Tables Table 2 1 COM Port Support for Various Programming MAR CU AES coa sedo d iius desti Re E 21 Table 3 1 I O Address Settings eere 25 Table 3 2 Example Compatible Mode Settings 27 Table 4 1 Specificatlons ss s ta rasi m tet reri s jakas 33 Table 6 1
8. Interrupt Control Port D7 bit ON Data Data Length Wait Time sec Nore A Baud Rate sa Figure 6 9 Flowchart of Sample Program 7 COM 2 PC F 51 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 C Set Baud Rate Generator ine Status Set Interrupt Enable No Debits Register Set Transmission Format Data Transmission Line Control Register WAIT Time 1 After Initialization 5 bytes Tramsmit Set Modem Control Output Read Line Status Register Read Received Data Register Modem Control RTS to High Read Interrupt ID Register Rea Modem Status register Modem Control Display Receiver Buffer s RTS to LOW Data On CRT o Data Length Wait Time sec Nae AN Baud Rate Geg Figure 6 10 Flowchart of Sample Program 8 52 COM 2 PC F 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 gt Generator 2 ine Status Set Interrupt Enable No eee Register Yes Display
9. Names of Board Components ssssseeeeeee 23 I O Address Setting cccccccccssssccsesssstesssssssseeeeessssseeeeeess 24 Setting Procedure ideo vore deseo eon eon pcn oue a ei 25 Interrupt Level Setting iii 26 Setting Procedure eeeeeeeeeeeeeeennnenennnnnnn 26 COM 2 PC F iii Mounting Method secsas scads pc 28 Connecting the External Devices 31 Connecting the Cable eese 32 4 System Referelce eoo an o n i OG n Ra n 33 SP ECGIECSNONS sists aaa ze ii 33 Circ itry Dragralri os oot oet ete ee Lob da EE 34 Block DIAGRAM vst akas odus ast 34 5 Troubleshooting ise eee ener a e ea na 35 ODESTIONS dedu atra rera tera theatra bra rena Nit 35 Is the pilot light OUI iniu ri eae rere ees 35 Did the system boot up eeeeeeeeennnn 35 Does your program work eeeeeeeeennneee 35 Does the sample program work 36 Is the input data accurate a 36 Still have a probrem seeeeeneenenenenennnnnn 36 6 ApperidbD iivs eco ceni cedo doce ccc dn ccc 39 A Sample Programs for MS DOS 39 COM 2 PC F Diskette iiri 39 Sample Pfogf atfis scenic ent 40 Switch and J umper Settings seeeeeees 42 Cable Connect O uses asa takes esit rr tethers 44 B Notes on Developing Driver Software
10. Register Delta Clear to Send DCTS Delta Data Set Ready DDSR Trailing Edge Ring Indicator TERI Delta Data Carrier Detect DDCD Ring Indicator RI Data Carrier Detect DCD COM 2 PC F Divisor Latch MS 63 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 Check the size of board that can be mounted in your PC before selecting the COM 2 PC F The two boards also differ in their specifications and hardware setup The differences are described below Table 6 10 Specifications Differences EE COM 2 PC V COM 2 PC F Baud Rate 50 38 400bps 50 115 200bps Interrupt Level IRQ3 7 9 IRQ3 7 9 12 14 15 J umper Selectable J umper Selectable 120 0 x 107 0 x 18 5mm 160 0 x 107 0 x 18 5mm COM 2 PC V COM 2 PC F JP14 P3 JP14P3 Mtns fofefofe ofolo le s e e e e elo elo e e 23456 7NC 9 3 4 5 6 71011121415NC J umper Selectable J umper Selectable Figure 6 15 Difference in Jumpers JP1 JP3 64 COM 2 PC F 7 Index B Baud Rate 57 Block Diagram 34 Board Setup
11. COM 2 PC F If the value is different to the level set on the jumper correct the setting in the OS When installing by this method the COM 2 PC F channels are installed as standard serial ports COM COM 2 PC F 7 How to Use the Board Compatible Mode Installation Procedure 2 1 Turn on the power to the PC without inserting the COM 2 PC F in an expansion slot After Windows Me 98 starts select Control Panel from My Computer and start the Add New Hardware Click Next gt in response to To begin installing your new hardware click Next in the Add New Hardware Wizard Select No in response to Do you want Windows to search for your new hardware Select the Ports COM amp LPT folder from the Hardware types screen Select Communication Port from Models and click on Have Disk in the screen When the Install From Disk screen appears place the floppy disk in the drive enter the drive name in Copy manufacturer s file from then click OK The next screen displays the board type Select CONTEC Co Ltd COM 2 PC F V H Compatible from Models Next the resource items and settings are displayed Takea note of the displayed I O address and interrupt level 10 End the operation as instructed This completes the installation 1 p of one port When using both ports in Compatible mode repeat the procedure from step 2 If the interrupt level used by a COM 2 PC F por
12. COM 2 PC F switch and jumpers as described in Hardware Setup Set an interrupt level that is not currently used by the computer Insert the COM 2 PC F in an expansion slot and turn on the power to the PC After Windows 95 starts select Control Panel from My Computer and start the Add New Hardware Click Next gt in response to To begin installing your new hardware click Next in the Add New Hardware Wizard Select Yes Recommended in response to Do you want Windows to search for your new hardware After following the instructions and completing detection use Details to check that the standard serial ports have been detected Next click Finish and restart your computer After rebooting use the procedure described in the Check Resources section below to check the interrupt level assigned to the COM 2 PC F If the value is different to the level set on the jumper correct the setting in the OS When installing by this method the COM 2 PC F channels are installed as standard serial ports COM COM 2 PC F 11 How to Use the Board 12 Compatible Mode Installation Procedure 2 1 Turn on the power to the PC without inserting the COM 2 PC F in an expansion slot After Windows 95 starts select Control Panel from My Computer and start the Add New Hardware Click Next gt in response to To begin installing your new hardware click Next in the Add New H
13. Data Format uc io i ae Up Hs os maij 40 Table 6 2 Switch and Jumper Settings of Sample Program 1 2 ANG A ook aa d 42 Table 6 3 Switch and Jumper Settings of Sample Program 3 4 6 ANG 10e cus Aenea aute Oats esee dee mats 42 Table 6 4 Switch and Jumper Settings of Sample Program 7 43 Table 6 5 Switch and Jumper Settings of Sample Program 11 43 Table 6 6 Function Selection through Internal Registers 56 Table 6 7 Baud Rate and Divisors eenee 57 Table 6 8 Number of Times the IN Instruction Must be Executed for the 2EFh Port after Accessing the LSI 58 Table 6 9 NS16550 s Register Short from National Semiconductor s data book lt 1 2 gt 62 Table 6 9 NS16550 s Register Short from National Semiconductor s data book 2 2 gt 63 Table 6 10 Specifications Differences 64 COM 2 PC F vii viii COM 2 PC F 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 Support Software of Option For Windows API PAC W32 For Windows 3 1 API SIO PC WIN For MS DOS SUPPORT PAC PC 103 Features 2 channel asynchronous communication Supports RS 232C protocol Programmable communication r
14. PC F 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 Set Baud Rate Red Generator Interrupt ID Register Se Interrupt Enable Register Read Modem Status Register Set Transmission F ormat Line Control Register Wait Time A ANKEY 1 After Initialization None K In Key Set Modem Control Output ead Line Staus Register Yes Data Transmission ead Received Data Register Data Length Wait Time sec Nae A Baud Rate sec Figure 6 3 Flowchart of Sample Program 1 COM 2 PC F 45 Appendix 46 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 CNI C START Set Baud Rate Generator Se Interrupt Enable Register Set Transmission Format Line Control Register Wait Time 1 After Initialization Set Modem Control Output Read Line Status Register Read Received Data Register O Interrupt ID Register
15. Read R Modem Status Register ead l No Line Status DO bit 1 Yes Display Receiver Buffer s Data On CRT D AN Data Length Wait Time sec Note Baud Rate Figure 6 4 Flowchart of Sample Program 2 COM 2 PC F 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 COMI 9600 N 8 2 DS AS 1 command opens the RS 232C communication file COMI It then writes the data input from the keyboard to COMI through CN1 C START Se Communication File F A ANKEY None Key InKey Data Transmission Figure 6 5 Flowchart of Sample Program 3 COM 2 PC F 47 Appendix 48 Sample Program 4 This GW BASIC sample program demonstrates the receive data capability of COM 2 PC F in Compatible mode Using this OPEN COMI 9600 N 8 2 DS AS 1 command opens the RS 232C communication file COMI It then reads the data from COMI and outputs to CRT through CNI START Se Communication File File Buffer 0 Yes No Display File Buffer s Data On CRT Figure 6 6 Flowchart of Sample Program 4 COM 2 PC F Sample Program 5 Appendix This GW BASIC sample program demonstrates the receive transmit data capability of COM 2 PC F in Enhanced mode Firs
16. Receiver Buffer s Data On CRT Set Transmission Format Line Control Register WAIT Time 1 After Initialization Receive Set Modem Yes Control Output Modem Control Read RTStoLOW Line Status Register ead Received Data Register Line Status No D6bit 1 Read Yes Interrupt ID Register Data Transmittion Read Modem Status Register No 5 bytes Transmit Yes p Yes _ Data Data Length Nate N Wait Time E ITS PIN sec Modem centra RTS to High END Figure 6 11 Flowchart of Sample Program 9 COM 2 PC F 53 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 COM and then receives the data at COMI transmitted from COM2 Received data is displayed on the CRT C START COM1 COM1 Initialization Initialization COM2 COM2 Initialization Initialization Transmit 1 byte Transmit 1 byte Data from COM1 Data from COM2 o COM2 status check COM 1 status check ready to receive ready to receive Yes Yes COM2 COM1 Data Reception Data Reception Data reception a to k Data reception A tok om COM2 complet from COM1 completed Yes END Figure 6 12 Flowchart
17. of Sample Program10 54 COM 2 PC F 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 COMG transmitted from COM4 Received data is displayed on the CRT OG COM3 COM3 Initialization Initialization COM4 COM4 Initialization Initialization Transmit 1 byte Transmit 1 byte Data from COM3 Data from COM4 p COMA status check COM 3 status check No ready to receive ready to receive Yes COM4 COM3 Data Reception Data Reception Data reception a to K rom COM 4 complet Data reception A to e No Figure 6 13 Flowchart of Sample Program 11 COM 2 PC F 55 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 shows how functions relate to the internal registers To access the baud rate generator defined on the next page the DLAB signal must be set high For more details on NS16550 refer to the National Semiconductor Data Book Table 6 6 Function Selection through Internal Registers I O P
18. protective packaging until the computer case is open and ready for installation Electrical static can cause damage to electrical components COM 2 PC F Table of Contents o OD A Ke s REM E A Trader KS tiui n ELE vga i Product Configuration so savi sodas aou cada ces li 1 Introduction 2i DEDERE ERE EEEEUEEEEE LEE EE LEE EE EAE EEEE D 1 About the COM 2 PC F Board 1 Support Software of Option eeeeeeeee 1 Pea U 65 viss rasta rada aa ak ok iad ean eks 1 Limited Three Year Warranty eese 2 How to Obtain Service 2 EXaDHIEEV o cato bebo D a aad dani DR vr Rao a ed Pas 2 About the Manual 3 2 How to Use the Board een 5 Compatible M ode and Enhanced Mode 5 Compatible MOd c ERE 5 Enhanced Mode ie Grid m deo aim deo on en SN ek 5 Operating under Windows M e 98 ee 6 Procedur eer a 6 Operating under Windows 95 ene 10 Proc dur jatmu da du d 10 Operating under Windows 2000 14 PEOGGCQUEG nis bae tread dede ede esse sued UR EE 14 Operating under Windows NT eeeeeern 18 ljgec elly PEN 18 Operating under Windows 3 1 eeeeeeee 19 Krocedit studies EOM NE EN EN 19 Operating under MS DOS 20 PTOCOOHBED eee kritu bore BOE ae oe arene 20 3 Hardware Setup i3 asus k d 23
19. the files from A to C with the following commands A gt C C gt md comf C gt xcopy A c Ycomf s COM 2 PC F 39 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 Table 6 1 Data Format r BAS 1 H 2 H 3 H 4 H 5 H 6 H 7 H H H 8 H 9 H 103HD01 BAS 103H 103H 103H D02 BAS D03 BAS D04 BAS 103HD05 BAS 103HD06 BAS 103H D07 BAS 103HD ASM 103H D BIN 103HD08 BAS 103HD09 BAS MSC 10 COM21_1 C COM21 LEXE 11 COM34 1 C COM34 LEXE COM2V SETCOM EXE Data transmission Enhanced mode Data reception Enhanced mode Data transmission COM 1 mode Data reception COM 1 mode Data transmission and reception Enhanced mode Data transmission and reception COM 1 COM2 mode Interrupt driven data transmission and reception Half duplex data transmission Enhanced mode Half duplex data reception Enhanced mode Data transmission and reception COM 1 COM2 mode Data transmission and reception COM 3 COM4 mode Address setting file for Compatible mode Figure 6 1 Floppy Disk Files 40 COM 2 PC F Appendix Notes All the sample programs must be run on a PC
20. 25 C Circuitry Diagrams 34 Compatible Mode 5 Connectors 31 E Enhanced Mode 5 External Connection 31 F Features 1 I I O Address 24 Internal Registers 56 Interrupt Level 26 L Liability 2 LSI Recovery Time 58 Index M Mounting Method 28 MS DOS 20 N NS16550 s Register 62 O Obtain Service 2 S Sample Programs 39 Setup 23 Specifications 33 Support Software of Option 1 System Reference 33 T Troubleshooting 35 COM 2 PC F 65 Index W Warranty 2 Windows 2000 14 Windows 3 1 19 Windows 95 10 Windows Me 98 6 Windows NT 18 66 COM 2 PC F A 41 606 LZU2821 021025 961015 CONTEC Group JAPAN U S A EUROPE KOREA CHINA TAIWAN Headquarters CONTEC Co LTD 3 9 31 Himesato Nishiyodogawa ku Osaka 555 0025 Japan Tel 81 6 6477 5219 Fax 81 6 6477 1692 E mail intsales Gosaka contec co jp CONTEC MICROELECTRONICS U S A INC 744 South Hillview Drive Milpitas CA 95035 U S A Tel 1 408 719 8200 Fax 1 408 719 6750 E mail tech supportQ contecusa com CONTEC MICROELECTRONICS EUROPE B V Binnenweg 4 2132 CT Hoofddorp The Netherlands Tel 31 23 567 3030 Fax 31 23 567 3035 E mail tech support conteceu nl HYOJIN CONTEC Co LTD Ki im Bldg 399 Shindolim Dong Kuro ku Seoul Korea Tel 82 2 2636 4277 8 Fax 82 2 2636 4279 E mail product conteck com INTERNATION
21. 8254 or equivalent Microsoft Macro Assembler OUT DX AL Access to the i 8254 IN AL 2EFH Execute IN AL 2EFH once to provide the recovery time Microsoft C C outp port byte Access to the 18254 t zi 0x2ef PE t tzi 0x2ef t CUSPRPUURZEUI provi de the rer j tim S P COM 2 PC F 59 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 IRQIS by setting JP1 before installing this board Each channel s interrupt signal will be latched in the Interrupt Vector Register IVR Therefore when the CPU receives an interrupt requirement the interrupt service routine can check the IVR to determine which channel is requesting interrupt service After finishing the interrupt service process the interrupt service routine has to check IVR again to see if a Pending interrupt request has occurred ACE Asynchronous Communication Element has its own internal register for enabling interrupts and identifying the interrupt service requesting channel Refer to National Semiconductor s data book for additional details on NS16550 and its operation When turning on the PC s main power the ACE s master reset function sets OUT1 to High This status automatically enables the interrupt If one of the two channels is no
22. AL CONTEC TECHNOLOGY CO LTD B 8F Hua Tong Building No B19 Che Gong Zhuang West Road Hai Dian District Beijing 100044 China Tel 86 10 8801 8228 Fax 86 10 8801 8209 E mail ict ict com cn SHANGHAI CONTEC MICROELECTRONICS CORP No 481 Gui Ping Road Cao He Jing Hi Tech Park Shanghai 200233 China Tel 86 21 6485 1907 Fax 86 21 6485 0330 E mail contec contec com cn SHENYANG CONTEC MICROELECTRONICS Co LTD No 169 Qingnian Street Shenhe District Shenyang 110015 China Tel 86 24 2392 9771 Fax 86 24 2392 9773 MACROMATE CORP 8F Universal Center No 179 Ta Tung Rd Sec 1 Hsi Chih Taipei Hsien Taiwan R O C Tel 886 2 2647 9353 Fax 886 2 2647 9373 E mail intl macromate com tw A 46 368 Ver 2001 02 06
23. Address Settings Interrupt Vector Function 1 O Address NNNM NN MSS c ZEN LL Interrupt Vector Function 1 O Address Aa Pov cons see f 3 PE cow orem fd Figure 3 2 shows the CN1 bace I O address set to 2A0H and the CN2 bace I O address set to 2A8H COM 2 PC F 25 Hardware Setup Interrupt Level Setting 26 Note 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 When using interrupts set an interrupt level that is not used by any other device Setting Procedure Note When not Using Interrupts Place a short connector on the NC pin of each jumper JP1 JP2 and JP3 When Using Interrupts Connect the interrupt level using the short connector on each jumper JP1 JP2 and JP3 Available interrupt levels are IRQ3 to 7 9 to 12 14 and 15 JPI o o 1E o o o o o o o Enhanced o o o O o o o o o o o o 9 3 4 5 6 71011121415NC JP2 o o O o jojojo o jo o ojo COM CN1 oJ o ojo ojojo o oJ o o o 93456 71011121415NC JP3 o e oo o o o olo o oo COM CN2 lo o o o ololo oo olo o 93456 71011121415NC Figure 3 3 Interrupt Level Settings If SW1 selects Enhanced mode the settings in Figure 3 3 specify that CN1 and CN2 both use IRQ5 If Compatible mode is set the settings specify that CN1 uses IRQ4 and CN2 uses IRQ3 Jumpe
24. COM 2 PC F RS 232C 2ch Serial I O Board User s Guide CONTEC Copyright 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 The information in this document is subject to change without notice All relevant issues have been considered in the preparation of this document Should you notice an omission or any questionable item in this document please feel free to notify CONTEC Co LTD Regardless of the foregoing statement CONTEC assumes no responsibility for any errors that may appear in this document nor for results obtained by the user as a result of using this product Trademarks MS Microsoft MS DOS Windows and Windows NT are trademarks of Microsoft Corporation Other brand and product names are trademarks of their respective holder COM 2 PC F i Product Configuration Note COM 2 PC F Board 1 Sample Program Diskette 3 5inch 1 44MB 1 User s Guide This Booklet 1 Unpacking This board is specially packed in an anti static bag to prevent damage in shipping 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 Do not remove the board from its
25. MI and COMO The program sends the keyboard input data from COMI to COM2 and displays the data received from COM2 to CRT START Set COM1 Set COM2 nz A ANKEY NoneKey InKey Data Transmission E Flee D gt Yes No Display File Buffer s Data On CRT Figure 6 8 Flowchart of Sample Program 6 50 COM 2 PC F 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 Data to be transmitted is read from the data buffer START Register Machine Language Area None Key Set Segment Line Status Load Interrupt D5bit 1 Handling Program No Yes Set Baud Rate Generator Data Transmission Se Interrupt Enable Register pag Set Transmission F ormat Line Status Line Control Register No DO bit 21 Yes Wait Time 1 After Initialization t Receive Data Set Modem Control Output Read Line Status Register Read Received Data Register Read Interrupt ID Register Read Modem Status Register
26. Palm Omm ent t level setting j AREA UPL IPL jp E uo n CN1 CN2 JP1 Enhanced mode n pE o o o 1121415NC e COM2 COM4 oj ojo o o o o o o X jojo o o 9 21415 NC Figure 3 1 Names of Board Components and Default Factory Settings COM 2 PC F 23 Hardware Setup I O Address Setting 24 Notes 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 02A0H and act as the ID number for each I O device Most expansion boards are controlled via a range of consecutive I O addresses The address of the first I O address in the range is called the base I O address When using Enhanced mode either 1A0H or 2A0H is selected as the base I O address In Compatible mode the fixed address for the PC system is used 1 When using more than one expansion board set each board so that their I O addresses do not overlap 2 If the PC already has COMI to COM4 ports those ports cannot be set for the board COM 2 PC F Hardware Setup Setting Procedure The I O address is set using a DIP switch SW1 on the board Figure 3 2 I O Address DIP Switch T D 3 1 I O
27. XD RTS ats ACTS CTS a DTR DTR A DSR DSRJ SG SG Board TExternal Device Figure 3 11 Example Connection to a PC 1 p ATXD TXD RXD RXD TRTS RTST TCTS CTS DTR DTR DSR DSR ISG SG Board TExternal Device Figure 3 12 Example Connection to a Device 32 COM 2 PC F System Reference 4 System Reference Specifications Table 4 1 Specifications 5 6 7 8 bits Data Length 1 1 5 2 stop bits 1 Parity heck Even Odd Non parity 1 Controller Chip NS16550 or equivalent Enhanced mode 1 level Interrupt Requests Compatible mode 2 levels 1 O Address 8 bits x 16 ports 5VDC 420mA Max Power Consumption 12VDC 60mA Max 12VDC 50mA Max Operating Temperature 0 50 C Storage Temperature 20 60 C Relative Humidity 20 9096 non condensing N 160 0 x 107 0 x 18 5mm Dimensions 6 3inch x 4 2inch x 0 7inch Weight 130g 1 Software programmable For details see Appendix B Notes on Developing Driver Software or refer to the data sheet of the NS16550 or the equivalent chip Board Dimensions lt 160 0 U 107 0 mm COM 2 PC F 33 System Reference Circuitry Diagrams SN75188 a D TXD RTS DTR SN 75189 an 15pF Figure 4 1 Circuitry Diagrams RXD CTS DSR Block Diagram The following is a block diagram of the COM 2 PC F interface board ADDRESS DECODER Addr Bus Addr
28. addresses for the CONTEC board and all other boards Interrupt levels for the CONTEC board and all other boards DMA channels for the CONTEC board and all other boards Gf applicable The programming language that you are using and the version number COM 2 PC F 37 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 38 COM 2 PC F Appendix 6 Appendix A Sample Programs for MS DOS 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 A gt dir Backup Copy Make a backup of the COM 2 PC F diskette before use This will protect you if the original copy becomes damaged or destroyed Use the DOS DISKCOPY command A gt diskcopy a b Keep the original in a safe place and use the backup copy for the following procedures Copy Files to Hard Disk If a hard disk drive is available on your PC then installing and executing the sample programs from the hard disk drive will be faster than using a floppy drive To run sample programs from the hard drive create a subdirectory named COM2F on your C drive and copy
29. ardware Wizard Select No in response to Do you want Windows to search for your new hardware Select the Ports COM amp LPT folder from the Hardware types screen Select Communication Port from Models and click on Have Disk in the screen When the Install From Disk screen appears place the floppy disk in the drive enter the drive name in Copy manufacturer s file from then click OK The next screen displays the board type Select CONTEC Co Ltd COM 2 PC F V H Compatible from Models Next the resource items and settings are displayed Takea note of the displayed I O address and interrupt level 10 End the operation as instructed This completes the installation 1 of one port When using both ports in Compatible mode repeat the procedure from step 2 If the interrupt level used by a COM 2 PC F port is already used on the PC change the interrupt level to an available level Turn off the power then set the operation mode I O address and interrupt level on the COM 2 PC F to the values set in steps 9 and 10 above Set the COM 2 PC F switch and jumpers as described in Hardware Setup COM 2 PC F How to Use the Board Enhanced Mode Installation Procedure When it is used with Enhanced Mode API PAC W32 of the option is necessary Refer to Help HWINSTE HLP of the way of registering the hardware being attached to API PAC W32 for the way of installing it Check Resour
30. ate from 50 to 115 200 bits per second Two operational modes Enhanced and Compatible COMI COM2 COM3 and COM4 For more information see System Reference COM 2 PC F 1 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 freight prepaid with a copy of the original invoice and a Return Merchandise Authorization to the distributor or the CONTEC group office from which it was purchased This warranty is not applicable for scratches or normal wear but only for the electronic circuitry and original boards The warranty is not applicable if the device has been tampered with or damaged through abuse mistreatment neglect or unreasonable use or if the original invoice is not included in which case repairs will be considered beyond the warranty policy How to Obtain Service For replacement or repair return the device freight prepaid with a copy of the original invoice Please obtain a Return Merchandise Authorization Number RMA from the CONTEC group office where you purchased before returning any product No product will be accepted by CONTEC group without the RMA number Liability The obligation of the warrantor is solely to repair or replace the product In no event will the warrant
31. ces Always check the PC resources I O address and interrupt level assigned to the COM 2 PC F before actually using the board Use the following procedure to check the resources managed by the OS 1 Select System from Control Panel and open Device Manager 2 For Compatible mode double click on the Ports COM amp 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 5 Disable Use automatic settings first if changing the settings If changing an I O address change the Basic configuration from the Setting based on To change an interrupt level click on Change setting After checking the resources check again that the interrupt level value on the COM 2 PC F board match the settings in the OS COM 2 PC F 13 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 In Windows 2000 this is called hardware installation Use the following installation procedure Check the Current Settings First check the current settings Check whi
32. ch interrupt levels are available If using in Compatible mode also check which COM ports COMI to COM4 are already set The COM 2 PC F cannot be assigned to a COM port that is already set The procedure for checking is as follows Check the interrupt level 1 Select System from Control Panel and click Hardware property sheet then open Device Manager 2 Select the View and click Resource by type 3 Display the Interrupt request IRQ list and check which interrupt levels are available Check the ports 1 Select System from Control Panel and click Hardware property sheet then open Device Manager 2 Double click on the Ports COM amp LPT Infrared Modem folder and check which ports are already set 14 COM 2 PC F 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 l 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 Insert the COM 2 PC F in an expansion slot and turn on the power to the PC After Windows 2000 starts select Control Panel from My Computer and start the Add Remove Hardware Click Next gt in response to Welcome to the Add Remove Hardware Wizard in the Add Remove Ha
33. e 3 6 Expansion Slot Cover Caution To prevent a discharge of static electricity from damaging the board it is important to ground yourself Hold the packaged board in one hand and touch an unpainted grounded metal surface with the other hand Then hold the non conductive part of the board and remove it from the bag Don t touch the underside side of the board with the exposed pins and solder Place the board on a clean non conductive surface 4 Remove the board from the anti static packaging 5 Inspectthe 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 6 Insert the board into the expansion slot and press in firmly Make sure the board is fully seated in the support bracket COM 2 PC F 29 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 30 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
34. e 6 9 NS16550 s Register Short from National Semiconductor s data book lt 1 2 gt Receiver Transmitter Interrupt Interrupt FIFO Line Buffer Holding Enable Ident Control Control Register Read Only Register Write Only THR Data Bit O Register Register Register Read Only Write Only m p om T ore e Enable gif FIFO Word Length Register Data Bit 0 Received Interrupt Enable Data Available Interrupt ERBFI Data Bit 1 Enable Transmitter Holding Register Empty Interrupt ETBEI Enable Data Bit 2 Receiver Line Status Interrupt ELSI Enable MODEM Status Data Bit 3 Data Bit 4 Data Bit 5 Data Bit 6 62 COM 2 PC F Data Bit 3 Interrupt EDSSI i P Data Bit 5 Data Bit 6 Data Bit 7 FIFOs Enabled FIFOs Enabled Pending Interrupt ID Bit 0 Interrupt ID Bit 1 Interrupt ID Bit 2 Trigger LSB Trigger MSB Select Bit 0 WLSO Word Length Select Bit1 WLS1 Number of Stop Bits STB Divisor Latch Access Bit DLAB Table 6 9 NS16550 s Register Short from National Semiconductor s data book lt 2 2 gt Register Appendix MODEM Line Control Status Register Register Data Terminal Ready DTR Overrun Error OE Framing Error FE Break Interrupt BI Transmitter Holding Register THRE Transmitter Empty TEMT Error in RCVR FIFO MODEM Scratch Status Register
35. ed by the COM 2 PC F do not need to be set for the OS when using the board in enhanced mode 18 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 Set the COM 2 PC F switch and jumpers as described in Hardware Setup When using the board in Compatible mode the OS must be set to recognize the I O address and interrupt level used by the COM 2 PC F Use the Ports icon in Control Panel to set the I O address and interrupt level The I O address and interrupt level used by the COM 2 PC F do not need to be set for the OS when using the board in Enhanced mode COM 2 PC F 19 How to Use the Board Operating under MS DOS This section describes the procedure for using the board under MS DOS 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 Set the COM 2 PC F switch and jumpers as described in Hardware Setup When using the board in Compatible mode the system area of the PC must be set to recognize the I O address used by the COM 2 PC F If a system configuration program or the MODE COM command is available on the PC use the program to set the I O addresses for the standard serial ports If neither a system configuration program nor
36. flict with interrupts required by other devices or cards Try one of the sample programs provided on the disk and see if it works COM 2 PC F 35 Troubleshooting 36 Does the sample program work Check the following Signals are connected to the correct pins Pin connections on the I O cables are secure Signals are present at the external connectors Try using the COM 2 PC F board with other non essential boards removed Remove other boards one by one checking the COM 2 PC F for successful operation after each board is removed Is the input data accurate If you believe something is wrong with either the input data or the output data check the following Environmental noise Move the equipment and cables away from sources of electrical noise Try an isolated power source Dirty connector edge Clean the edge External connectors fit tightly Separate and reattach external cables Still have a probrem Note Contact CONTEC group office where you purchased as shown in the last page of this manual Before you call make a list of the following information Our technical representatives will need the following information to help you 1 Your name company and phone number 2 The brand and type of computer you are using e g IBM AT Compaq 386 COM 2 PC F Troubleshooting DOS Version Name of the CONTEC board that you are using Names of other boards in the computer VO
37. following procedure to check the resources managed by the OS 1 Select System from Control Panel and click Hardware property sheet then open Device Manager 2 For Compatible mode double click on the Ports COM amp 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 5 Disable Use automatic settings first if changing the settings If changing an I O address change the Basic configuration from the Setting based on To change an interrupt level click on Change setting After checking the resources check again that the interrupt level value on the COM 2 PC F board match the settings in the OS COM 2 PC F 17 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 Set the COM 2 PC F switch and jumpers as described in Hardware Setup When using the board in compatible mode the OS must be set to recognize the I O address and interrupt level used by the COM 2 PC F Use the Ports icon in Control Panel to set the I O address and interrupt level The I O address and interrupt level us
38. fter checking the resources check again that the interrupt level value on the COM 2 PC F board match the settings in the OS COM 2 PC F 9 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 X PC F In Windows 95 this is called hardware installation Use the following installation procedure Check the Current Settings First check the current settings Check which interrupt levels are available If using in Compatible mode also check which COM ports COMI to COM4 are already set The COM 2 PC F cannot be assigned to a COM port that is already set The procedure for checking is as follows Check the interrupt level 1 Select System from Control Panel and open Device Manager 2 Select the Computer folder and click Properties 3 Display the Interrupt request IRQ list and check which interrupt levels are available Check the ports 1 Select System from Control Panel and open Device Manager 2 Double click on the Ports COM amp LPT folder and check which ports are already set 10 COM 2 PC F 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
39. operating under MS DOS Sample programs 3 4 6 and 10 cannot be used on a PC that already has COMI and COM2 ports Similarly sample programs 11 cannot be used on a PC that already has COM3 and COM4 ports As sample programs 6 and 9 use half duplex mode they can only be used with the COM 2PD PC board COM 2 PC F 41 Appendix Switch and Jumper Settings Table 6 2 Switch and Jumper Settings of Sample Program 1 2 and 5 Item Settings 1 O Address SW1 Interrupt L evel JP1 J P2 J P3 o o o o o o o o o ojoj JPl o o o o o o o o o o o o 9345 6 71011121415NC ojojojojojojojojojojofo JP2 olol o o o o olol ololo o 345 7 10 11121415NC JP3S S o o o o e o o o o e 3 4 5 6 7 10 11121415NC Table 6 3 Switch and Jumper Settings of Sample Program 3 4 6 and 10 Item Settings 1 O Address SW1 Interrupt Level P1 JP2 JP3 o o o o o o o o o o oj P1 JP3 pals Slololololofolololole 9 4567 1 415 o o o o o o o o o o o JP2 o o o o o o o o o o o 934 6 7 10 1121415NC o o o o o o o o o o o seale e s s e o o 934567101121415NC 42 COM 2 PC F Appendix Table 6 4 Switch and Jumper Settings of Sample Program 7 Item Settings
40. or be liable for any incidental or consequential damages due to such defect or consequences that arise from inexperienced usage misuse or malfunction of this device 2 COM 2 PC F 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 3 Introduction 4 COM 2 PC F How to Use the Board 2 How to Use the Board Compatible Mode and Enhanced Mode The COM 2 PC F supports Compatible mode and Enhanced mode In Compatible mode the board channels operate as standard PC serial ports In Enhanced mode the board operates under CONTEC s proprietary control procedures Give full consideration to the features of each mode when selecting which mode to use in your system Compatible Mode The two channels of the COM 2 PC F can be used as standard PC serial ports Channel CN1 of the COM 2 PC F can be assigned as COMI or COM3 and channel CN2 can be assigned as COM2 or COMA In Compatible mode each channel uses one interrupt level Therefore your PC must have at least two interrupt levels available 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 separa
41. ort Address DLAB 1 ACE Register NS16550 Base Address 0H o Receiver Buffer register R Base Address 40H 0 Transmitter Holding register Base Address 1H oo Interrupt Enable Register eure Base Address 2H Interrupt ID R Base Address 2H FIFO Control Base Address 3H Line Control Base Address 44H Modem Control Base Address 5H Line Status Base Address 46H Modem Status E Base Address 7H Scratchpad Register Base Address 40H Baud Rate Divider Register LSB Base Address 1H Baud Rate Divider Register MSB 1 DLAB Divisor Latch Access Bit in the Modem Status Register 2 R Read only W Write only 56 COM 2 PC F 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 5 1 The output frequency of the baud rate generator equals 16 times the baud rate Based on the originating clock frequency the baud rate is derived as Divisor clock frequency baud rate x 16 Two eight bit divisor registers on the ACEs store the divisor in a 16 bit binary format These divisors must be loaded during initialization into Divider registers see Table 6 6 Table 6 7 provides frequently used baud rates and their divisors The percent error is the difference between ac
42. r of the mode which isn t used is to connect a short connector to the NC pin COM 2 PC F Note Hardware Setup Table 3 2 lists the I O address and standard interrupt level settings for COMI to COM4 Compatible mode Table 3 2 Example Compatible Mode Settings 3F8 3FF 2F8 2FF 3E8 3EF 1 OnthelBM PS 55Z and similar 2E8 2EF COM3 uses IRQ3 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 COMA must be set to interrupt levels other than IRQ3 and IRQ4 because COMI uses IRQ4 and COM2 uses IRO3 COM 2 PC F 27 Hardware Setup Mounting Method 28 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 When removing screws use a screwdriver that matches the screw heads Cover mounting screws Cover mounting screws Figure 3 4 Rear Panel of IBM PC AT 2 Hold the left and right sides of the front cover and remove it from the computer s chassis by sliding it to the front Figure 3 5 Removing the Cover COM 2 PC F Hardware Setup 3 Remove the screw retaining the cover of the slot where the board is to be mounted and remove the cover from the rear panel Figur
43. rdware Wizard Select Add Troubleshoot a device in response to Choose a Hardware Task The next select Add a New Device and click Next Select Yes in response to Do you want Windows to search for your new hardware and click Next It confirms that two Install Communications Port sentences are indicated on the Detected Hardware and click Next After rebooting use the procedure described in the Check Resources section below to check the interrupt level assigned to the COM 2 PC F If the value is different to the level set on the jumper correct the setting in the OS 10 When installing by this method the COM 2 PC F channels are installed as standard serial ports COM COM 2 PC F 15 How to Use the Board Compatible Mode Installation Procedure 2 It can t be used with Compatible Mode when API SIO 98 PC NT of packing together is used for API PAC W32 1 Turn on the power to the PC without inserting the COM 2 PC F in an expansion slot 2 After Windows 2000 starts select Control Panel from My Computer and start the Add Remove Hardware 3 Click Next gt in response to Welcome to the Add Remove Hardware Wizard in the Add Remove Hardware Wizard 4 Select Add Troubleshoot a device in response to Choose a Hardware Task 5 The next select Add a New Device and click Next 6 Select No in response to Do you want Windows to search for your new hardware
44. t it initializes the ACE it then receives the data input from the keyboard through CN1 CN2 C START Channel 1 Channel 2 Set Baud Rate Set Baud Rate Generator Generator Set Set Interrupt Enable Register Interrupt Enable Register Set Transmission F ormat Line Control Register Set Transmission F ormat Line Control Register Wait Time After Initialization I Wait Time After Initialization n Set Modem Control Set Modem Control Output Output Read Line Status Register Read Line Status Register Read Received Data Register Read Received Data Register Finally it outputs the data to CRT through 2 A ANKEY None Key Key Line Status No D5 bit Z1 Yes V Data Transmission Yes Display File Buffer s Data On CRT Read g Read Interrupt ID Register Interrupt ID Register Read Read i Modem Status Register Modem Status Register Note N Wait Time Data Length sec Baud Rate Figure 6 7 Flowchart of Sample Program 5 COM 2 PC F 49 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 COMI 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 CO
45. t allowed to generate the interrupt set the OUTI bit to Low In addition to being able to enable disable interrupt by channel the board also has a global interrupt enable function This global interrupt enable function determines whether the IRQ line is active or not When turning on the power this function sets to the disable status To enable the PC bus to accept an interrupt this function has to be programmed to enable status To enable this function write 1 to IVR s D7 bit to disable this function write 0 to IVR s D7 bit Figure 6 14 describes the bit function of IVR in Enhanced mode The I O address of IVR is either 2BF or IBF 60 COM 2 PC F Appendix Output Port D7 D6 D5 D4 D3 D2 D1 DO 2BF 1BF Not Used Global I nterrupt 0 Disable 1 Enable Input Port D7 D6 D5 D4 D3 D2 D1 DO 2BF 1BF Not Used CH1 Interrupt 0 Occurred 1 Not Occurred gt CH2 Interrupt Occurr 1 Not Occurred Global I nterrupt 0 Enable 1 Disable Figure 6 14 IVR Bit Function in Enhanced Mode Compatible Mode When in the Compatible mode CN1 of the interface board is compatible with COMI or COMG and CN2 is compatible with COM2 or COM4 By using JP2 and JP3 interrupt levels can be selected from IRQ3 IRQ7 IRQ9 IRQI2 IRQ14 and IRO15 for CNI and CN2 Normally COM1 COM3 uses IRQ4 and COM2 COM4 uses IRQ3 COM 2 PC F 61 Appendix C The Details on NS16550 Tabl
46. t is already used on the PC change the interrupt level to an available level Turn off the power then set the operation mode I O address and interrupt level on the COM 2 PC F to the values set in steps 9 and 10 above Set the COM 2 PC F switch and jumpers as described in Hardware Setup COM 2 PC F How to Use the Board Enhanced Mode Installation Procedure When it is used with Enhanced Mode API PAC W32 of the option is necessary Refer to Help HWINSTE HLP of the way of registering the hardware being attached to API PAC W32 for the way of installing it Check Resources Always check the PC resources I O address and interrupt level assigned to the COM 2 PC F before actually using the board Use the following procedure to check the resources managed by the OS 1 Select System from Control Panel and click Hardware property sheet then open Device Manager 2 For Compatible mode double click on the Ports COM amp 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 5 Disable Use automatic settings first if changing the settings If changing an I O address change the Basic configuration from the Setting based on To change an interrupt level click on Change setting A
47. tely or some other driver software that supports standard serial ports Enhanced Mode The COM 2 PC F operates under CONTEC s proprietary control procedures In Enhanced mode a single interrupt level is used to control both channels Therefore the board can be used even if your PC has only one free interrupt level available The I O address used is specified by CONTEC As the board operates under CONTEC s proprietary control procedures you must use the CONTEC driver software purchased separately or develop your own driver software Programming for Enhanced mode is different to programming for Compatible mode COM 2 PC F 5 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 In Windows Me 98 this is called hardware installation Use the following installation procedure Check the Current Settings First check the current settings Check which interrupt levels are available If using in Compatible mode also check which COM ports COMI to COM4 are already set The COM 2 PC F cannot be assigned to a COM port that is already set The procedure for checking is as follows Check the interrupt level 1 Select System from Control Panel and open Device Manager
48. the MODE COM command is available use the SETCOM EXE program provided on the floppy disk to set the I O addresses for the standard serial ports as shown below Set the I O address to NONE for unused serial ports C gt SETCOM COMI 1 0 address COM2 1 0 address COM3 1 0 address COM4 1 0 address Example C gt SETCOM 3F8 2F8 NONE NONE COM 2 PC series compatible mode setting software by CONTEC 1 0 address data COMI 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 20 COM 2 PC F Note How to Use the Board 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 Table 2 1 COM Port Support for Various Programming Languages weekc o o 9 ara E 1 cwsasc o o e e morsa o o 9 0 If writing your own driver software see Appendix B Notes on Developing Driver Software COM 2 PC F 21 How to Use the Board 22 COM 2 PC F 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 I O address DIP switch SW1 a oO Y sn
49. tual and desired value Table 6 7 Baud Rate and Divisors 50 75 110 150 300 600 1200 1800 2000 2400 3600 4800 7200 9600 19200 38400 57600 115200 COM 2 PC F 57 Appendix LSI Recovery Time 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 In PCs using i386 or earlier CPUs software waits JMP 2 can be used to provide a recovery time when accessing the LSI However software waits cannot be used to provide a recovery time in PCs with a 1486 or later CPU because of the CPU cache memory function The following describes one method of providing the recovery time when using an 1486 or later CPU In the PC AT and compatible computers executing an IN instruction for the port at I O address 2EFh COMA scratch register takes a minimum of 0 5Hs As this time does not depend on the CPU type or clock rate the time can be used to provide the recovery time After accessing any of the devices listed in Table 6 8 execute the IN instruction for the 2EFh port the required number of times to provide the recovery time Table 6 8 Number of Times the IN Instruction Must be Executed for the 2EFh Port after Accessing the LSI 58 COM 2 PC F Appendix Example program for accessing an i
Download Pdf Manuals
Related Search
Related Contents
Manual Ordre du jour Fundamentos de Programación - Instituto Tecnológico de WATERPROOF CASE User`s Manual Pitco Frialator E14 User's Manual Petit guide à l`attention des jardiniers amateurs fr guide d`utilisateur super robust Portable Suction Unit CAMI New Askir30 12V User Manual Sony CMT-HX3 User's Manual Registered Trademark Copyright © All rights reserved.
Failed to retrieve file