® Digital I/O PCIDIO 24H High-Density, PCI-Bus, Parallel Digital Board with 24 Channels, 24mA/Channel Sink PCIDIO 48H High-Density, PCI-Bus, Parallel Digital Board with 48 Channels, 24mA/Channel Sink PCIDIO 96H High-Density, PCI-Bus, Parallel Digital Board with 96 Channels, 24mA/Channel Sink USER’S MANUAL VER. 2.5 • OCT 2000 & No part of this manual may be reproduced without permission. CyberResearch®, Inc. www.cyberresearch.com 25 Business Park Dr.
©Copyright 2003 All Rights Reserved. October 2000 The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of CyberResearch, Inc. In no event will CyberResearch, Inc. be liable for direct, indirect, special, incidental, or consequential damages arising out of the use of or inability to use the product or documentation, even if advised of the possibility of such damages.
Table of Contents Chapter 1 Introduction.............................................................. 1 1.1 Features .........................................................................................................2 1.1.1 Digital I/O Ports.....................................................................................2 1.1.2 Timer/Counter and Interrupt System..............................................2 1.1.3 Miscellaneous .....................................................................
Chapter 3 Registers Format ................................................... 20 3.1 3.2 PCI PnP Registers......................................................................................20 I/O Address Map.........................................................................................21 Chapter 4 Operation Theorem............................................... 22 4.1 Digital I/O Ports ...........................................................................................22 4.1.
5.13 5.14 5.15 5.16 5.17 Get IRQ Status.........................................................................................44 Clear IRQ ..................................................................................................45 Software Reset.......................................................................................45 Interrupt Start under Windows...........................................................46 Interrupt Stop under Windows .............................................
How to Use This Guide This manual is designed to help you use the 24H/48H/96H series products. It describes how to modify and control various functions on the cards to meet your requirements. It is divided into five chapters: l Chapter 1, Introduction, gives an overview of the product features. applications, and specifications. l Chapter 2, Installation, describes how to install the 24H/48H/96H series products.
1 Introduction The PCIDIO 24H/48H/96H series products are general purpose digital I/O cards. This series includes three cards: l PCIDIO 24H: 24-CH DIO card l PCIDIO 48H: 48-CH DIO card l PCIDIO 96H: 96-CH DIO card The 48H series products are multi -fu nction digital I/O boards used for industrial PC with a PCI bus. The cards are plug-and-play, therefore it is not necessary to set any jumpers for configuration of I/O address or interrupt resources.
PCIDIO 24H/48H/96H are equipped with 1,2, and 4 50-pin male ribbon connectors respectively. 1.1 Features The 24H/48H/96H series products provide the following advanced features: 1.1.1 Digital I/O Ports l l l l l 24/ 48/96 TTL/DTL compatible digital I/O lines Emulates industry standard mode 0 of 8255 PPI Buffered circuits for higher driving Direct interface with OPTO-22 compatible I/O module Output status read-back 1.1.
1.3 Specifications I/O channels 24-bit for PCIDIO 24H 48-bit for PCIDIO 48H 96-bit for PCIDIO 96H Digital Input Signal Logic High Voltage:2.0 V to 5.25V Logic Low Voltage: 0.0 V to 0.80V Logic High Current: 20.0 uA Logic Low Current: -0.2 mA Logic High Voltage: Minimum 2.4 V Logic Low Voltage: Maximum 0.5V Logic High Current: -15.0 mA Logic Low Current: 24.
1.4 Software Support CyberResearch provides versatile software drivers and packages for users’ different approach to built-up a system. We not only provide programming library such as DLL for many Windows systems, but also provide drivers for many software package such as LabVIEW®, HP VEETM, DASYLabTM, and InTouchTM. All the software options are included with the software CD. Some software drivers are protected with a serial licensed code.
® 1.4.2 PCI LV: LabVIEW Driver PCI LV contains the VIs, which are used to interface with NI’s LabVIEW® software package. The PCI LV supports Windows 95/98/NT/2000. The LabVIEW® drivers are free and shipped with the board. You can install and use them without license. For detail information about PCI LV, please refer to the user’s guide on the CD. (\\Manuals\PCI LV 1-2.pdf) 1.4.3 PCI VEE: HP -VEE Driver The PCI VEE includes the user objects, which are used to interface with HP VEE software package.
6 • Introduction
2 Installation This chapter describes how to install the 24H/48H/96H series products. At first, the contents in the package and unpacking information that you should be careful of are described. l l l l l l l l 2.1 Check what you have (section 2.1) Unpacking (section 2.2) Check the PCB (section 2.3) Hardware installation (section 2.4) Device Installation for Windows System (section 2.5) Connector pin assignment (section 2.6) Jumpers setup (section 2.7) Termination boards connection (section 2.
2.2 Unpacking Your card contains sensitive electronic components that can be easily damaged by static electricity. The card should be put on a grounded anti -static mat. The operator should wear an anti -static wristband, grounded at the same point as the anti -static mat. Inspect the card module carton for obvious damage. Shipping and handling may cause damage to your module. Be sure there is no shipping and handling damage on the module before processing.
2.3 PCB Layout 2.3.1 PCIDIO 48H/24H PCB Layout Figure 2.3.
2.3.2 PCIDIO 96H PCB Layout PCI Controller CN1 CN2 CN3 Figure 2.3.
2.4 Hardware Installation PCI configuration The PCI cards are equipped with a plug and play PCI controller, it can request base addresses and interrupts in accordance with the PCI standard. The system BIOS will install the system resource based on the PCI cards’ configuration registers and system parameters (which are set by system BIOS). Interrupt assignment and memory usage (I/O port locations) of the PCI cards can be assigned by system BIOS only.
2.5 Device Installation for Windows Systems Once Windows 95/98/2000/XP h a s started, the Plug and Play function of Windows system will find the new PCIDAQ cards. If this is the first time you're installing a PCIDAQ card in your Windows system , you will be prompted to input the device information source. Please refer to the “Software Installation Guide” for the steps of installing the device.
2.6 Connector Pin Assignment 2.6.1 Pin Assignment of PCIDIO 24H/48H/96H The I/O ports of PCIDIO 24H/48H/96H emulate the mode 0 configuration of the 8255 general purpose programmable peripheral interface. The cards come equipped with 50-pin male IDC connectors that interface with OPTO22. Figure 2.4 shows the circuits and pinout of PCIDIO 24H/48H/96H's connectors (CN1~CN4) .
2.6.1 Continued Figure 2.6.1 pin assignments and pow er signals of PCIDIO 24H/48H/96H The DIO pin names are specified as PnXb, where n : means the connector reference number n=1~4. X : means the port name, X= ‘A’ , ‘B’ or ‘C’ b : means the bit number of a port, b=0~7 For example, P1C4 means bit 4 of port C on connector CN1. Note: 1. The pinout of the CN1 ~ CN4 connectors are identical. 2. The power supply pins are protected by resetable fuses. Refer to section 4.4 for details of the power supply.
For Your Notes Installation • 15
For Your Notes 16 • Installation
2.7 Jumpers Description The 48H/96H DIO cards are ‘plug-and-play’, thus it is not necessary to setup the card configurations to fit the computer system. However, to fit users’ versatile operation environment, there are still a few jumpers to set the power-on status of ports and the usage of the +12V output pins. 2.7.1 Power on Status of Ports For every port on the PCIDIO 48H/96H cards, the power-on status is set as input, therefore, the voltage could be pulled high, pulled low, or floating.
2.7.2 12V Power Supply Configuration Pin 2 and pin 4 of the CN1 ~ CN4 50-pin OPTO-22 connectors can be configured as 12V power supply or ground. Please refer to Figure 2.4 for the 12 volts power supply position. JP1~JP4 of the 12V power are for CN1~CN4 respectively. Connections with ground are set as default. The following diagram shows the setting of JP2, connecting the pin 2 and pin 4 of CN2 to ground. (12V)1 2.
For Your Notes Installation • 19
Intentionally Blank
3 Registers Format Detailed descriptions of the register's format are specified in this chapter. This information is quite useful for the programmers who wish to handle the card through low-level programming. However, we suggest users understand more about the PCI interface before beginning any low-level programming. In addition, the contents of this chapter can help users understand how to use a software driver to manipulate this card. 3.
3.2 I/O Address Map All the 48H registers are 8 bits. The users can access these registers only by 8 bits I/O instructions. The following ta ble shows the registers map, including descriptions and their offset addresses relative to the base address. Please refer to the chapter 4 for more detailed operation of every registers.
4 Operation Theorem 4.1 Digital I/O Ports 4.1.1 Introduction The 48H/96H products can emulate one/two/four mode 0 configuration of 8255 programmable peripheral interface (PPI) chips. There are 24 DIO signals for every PPI. 4.1.
4.1.4 Digital I/O Port Programming Users can write the digital output value to or read back the digital signal level from the PPI ports by using the software library. Here we define the port name in Table 4.1. These port names are used both in software library and all through this manual. The programming for PCIDIO 24H/48H and PCIDIO 96H are fully compatible. Connector Numbers CN1 CN2 CN3 CN4 Port Names P1A P1B P1C P1CTRL P2A P2B P2C P2CTRL P3A P3B P3C P3CTRL P4A P4B P4C P4CTRL Table 4.
Control Word D 4 D 3 D 1 D 0 PORT A PORT C UPPER PORT B PORT C LOWER 00H 01H 02H 03H 08H 09H 0AH 0BH 10H 11H 12H 13H 18H 19H 1AH 1BH* 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 O/P O/P O/P O/P O/P O/P O/P O/P I/P I/P I/P I/P I/P I/P I/P I/P O/P O/P O/P O/P I/P I/P I/P I/P O/P O/P O/P O/P I/P I/P I/P I/P O/P O/P I/P I/P O/P O/P I/P I/P O/P O/P I/P I/P O/P O/P I/P I/P O/P I/P O/P I/P O/P I/P O/P I/P O/P I/P O
4.2 Timer/Counter Operation 4.2.1 Introduction One 8254 programmable timer/counter chip is installed in 48H/96H series. There are three counters in one 8254 chip and 6 possible operation modes for each counter. The block diagram of the timer/counter system is shown in Figure 4.2. P1C4 Trigger Edge Control 8254 Chip C Event IRQ Counter #0 O Timer #1 O Timer #2 O 'H' G 2 MHz Clock C 'H' G C Timer IRQ 'H' G Figure 4.2 Timer/counter system of 48H/96H series.
The 8254 timer/ counter IC occupies 4 I/O address. Users can refer to Tundra's or Intel's data sheet for a full description of the 8254 features. You can download the 8254 data sheet from the following web site: http://support.intel.com/support/controllers/peripheral/231164.htm or http://www.tundra.com (for Tundra’s 82C54 datasheet.) 4.2.2 Cascaded 32 Bits Timer The input clock frequency of the cascaded timers is 2MHz. The output of the timer is send to the interrupt circuit (refer to section 4.3).
4.3.2 IRQ Level Setting There is only one IRQ level requested by this card, although it is a dual interrupt system. The motherboard circuits will transfer INTA# to one of the PC IRQ levels. The IRQ level is set by the PCI plug and play BIOS and saved in the PCI controller. Users can get the IRQ level setting by software library. INT1 INTA# PCI Controller INT2 IRQ FlipFlops INT1 MUX P1C0 ~P1C0 & P1C3 Event Counter INT2 MUX P2C0 (*) ~P2C0 & P2C3 (*) Timer IRQ Clear IRQ Fig 4.
4.3.4 Interrupt Source Control In ISC register (offset 0x20), there are four bits to control the IRQ sources of INT1 and INT2. If the application need only one IRQ, you can disable one of the IRQ sources by software. If your application doesn't need any IRQ source, you can disable both interrupts. However, the PCI BIOS still assigns an IRQ level to the PCI card and occupies the PC resource if you only disable the IRQ sources without changing the i nitial condition of the PCI controller.
4.4 12V and 5V Power Supply The OPTO-22 compatible connectors provide external devices the +12 volts and +5 volts power supply. To avoid short or overload of the power supply, resetable fuses are added on all the output power. Refer to Figure 2.5. The maximum current for 5 volts on every connector is 0.5 A. If the load current is larger than 0.5 A, the resistance of resetable fuse will increase because of the rising temperature. The rising resistance will cause the power supply drop and reduce current.
5 C/C++ Libraries This chapter describes the software library for operating these card. Only the functions in DOS library and Windows 95 DLL are described. Please refer to the PCI DASK function reference manual, which is included with the CD, for the descriptions of the Windows 98/NT/2000/XP DLL functions. The functions of PCIDIO 48H can also be applied to PCIDIO 24H. Therefore, in the following section, there are no special functions for the PCIDIO 24H.
5.2 Programming Guide 5.2.1 Naming Convention The functions of the PCIDAQ PCI cards' software driver use full-names to represent a function's real meaning. The naming convention rules are: In DOS Environment: _{hardware_model}_{action_name}. e.g. _DIO48H_Initial(). All functions in the PCIDIO 48H driver are used by the board as {hardware_model}. But they can be used by PCIDIO 48H and PCIDIO 24H.
5.3 _DIO48H/96H_Initial @ Description The cards are initialized by this function. The software library could be used to control multiple cards.
5.4 Digital Input @ Description This function is used to read 8-bit digital input data from digital input ports. You can get the 8 -bit data from _DIO48H_DI by using this function. The written data and read in data is 8 -bit data. Each data is mapped to a signal as the table below.
PCI_CH0_PA: CH1’s Port A PCI_CH0_PB: CH1’s Port B PCI_CH0_PC: CH1’s Port C PCI_CH0_PCU: CH1’s Port C PCI_CH0_PCL: CH1’s Port C PCI_CH1_PA: CH2’s Port A PCI_CH1_PB: CH2’s Port B PCI_CH1_PC: CH2’s Port C PCI_CH1_PCU: CH2’s Port C PCI_CH1_PCL: CH2’s Port C PCI_CH2_PA: CH2’s Port A PCI_CH2_PB: CH2’s Port B PCI_CH2_PC: CH2’s Port C PCI_CH2_PCU: CH2’s Port C PCI_CH2_PCL: CH2’s Port C PCI_CH3_PA: CH3’s Port A PCI_CH3_PB: CH3’s Port B PCI_CH3_PC: CH3’s Port C PCI_CH3_PCU: CH3’s Port C PCI_CH3_PCL: CH3’s Port C PCI_
5.5 Digital Output @ Description This function is used to write data to digital output ports.
5.6 Configuration Port @ Description This function is used to configure the Input or Output of each Port. Each I/O Port of PCIDIO 24H/48H/96H is either input or output, so it has to configure as input or output before I/O operations are applied.
5.7 Configuration Channel @ Description This function is used to configure the Input or Output of each Channel. Each I/O Port of PCIDIO 24H/48H/96H is either input or output, so it has to configure as input or output before I/O operations are applied.
ctrlValue PORT_OOOO PORT_OOOI PORT_OOIO PORT_OOII PORT_OIOO PORT_OIOI PORT_OIIO PORT_OIII PORT_IOOO PORT_IOOI PORT_IOIO PORT_IOII PORT_IIOO PORT_IIOI PORT_IIIO PORT_IIII Port A OUT OUT OUT OUT OUT OUT OUT OUT IN IN IN IN IN IN IN IN Port CU Port B OUT OUT OUT OUT OUT IN OUT IN IN OUT IN OUT IN IN IN IN OUT OUT OUT OUT OUT IN OUT IN IN OUT IN OUT IN IN IN IN Port CL OUT IN OUT IN OUT IN OUT IN OUT IN OUT IN OUT IN OUT IN The ctrlValue constants are defined in acl_pci.h and acl_pci.bas.
5.8 Set Interrupt Control @ Description This function is used to set the interrupt configuration. The interrupt should be configured before the function starts.
5.9 Timer Start @ Description This function is used to set and start the timer0 of the on-board timer 8254.
5.10 Timer Read @ Description This function is used to read the current count of the timer0 of the onboard timer 8254 .
5.11 Timer Stop @ Description This function is used to stop the timer0 of the on-board timer 8254 .
5.12 Cascaded Timer @ Description This function is used to set and start the cascaded timer1 and timer 2 of the on- board timer 8254 .
5.13 Get IRQ Status @ Description This function is used to read back the status of interrupt when interrupt is inserted.
5.14 Clear IRQ @ Description This function is used to clear the interrupt generated from the 48H/96H series. @ Syntax C/C++ (DOS) void _DIO48H_CLR_IRQ(U16 cardNo); void _DIO96H_CLR_IRQ(U16 cardNo); C/C++ (Windows 95) void W_DIO48H_CLR_IRQ(U16 cardNo); void W_DIO96H_CLR_IRQ(U16 cardNo); Visual Basic (Windows 95) W_DIO48H_CLR_IRQ (ByVal cardNo As Integer); W_DIO96H_CLR_IRQ (ByVal cardNo As Integer); @ Argument cardNo: card number to select board 5.
Visual Basic (Windows 95) W_DIO48H_Software_Reset (ByVal cardNo As Integer) As Integer Integer W_DIO96H_Software_Reset (ByVal cardNo As Integer) As Integer @ Argument cardNo: card number which the DIO will be reset. @ Return Code ERR_NoError 5.16 Interrupt Start under Windows @ Description This function is only available with the Windows 95/98 driver. It is used to initialize and start up the interrupt control. Pleas e refer to section 4.3 for a detailed description of interrupt system.
@ Argument cardNo: card number which the DIO will be reset. c1: If the interrupt source is set as internal timer source, this value is the frequency divider of Timer#1. c2: If the interrupt source is set as internal timer source, this value is the frequency divider of Timer#2. ctrlValue: the value for INT mode setting. The value can be set for INT1 is INT1_OFF, INT1_P1C0, INT1_P1C3C0, or INT1_EVENT_IRQ. The value can be set for INT2 is INT2_OFF, INT2_P2C0, INT2_P2C3C0, or INT2_TIMER_IRQ.
Product Service Diagnosis and Debug CyberResearch, Inc. maintains technical support lines staffed by experienced Applications Engineers and Technicians. There is no charge to call and we will return your call promptly if it is received while our lines are busy. Most problems encountered with data acquisition products can be solved over the phone. Signal connections and programming are the two most common sources of difficulty.
Warranty Notice CyberResearch, Inc. warrants that this equipment as furnished will be free from defects in material and workmanship for a period of one year from the confirmed date of purchase by the original buyer and that upon written notice of any such defect, CyberResearch, Inc. will, at its option, repair or replace the defective item under the terms of this warranty, subject to the provisions and specific exclusions listed herein.