Home
Manual - ICP DAS USA`s I
Contents
1. CLK CLK 10 CLK 100 P4 CLK2 OUT2 GATE2 CLK3 OUT3 GATE3 GATE4 GND 5V CLK1 OUT GATE1 CLKO OUTO GATEO CLK4 OUT4 GND DOO DO2 DO4 DO6 DO8 DO10 DO12 DO14 GND 5V DO16 DO18 DO20 DO22 DO24 DO26 DO28 DO30 GND 5V All signals are TTL compatible DO1 DO3 DO5 DO7 DO9 DO11 DO13 DO15 GND 12V DO17 DO19 DO21 DO23 DO25 DO27 DO29 DO31 GND 12V DIO DI2 DI4 DI6 DI8 DI10 DI12 DI14 GND 5V DI16 DI18 DI20 DI22 DI24 DI26 DI28 DI30 GND 5V DI1 DI3 DI5 DI7 DI9 DI11 DI13 DI15 GND STROBE1 DI17 DI19 DI21 DI23 DI25 DI27 DI29 DI31 GND STROBE2 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 2 4 VO Operation 2 4 1 DO Port Architecture CN1 amp CN3 When the PC is power up all of DO states are clear to low state by the RESET signal Fore more information about RESET signal please refer to Sec 3 1 1 Note that the RESET is in Low state in order to clear all DO states to low level signal The detail block diagram of DO function is represented as Figure 2 2 RESET clear CN1 CN3 input Latch Clock input D O buffer CKT Figure 2 2 Block diagram of DO function PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 12 2 4 2 DI Port Architecture CN2 amp CN4 The enable disable of DI port is controlled by the RESET signal as depicted as below e The RESET is in Low state gt al
2. Ver 1 5 Apr 2010 PMH 007 15 28 The above procedure records all information of wSlotBus and wSlotDevice in this PC These values will be mapped to this PC s physical slot And this mapping will not be changed for any PIO PISO cards Therefore this information can be used to identify the specified PIO PISO card by following steps Step1 Using the information of wSlotBus and wSlotDevice in table 3 2 Step2 Input board number into funtion PlO_GetConfigAddressSpace to get the specified card s information especially wSlotBus and wSlotDevice Step3 The user can identify the specified PIO PISO card by comparing the data of the wSlotBus amp wSlotDevice in step1 and step2 Note that normally the card installed in slot 0 is the card0 and card installed in slot1 is the card1 for PIO PISO series cards PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 29 3 3 The I O Address Map The VO address of PIO PISO series card is automatically assigned by the main board ROM BIOS The I O address can also be re assigned by user It is strongly recommended not to change the I O address by user The Plug amp Play BIOS will assign proper I O address to each PIO PISO series card very well The VO addresses of PIO D64 PIO D64U are given as follows which are based on the base address of each card Table 3 3 Address Read Wie 0 0 0 O WwBase 2 Aux control register wBase 3 Aux data register Same INT ma
3. 5 2 Function Descriptlohis iue obo 6010801601260 tac ele Sc 38 5 3 FUNG REESEN 39 5 3 1 PIODIO_ GetDIIVersion ee ee Ee ee ee EE ee ee 39 53 2 PIODIO ShBOHOSUD 1 5 rA SE GR Dk ek 39 5 3 3 PIODIO Fl at DM seksie bin Ee bone Ee Ee N 39 54 Digital WO FUNCTIONS iese sei se sede omen ed ed eo ie ee ei de ge ed 40 541 FIOBIO OuDUIBYIE es EEN en HEN De eu Se moa ae De 40 5 4 2 JPIODIO EE 5i EE GE SE Se SGI Se GR a GE i aS 40 543 PIODIO OuputWO EE 41 5 4 4 FIODIO INBDULWVORD E 41 5 5 Driver Relative Functions RS RE ee ED ee Ee Ee 42 5 5 1 PIODIO GetDriverVWersion ee ee enne 42 5 5 2 PIODIO_ el el 42 5 5 3 PIODIOS6ar Ciara E 43 5 5 4 PIODIO DriverClose se er th EEN de saa su ly c ng 43 5 5 5 PIODIO_ GetConfigAddressSpace 555 44 56 INTERRUPT FUNCTION ies es NG Ge ee ee cea Ph ee Ab eed 45 5 6 1 PIODIO et EEN 45 5 5 2 PIOBDIO nette sd ES ee ee een 45 55 3 PIODIO Ree EE 46 5 6 4 FIODIOSINIRERMDVE es aco bct AE DE AE GER ER N ed 46 5 6 5 Architecture of Interrupt mode 47 57 COUNTER EUNOTION tec Re 2669026604 SDA 00 s 48 5 7 1 PIOD64_SetCOUnI F SSSSSSsssssxe 48 5 7 2 PIODGS ele 48 53 0 FIQD6O4 Re 49 5 7 PIODb4 ReadEounterA sinit eei teri tte ee ei Ge Ge eie 49 5 7 5 eene 50 6 Demo Programs for Windows 51
4. 011 mode3 square wave generator 100 mode4 software triggered pulse 101 mode5 hardware triggered pulse BCD 0 binary count 1 BCD count 3 3 8 Read Card ID Read wBase 0xf4 o b b b m3 jp2 nt Jo wCardID inportb wBase 0xF4 read Card ID Note The Card ID function supports the model PIO D64U Ver1 0 or above PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 34 4 Software Installation The PIO D64 PIO D64U can be used in DOS and Windows 98 Me NT 2K and 32 bit Windows XP 2003 Vista 7 For Windows operating system the recommended installation steps are given in Sec 4 1 4 2 4 1 Software Installing Procedure Step 1 Insert the companion CD into the CD ROM driver and wait a few seconds until the installation program starts automatically If it cannot be started automatically for some reasons please double click the file NAPDOS AUTO32 EXE in this CD Step 2 Click the item Install Toolkits Software Manuals Step 3 Click the item PCI Bus DAQ Card Step 4 Click PIO DIO Step 5 Click install Toolkit for Windows 98 Or Me NT 2K XP 2003 Vista 7 Then the InstallShield will start the driver installation process to copy the related material to the indicated directory and register the driver on your computer The driver target directory is as below for different system Windows NT 2K and 32 bit Windows XP 2003 Vista 7 The PIODIO DLL will be copied into C WI
5. Description This function can detect all PIO PISO series card in the system lt is implemented based on the PCI Plug A Play mechanism 1 It will find all PIO PISO series cards installed in this system and save all their resource in the library Syntax WORD PIO Driverlnit WORD wBoards WORD wSubVendorlD WORD wSubDevicelD WORD wSubAuxID Parameter WBoards Output Number of boards found in this PC wSubVendor Inout SubVendor ID of the board wSubDevice Input SubDevice ID of the board wSubAux Input SubAux ID of the board Return Please refer to Table A 1 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 55 A 2 3 PIO_ DriverClose Description This subroutine closes the PIODIO Driver and releases the resource from computer device resource This function must be called once before exiting the user s application Syntax WORD PIO_DriverClose Parameter None Return Please refer to Table A 1 A 2 4 PIO_GetConfigAddressSpace Description The user can use this function to save resource of all PIO PISO cards installed in this system Then the application program can control all functions of PIO PISO series card directly Syntax WORD PIO_ GetConfigAddressSpace wBoardNo wBase wlrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice Parameter wBoardNo Input Board number wBase Dutput The base address of the board wlr
6. Refer to DEMO3 C DEMO4 C and DEMOB C of DOS operating system for more information If there are more than one interrupt source the interrupt service routine has to identify the active signals as follows refer to DEMO6 C of DOS operation system Read the new status of all interrupt signal sources refer to Sec 3 1 5 Compare the new status with the old status to identify the active signals If INT CHAN O is active service it If INT CHAN 1 is active service it If INT CHAN 2 is active service it Update interrupt status OO deco Cm Note that if the interrupt signal is too short the new status may be as same as old status In that condition the interrupt service routine can not identify which interrupt source is active So the interrupt signal must be hold active long enough until the interrupt service routine is executed This hold time is different for different operating system The hold time can be as short as micro second or as long as second In general 20 ms is enough for all operating system PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 17 2 7 1 Interrupt Block Diagram of PIO D64 PIO D64U INT CHAN INT CHAN 1 INT CHAN 2 Level trigger initial low active_high Figure 2 6 The interrupt output signal of PIO D64 PIO D64U INT is level trigger amp Active_Low If the INT generates a low pulse the PIO D64 PIO D64U will interrupt the PC once a time If the INT is fixed in low level t
7. at 110 Vac or 1 A at 24 Voc Figure 2 11 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 23 2 8 3 DB 24PRD DB 24POR DB 24C DB 24PR 24 power relay 5 A 250 V DB 24POR 24 photoMOS relay 0 1 A 350 Vac DB 24C 24 open collector 100 mA per channel 30 V max The DB 24PR is a 24 channel power relay output board which consists of 8 form C and 16 form A electromechanical relays for efficient switching of load programmable control The contact of each relay can control a 5 A load at 250 Vac 30 Voc The relay is energized by applying a 5 voltage signal to the appropriate relay channel on the 20 pin flat cable connector just used 16 relays or 50 pin flat cable connector OPTO 22 compatible for DIO 24 series There are 24 enunciator LED s on the relay daughter board The LED s light when their associated relay is activated To avoid overloading your PC s power supply this board needs a 12 Vpc or 24 Voc external power supply The detail function block diagram is shown as Figure 2 12 Normal Open Form A Relay Note 20 pin header 50 pin header Figure 2 12 50 Pin connector OPTO 22 compatible for DIO 24 DIO 48 DIO 144 PIO D144 PIO D96 PIO D56 PIO D48 PIO D24 PIO D168 A Channel 16 Form A Relays 8 Form C Relay Relay switching up to 5 A at 110 Vac 5 A at 30 Voc PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 24 2 8 4
8. feature extension so don t control this register now PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 31 3 3 4 INT Mask Control Register EE LE wBase 5 o b b b F Note Refer to Sec 3 1 for more information about wBase EN0 0 gt disable INT CHAN 0 as a interrupt signal default EN0 1 gt enable INT_CHAN_0 as a interrupt signal EN1 0 gt disable INT_CHAN_1 as a interrupt signal default EN1 1 gt enable INT_CHAN_1 as a interrupt signal EN2 0 gt disable INT_CHAN_2 as a interrupt signal default EN2 1 gt enable INT_CHAN_2 as a interrupt signal EN3 0 gt disable INT_CHAN_3 as a interrupt signal default EN3 1 gt enable INT_CHAN_3 as a interrupt signal outportb wBase 5 0 disable all interrupts 7 outportb wBase 5 1 enable interrupt of INT CHAN 0 outportb wBase 5 2 enable interrupt of INT CHAN 1 outportb wBase 5 4 enable interrupt of INT CHAN 2 outportb wBase 5 7 enable all four channels of interrupt Refer to the following demo program for more information DEMO3 C of DOS gt for INT CHAN 0 only DEMOA C of DOS gt for INT CHAN 1 only DEMO5 C of DOS gt for INT CHAN 2 only DEMO6 C of DOS gt for INT CHAN 1 and INT CHAN 2 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 32 3 3 5 Aux Status Register Read Write wBase 7 Note Refer to Sec 3 1 for more information about wBase AuxO INT CHAN_0 Aux1 INT CHAN 1 Aux
9. resource from computer device resource This function must be called once before exiting the user s application Syntax void PIODIO DriverClose Parameter None Return None PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 43 5 5 5 PIODIO GetConfigAddressSpace Description Obtain the I O address and other information of PIODIO board Syntax WORD PIODIO_ GetConfigAddressSpace WORD wBoardNo DWORD wAddrBase WORD wirqNo WORD wSubVendor WORD wSubDevice WORD wSubAux WORD wSlotBus WORD wSlotDevice Parameter wBoardNo Input PIODIO board number wAddrBase Output The base address of PIODIO board Only the low WORD is valid wlrqNo Dutput The IRQ number that the board using wSubVendor Output Sub Vendor ID wSubDevice Output Sub Device ID wSubAux Output Sub Aux ID wSlotBus Output Slot Bus number wSlotDevice Output Slot Device ID Return Please refer to Section 5 1 Error Code PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 44 5 6 INTERRUPT FUNCTION 5 6 1 PIODIO IntResetCount Description This function will clear the counter value on the device driver for the interrupt Syntax WORD PIODIO IntResetCount void Parameter None Return Please refer to Section 5 1 Error Code 5 6 2 PIODIO IntGetCount Description This subroutine will read the counter value of the interrupt defin
10. to Figure 2 8 and Sec 3 1 4 e EN1 0 gt INT CHAN 1 disable e EN1 1 INT CHAN 1 enable 2 The INV1 can be used to invert non invert the EVTIRQ as follows Refer to Figure 2 8 and Sec 3 1 6 e NV120 INT CHAN 1 inverted state of EVTIRQ e INV1 1 gt INT CHAN 1 non inverted state of EVTIRQ NOTE Refer to DEMOA C in DOS operating system for more information PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 20 2 7 4 INT_CHAN_2 INT_CHAN_ 2 TMRIRQ E OUTS Inverted Noninverted select INV2 Enable Disable select EN2 Figure 2 9 Figure 2 9 illustrates the control method of timer interrupt Note that the signal source comes from OUT5 The INV2 can be used to invert non invert the Trigger signal source and ENZ is used to disable enable the timer interrupt Refer to Sec 2 5 for the source of interrupt signal Note that the INT_CHAN_2 must be fixed in low level state normally and generated a high_pulse to interrupt the PC Because Counter4 and Counter5 are cascaded together it can be used as 32 bit timer base on 4 MHz clock source 1 The EN2 can be used to enable disable the INT_CHAN_2 as follows refer to Figure 2 9 and Sec 3 1 4 e EN2 0 gt INT CHAN 2 disable e EN2 1 gt INT CHAN 2 enable 2 The INV2 can be used to invert non invert the TMRIRQ as follow2 Refer to Figure 2 9 and Sec 3 1 6 e INV2 0 gt INT CHAN 2 inverted state of TMRIRQ e NV2 1 gt INT_CHAN_2 non inverted state of T
11. to install the software e How to test the card Attention If any of these items is missed or damaged contact the dealer from whom you purchased the product Save the shipping materials and carton in case you want to ship or store the product in the future 1 3 1 Product options DB 24PR DB 24PRD 24 channels power relay board DB 24POR 24 channels PhotoMos output board DB 24C 24 channels open collector output board DB 16P 16 channels isolated D I board DB 16R 16 channels relay board PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 8 ion t igura Hardware conf 2 Board Layout 2 1 PCI BUS OO OO OO OO OO OO OO OO OO 33 oooooooooo oooooooooo oo 8 00000000000 PIO D64 Figure 2 1 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 9 2 2 VO Port Location There are two 16 bit digital input ports and two 16 bit digital output ports on the PIO D64 PIO D64U These I O port locations are given as below and illustrated in Figure 2 1 Connector of Description PIO D64 PIO D64U CNI DO0 DO15 CN2 DI0 DI15 CN3 DO16 DO31 CN4 DI16 DI31 Besides there is also a connector interface CN5 for timer and counter function as shown in Figure 2 1 2 3 Pin Assignments 2MHz 1MHz default 0 5MHz 0 25MHz JP1 CLKO 1 CLK1 1 GATEO 2 GATE1 2 OUTO 3 OUT 3 P1 P2 CLK2 1 CLK3 1 GATE2 2 GATE3 2 OUT2 3 OUT3 3 P3 PS
12. 2 7 1 Interrupt Block Diagram of PIO D64 PIO D6AU 18 eue INT CHAN D toon iusticie fene tiber a held 19 2 73 INT CHAIN Vic oit oc o ht oh t o etta 20 2 14 INT CHAN 25 scies derives eher es ded Dis ee Ehe voe eer 21 2 8 Daughter BOSIOS ient od ande te Ha cope b ed ds 22 2 8 1 DB 16P Isolated Input Board 22 2 8 2 DB 16R ee 23 2 8 3 DB 24PRD DB 24POR D 24C sese 24 2 8 4 Daughter Board Comparison Table lt 25 VO Control RedIsf F eek EE RE RE eee oce ERENS EER ea De 26 3 1 How to Find the UO Address 26 3 2 The Assignment of VO Address ANEN 28 9 9 The dC Address Map ss EE EE EE aaa 30 3 3 1 RESEN ee 31 3 3 2 AUX CODITOLRIBOISTE i d oT eege ee 31 3 3 3 AUX data E 31 3 3 4 INT Mask Control Hegis er esses 32 Se 33 3 3 6 Interrupt Polarity Control Fegister 33 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 2 AA Read Write EE 34 33 0 Read Cad RE EE 34 4 Software Installation Ee ng nh 35 4 1 Software Installing Procedure ee Re ee ee ee ee 35 4 2 PnP Driver Installations ii ees iss ee EE Ee KS de ge ee imei eg de ie Sk 36 5 DLL Function Description RR EER EER RR RR RR RR RR RR Ee EE 37 5 1 Table of ErrorGode and ErrorString eterne 38
13. 2 INT CHAN 2 Aux3 INT CHAN 3 Aux7 4 Aux ID The Aux 0 3 are used as interrupt sources The interrupt service routine has to read this register for interrupt source identification Refer to Sec 2 7 for more information 3 3 6 Interrupt Polarity Control Register Read Write wBase 0x2A DEE o NV2 wo mm Note Refer to Sec 3 1 for more information about wBase INV0 1 2 0 gt select the invert signal from INT CHAN 0 1 2 INV0 1 2 1 gt select the non invert signal from INT_CHAN_0 1 2 outportb wBase 0x2a 0 select the invert input from all 3 channels outportb wBase 0x2a 0x0f select the non invert input from all 3 channels outportb wBase 0x2a 0x0e select the inverted input of INT CHAN 0 select the non inverted input from the others outportb wBase 0x2a 0x0c select the inverted input of INT CHAN O0 amp P INT CHAN 1 M select the non inverted input from the others Refer to DEMO6 C of DOS for more information PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 33 3 3 7 Read Write 8254 8254 control word SC1 SCO 00 counterO 01 counter 10 counter2 11 read back command RL1 RLO 00 counter latch instruction 01 read write low counter byte only 10 read write high counter byte only 11 read write low counter byte first then high counter byte M2 MI M0 000 modeO interrupt on terminal count 001 model programmable one shot 010 mode2 rate generator
14. Daughter Board Comparison Table 20 pin flat cable 50 pin flat DB 37 header cable header header DB 37 No No Yes DN 37 No No Yes ADP 37 PCI No Yes Yes ADP 50 PCI No Yes No DB 24P No Yes No DB 24PD No Yes Yes DB 16P8R No Yes Yes DB 24R No Yes No DB 24RD No Yes Yes DB 24C Yes Yes Yes DB 24PR Yes Yes No Db 24PRD No Yes Yes DB 24POR Yes Yes Yes DB 24SSR No Yes Yes NOTE The PIO D64 PIO D64U only has 20 pin flat cable header PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 3 VO Control Register 3 1 How to Find the VO Address The plug amp play BIOS will assign a proper I O address to every PIO PISO series card in the power up stage The IDs of PIO D64 card are given as follows lt REV 1 0 gt lt REV 2 0 gt e Vendor ID 0xE159 e Vendor ID 0xE159 e Device ID 0x0002 e Device ID 0x0001 e Sub vendor ID 0x80 e Sub vendor ID 0x4080 e Sub device ID 0x01 e Sub device ID 0x01 e Sub aux ID 0x20 e Sub aux ID 0x20 The utility program PIO_PISO EXE will detect and present all information of PIO PISO cards installed in this PC as shown in following figure Besides how to identify the PIO series cards of ICPDAS data acquisition board by the sub vender sub device and sub Aux ID is given in table 3 1 2003 the following cards nformation 0x00 O C400 Vendor ID Device ID Slot Bus Slot Device EE REI
15. Driver CreateEvent de Conuter PI DIO IntResetCount Set Event to Signal Device Driver Hardware Interrupt Signal Figure 5 2 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 PIODIO Itinstall Hardware Device 5 7 COUNTER FUNCTION 5 7 1 PIOD64 SetCounter Description This subroutine is used to set the 8254 counter s mode and value Syntax void PIOD64 SetCounter DWORD dwBase WORD wCounterNo WORD bCounterMode DWORD wCounterValue Parameter dwBase Input I O port addresses please refer to function PIODIO GetConfigAddressSpace Only the low WORD is valid wCounterNo Input The 8254 Counter Number 0 to 5 0 to 2 Chip 0 3 to 5 Chip 1 wCounterMode Input The 8254 Counter Mode 0 to 5 wCounterValue Input The 16 bits value for the counter to count Only the lower WORD is valid Return None 5 7 2 PIOD64 ReadCounter Description This subroutine is used to obtain the 8254 counter s value Syntax DWORD PIOD64_ReadCounter DWORD dwBase WORD wCounterNo WORD bCounterMode Parameter dwBase Input I O port addresses please refer to function PIODIO_GetConfigAddressSpace Only the low WORD is valid wCounterNo Input The 8254 Counter Number 0 to 5 0 to 2 Chip 0 3 to 5 Chip 1 wCounterMode Input The 8254 Counter Mode 0 to 5 Return 16 bits counter s value Only the lower WORD is valid PI
16. FUNCTIONS OF TEST 5 3 1 PIODIO GetDIIVersion Description To get the version number of PIODIO DLL driver Syntax WORD PIODIO GetDllVersion Void Parameter None Return 200 hex for version 2 00 5 3 2 PIODIO ShortSub Description To perform the subtraction as nA nB in short data type This function is provided for testing DLL linkage purpose Syntax short PIODIO ShortSub short nA short nB Parameter nA Input 2 bytes short data type value nB Input 2 bytes short data type value Return The value of nA nB 5 3 3 PIODIO FloatSub Description To perform the subtraction as fA fB in float data type This function is provided for testing DLL linkage purpose Syntax float PIODIO FloatSub float fA float fB Parameter fA Input 4 bytes floating point value fB Input 4 bytes floating point value Return The value of fA fB PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 39 5 4 Digital VO FUNCTIONS 5 4 1 PIODIO OutputByte Description Send the 8 bits data to the specified VO port Syntax void PIODIO_ OutputByte DWORD wPortAddr WORD bOutputVal Parameter WPortAddr Input I O port addresses please refer to function PIODIO_GetConfigAddressSpace Only the low WORD is valid bOutputVal Input 8 bit data send to I O port Only the low BYTE is valid Return None 5 4 2 PIODIO InputByte Description Re
17. K Ta TER Peer ME E Base Addr IROQ Number Figure 3 1 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 26 The Sub IDs of PIO PISO series card are given as follows Table 3 1 Description Sub vendor Sub Device Sub AUX PIO PISO series card PIO D168 168 DIO 9880 01 50 PIO D168A 168 DIO 80 oo 50 PIO D144 REv4 0 144 D I O 805680 01 00 PIO D96 96 D O 80 01 109 PIO D64 REV 2 0 64 D I O 80 4080 PIO D56 24 D V O 01 40 16 D l 16 D O PIO DD48 48 DIO 80 01 80 PIO D24 24 D O 80 01 40 PIO 823 Multi function 80 03 00 PIO 821 Multifunction 80 03 10 PIO DA16 16 D A 80 04 00 PIO DA8 8 DA WE rd v 04 PIO DA4 A DA 80 00 PISO C64 64 isolated D O 8 Current sinking 0 08 00 PISO A64 64 isolated D O MED Current sourcing PISO P64 64 isolated DA 80 08 10 PISO P32C32 32 isolated D O 20 aa 32 isolated D I PISO P32A32 32 isolated DO i Current sourcing 32 isolated Di 8 220 V relay 8 SSR AC 8 SSR DC PISO 730 16 DI 16 D O 40 16 isolated Di 16 isolated D O Current sinking 80 08 80 PISO 730A 16 DI 16 D O 16 isolated D I 16 isolated D O Current sourcing PISO 813 32 isolated A D PISO DA2 2 isoatedDA 80 0B 00 Note If the board has different version it may has different Sub IDs But no matter which version of the boar
18. LIB e MSC LIB PIO H e MSC LIB MSCPIO_L LIB e MSC LIB MSCPIO_H LIB e BC LIB PIO H e BC LIB BCPIO_L LIB e BC LIB BCPIO_H LIB The list of demo programs DEMO 1 C D O demo DEMO2 C D VO demo gt for Turbo C 2 xx or above gt for MSC 5 xx or above gt for BC 3 xx or above gt for TC library gt for TC demo program gt for TC diagnostic program gt TC declaration file gt TC large model library file gt TC huge model library file gt MSC declaration file gt MSC large model library file gt MSC huge model library file gt BC declaration file 2 BC large model library file gt BC huge model library file DEMOS C Use external int to measure pulse width high level DEMO4 C Use EVTIRQ to count event DEMOS C Use TMRIRQ to generate 0 5 Hz squa DEMO6 C Use TMRIRQ to generate 0 5 Hz squa EVTIRQ to count PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 54 A 2 DOS LIB Function A 2 1 Table of ErrorCode and ErrorString Table A 1 ErrorCode and ErrorString e Error ID Error String 0 NoError OK No Error 1 DriverHandleError Device driver opened error 2 DriverCallError Got the error while calling the driver functions 3 FindBoardError Can t find the board on the system 4 TimeOut Timeout 5 ESE N iS mm board number Valid range 0 to TotalBoards 1 6 NotFoundBoard Can t detect the board on the system A 2 2 PIO Driverlnit
19. MRIRQ NOTE Refer to DEMO5 C in DOS operating system for more information PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 21 2 8 Daughter Boards 2 8 1 DB 16P Isolated Input Board The DB 16P is a 16 channel isolated digital input daughter board The optically isolated inputs of the DB 16P consist of a bi directional photo coupler with a resistor for current limiting You can use the DB 16P to sense DC signal from TTL levels up to 24 V or use the DB 16P to sense a wide range of AC signals You can use this board to isolate the computer from large common mode voltage ground loops and transient voltage spike that often occur in industrial environments The detail function block diagram is shown as Figure 2 10 PIO D64 photo Isolated _ S d AC or DC Signal 0 V to24 V Figure 2 10 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 22 2 8 2 DB 16R Relay Board The DB 16R is a 16 channels relay output board which consists of 16 form C relays for efficient switch of load by programmable control The relay are energized by applying 12 V 24 V voltage signal to the appropriated relay channel on the 20 pin flat connector There are 16 enunciator LED s on the relay daughter board The LED s light when their associated relay is activated The detail function block diagram is shown as Figure 2 11 From C Relay Note Channel 16 From C Relay Relay Switching up to 0 5 A
20. NNT SYSTEM32 The NAPWNT SYS and PIO SYS will be copied into CAWINNT SYSTEM32 DRIVERS Windows 98 Me The PIODIO DLL and PIODIO Vxd will be copied into C Windows SYSTEM PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 35 4 2 PnP Driver Installation After installing the hardware PIO D64 PIO D64U and power on your PC Windows 98 Me 2K and 32 bit Windows XP 2003 Vista 7 can find a PCI card device and ask user to provide a PIODIO inf to install hardware driver on the computer If user has trouble in the process please refer to PnPinstall pdf for more information PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 36 5 DLL Function Description The DLL driver is the collection of function calls of the PIO DIO cards for Windows 98 Me NT 2K and 32 bit Windows XP 2003 Vista 7 system The application structure is presented as following figure The user application program developed by designate tools like VB Delphi and Borland C Builder can call PIODIO DLL driver in user mode And then DLL driver will call the PlO sys to access the hardware system Function Call into DLLs Development Toolkit Services Call into Kernel Mode Device Control Figure 5 1 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 37 5 1 Table of ErrorCode and ErrorString Table 5 1 GE Error ID Error String 0 PIODIO NoError OK No err
21. O D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 48 5 7 3 PIOD64 SetCounterA Description This subroutine is used to set the 8254 counters mode and value Users have to call the PIODIO_ActiveBoard function before calling this function Syntax void PIOD64 SetCounterA WORD wCounterNo WORD bCounterMode DWORD wCounterValue Parameter wCounterNo Input The 8254 Counter Number 0 to 5 0 to 2 Chip 0 3 to 5 Chip 1 wCounterMode Input The 8254 Counter Mode 0 to 5 wCounterValue Input The 16 bits value for the counter to count Only the lower WORD is valid Return None 5 7 4 PIOD64 ReadCounterA Description This subroutine is used to obtain the 8254 counter s value Users have to call the PIODIO ActiveBoard function before calling this function Syntax DWORD PIOD64 ReadCounterA WORD wCounterNo WORD bCounterMode Parameter wCounterNo Input The 8254 Counter Number 0 to 5 0 to 2 Chip 0 3 to 5 Chip 1 wCounterMode Input The 8254 Counter Mode 0 to 5 e Return Returns the 16 bits counter s value Only the lower WORD is valid PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 49 5 7 5 Program Architecture PIODIO_DriverInit Enable All DI DO PIODIO_InputByte PIODIO_OutputByte Figure 5 3 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 50 6 Demo Programs for Wind
22. PIO D64 PIO D64U User s Manual Warranty All products manufactured by ICP DAS are warranted against defective materials for a period of one year from the date of delivery to the original purchaser Warning ICP DAS assume no liability for damages consequent to the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use nor for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 2004 by ICP DAS All rights are reserved Trademark The names used for identification only may be registered trademarks of their respective companies PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 1 Tables of Contents Introductions EE 5 RE 6 1 2 Specifications EE 7 E Product leek DEE 8 L3 TCOIUCE OIHORISyixtopbsiesnnlsingoplaiesanbangeebdnsanbangealsiasapbain 8 Hardware configuration EER RARR EER EER EER Ee 9 2 1 Board e E 9 2 2 0609148961197 EE EE EUER EP DE DE ee ee ee dd 10 2 3 PINASSIGNIERIS tet 10 24 VO Operation EE 12 2 4 1 DO Port Architecture CN1 amp CNZL 12 2 4 2 DI Port Architecture CN2 amp CNA ee 13 2 5 Timer Counter Archtechure EEN 14 2 6 GloCK SOU CO ioo Ea M aod RH alc eia dt E uu 16 2 7 Interrupt EIERE deste 17
23. PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 3 6 1 Digital Input Output Si si sesse es aei be ge ete ee be ee dei count 52 6 2 Interrupt of EXTIFIG Su AD GR Ge de 52 6 3 Counter Function of counterO cc c1 1v xxx 53 el a TEE 54 Appendix A Related DOS Software AEN 54 A 1 Where is the related software 54 A 2 DOS LIB Funchon ee ee ee ee 55 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 4 1 Introduction The PIO D64U card is the new generation product that ICP DAS provides to meet RoHS compliance requirement The new PIO D64U card is designed as a drop in replacement for the PIO D64 and users can replace the PIO D64 by the PIO D64U directly without software driver modification The PIO D64U universal PCI card supports 3 3 V 5 V PCI bus while the PIO D64 supports 5 V PCI bus These cards provide 32 ch digital input and 32 ch digital output that consist of two 16 bit input ports and two 16 bit output ports The PIO D64U and PIO D64 also offer 6 ch counter timer with four clock sources 2 MHz 1 MHz 500 kHz and 250 kHz The user can use the clock source from the soldering pad 3 of the 6 ch timer counter are for general purposes such as frequency measurement event counting and pulse generation the other 3 channels are for interrupt function The PIO D64U also adds a Card ID switch and pull high pull low resisters for DI on board Users ca
24. ad the 8 bits data from the specified I O port Syntax WORD PIODIO_ InputByte DWORD wPortAddr Parameter wPortAddr Input VO port addresses please refer to function PIODIO_GetConfigAddressSpace Only the low WORD is valid Return 16 bits data with the leading 8 bits are all 0 Only the low BYTE is valid PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 40 5 4 3 5 4 4 PIODIO_OutputWord Description Send the 16 bits data to the specified I O port Syntax void PIODIO OutputWord DWORD wPortAddr DWORD wOutputVal Parameter WPortAddr Input UO port addresses please refer to function PIODIO GetConfigAddressSpace Only the low WORD is valid WOutputVal Input 16 bit data send to VO port Only the low WORD is valid Return None PIODIO InputWord Description Obtain the 16 bits data from the specified VO port Syntax DWORD PIODIO InputWord DWORD wPortAddr Parameter wPortAddr Input I O port addresses please refer to function PIODIO GetConfigAddressSpace Only the low WORD is valid Return 16 bit data Only the low WORD is valid PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 41 5 5 Driver Relative Functions 5 5 1 PIODIO_ GetDriverVersion Description Obtain the version number information from PIODIO driver Syntax WORD PIODIO GetDriverVersion WORD wDriverVersion Parameter wDriverVersion Dutpu
25. d you select we offer the same function calls PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 27 3 2 The Assignment of VO Address The Plug amp Play BIOS will assign the proper I O address to PIO PISO series card If there is only one PIO PISO board the user can identify the board as card_0 If there are two PIO PISO boards in the system it is very difficult to identify which board is card_0 The software driver can support the maximum 16 boards Therefore the user can install 16 boards of PIO PSIO series cards in one PC system For how to find and identify the card_0 card_1 and the others is demonstrated as below The simplest way to identify which card is card_0 is to use wSlotBus amp wSlotDevice as follows 1 Remove all PIO D64 PIO D64U from this PC 2 Install one PIO D64 PIO D64U into the PC s PCI slot1 run PIO_PISO EXE and record the wSlotBus1 amp wSlotDevice1 3 Remove all PIO D64 PIO D64U from this PC 4 Install one PIO D64 PIO D64U into the PC s PCI slot2 run PIO PISO EXE and record the wSlotBus2 amp wSlotDevice2 5 Repeat 3 amp 4 for all PCI slot record all wSlotBus amp wSlotDevice The records may be as follows Table 3 2 PC s PCI slot WslotBus WslotDevice Slot 1 0 0x07 Slot 2 0 0x08 Slot 3 0 0x09 Slot 4 0 0x0A PCI BRIDGE Slot_5 1 0x0A Slot 6 1 0x08 Slot_7 1 0x09 Slot_8 1 0x07 PIO D64 PIO D64U User s Manual
26. ed in device driver Syntax WORD PIODIO IntGetCount DWORD dwlntCount Parameter dwintCount Output Address of dwlntCount which will stores the counter value of interrupt Return Please refer to Section 5 1 Error Code PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 45 5 6 3 PIODIO Intinstall Description This subroutine installs the IRQ service routine Syntax WORD PIODIO Intinstall WORD wBoardNo HANDLE hEvent WORD wlnterruptSource WORD wActiveMode Parameter wBoardNo Input Which board to be used hEvent Input Address of a Event handle The user s program must call the Windows API function CreateEvent to create the event object wlnterruptSource Input What the Interrupt Source to be used Please refer to the following table Table 5 3 wlnterruptSource Description 0 EXTIRQ 1 EVTIRQ 2 TMRIRQ wActiveMode Inout When to trigger the interrupt 0 gt PIODIO ActiveLow 1 gt PIODIO ActiveHigh Return Please refer to Section 5 1 Error Code 5 6 4 PIODIO IntRemove Description This subroutine removes the IRQ service routine Syntax WORD PIODIO IntRemove void Parameter None Return Please refer to Section 5 1 Error Code PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 46 5 6 5 Architecture of Interrupt mode s CreateThread Create Event for Device
27. er to Sec 2 5 for the source of interrupt signal The INT CHAN 0 must be fixed in low level state normally and generated a high pulse to interrupt the PC 1 The ENO can be used to enable disable the INT CHAN 0 as follows refer to Figure 2 7 and Sec 3 1 4 e EN0 0 gt INT CHAN O disable e ENO 1 INT CHAN O enable 2 The INVO can be used to invert non invert the EXTIRQ as follows Refer to Figure 2 7 and Sec 3 1 6 e INVO 0 gt INT CHAN 0 inverted state of EXTIRQ e INVO 12 INT CHAN 0 non inverted state of EXTIRO NOTE Refer to DEMO3 C in DOS operating system for more information PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 19 2 7 3 INT CHAN 1 INT CHAN EVTIRO OUT3 Inverted Noninverted select INV1 Enable Disable select EN1 Figure 2 8 Figure 2 8 illustrates the control method of event interrupt Note that the signal source comes from OUTS The INV1 is used to invert non invert the trigger signal source and ENI is used to disable enable the timer interrupt Refer to Sec 2 5 for the source of interrupt signal User can use Counter3 as event counter to count the event signal that comes from Pin7 of CN5 When the amount of event is the same as counter3 setting the interrupt of INT CHAN 1 will be trigger The INT CHAN 1 must be fixed in low level state normally and generated a high pulse to interrupt the PC 1 The EN1 can be used to enable disable the INT CHAN 41 as follows refer
28. he PIO D64 PIO D64U will interrupt the PC continuously Therefore for the normal application the INT_CHAN_0 1 2 must be controlled in a pulse_type signals That is they must be fixed in low level state normally and generate a high_pulse to interrupt the PC The priority of INT CHAN 0 1 2 is the same If all these three signals are active at the same time then INT will be active only once a time So the interrupt service routine has to read the status of all interrupt channels for multi channel interrupt Refer to DEMO6 C in DOS operating system for demonstrate the application under the condition of both INT CHAN 1 and INT CHAN 2 If only one interrupt source is used the interrupt service routine doesn t have to read the status of interrupt source The demo programs DEMO3 C DEMO4 C and DEMOBS C in DOS operating system are designed for single channel interrupt application as follows DEMOS C gt for INT CHAN 0 only DEMO4 C gt for INT CHAN 1 only DEMO5 C gt for INT_CHAN_2 only PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 18 2 7 2 INT CHAN 0 INT CHAN 0 EXTIRQ GATE4 Inverted Noninverted select INVO Enable Disable select ENO Figure 2 7 Figure 2 7 illustrates the control method of external interrupt Note that the signal source comes from GATE4 The INVO is used to invert non invert the trigger signal source and ENO is used to disable enable the timer interrupt Pin13 of CN5 Ref
29. l DI operation is disable e The RESET is in High state gt all DI operation is enable Note that when the PC is power up all operation of DI port is disabled because RESET is in low level Besides user may need to latch input data by external strobe single in some application We provide the following architecture as shown in Figure 2 3 to allow user to apply the STROBE pin to latch D l input signal If no signal is connected to strobe pin the input data is transparent Internal External Vec 3 state buffer D Latch to Data Bus from CN2 CN4 RD STROBE1 STROBE2 D I buffer CKT 74373 Data from CN2 CN4 oon 55h FFh STROBE1 STROBE2 RD DataBus e NIIHIN NALIN NUTTIN NLL Figure 2 3 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 13 2 5 Timer Counter Architecture PIO D64 PIO D64U has two timer counter chips 8254 The first 8254 chip is used as general purpose timer counter as shown in Figure 2 4 The pin assignment is presented in Sec 2 3 U4 8254 Timer Counter O CLKO OUTO O H OUTO GATEO O GATE0 Counter0 O CLK1 OUT O OUT GATE1 H O GATE1 Counter1 O CLK2 OUT2 O H OUT GATE2 O GATE2 Counter2 Figure 2 4 The second 8254 chip is used to generate interrupt trigger signals as shown in Figure 2 5 The Counter3 accept event signal and will generate trigger signal of the interrupt And the Counter4 and Counter5 are cascaded toge
30. n set Card ID and recognize the board by the ID via software when using two or more PIO D64U cards in one computer The pull high pull low resisters allow the DI status to be specified when the DI channels are unconnected the DI status may remain in high or low status other than floating The PIO D64 D64U supports various OS such as Linux DOS Windows 98 NT 2000 and Windows 32 bit Windows XP 2003 Vista 7 It also provides the DLL and Active X control and various language sample program in Turbo C Borland c Microsoft C Visual C Borland Delphi Borland C Builder Visual Basic C NET Visual Basic NET and LabVIEW to help users to quickly and easily develop their applications PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 5 1 1 Features Support the 5 V PCI bus for PIO D64 Support the 5 V 3 3 V PCI bus for PIO D64U 32 digital input channels strobe control selectable 32 digital output channels Four independent programmable 16 bit timers counters One 32 bit timer with a 4 MHz clock base Provide clock source 2 MHz 1 MHz 500 KHz 250 KHz Interrupt source 3 channels Breadboard area for add on circuit Five 20 pin flat cable connectors Connect directly to DB 24PR 24POR DB 24C DB 16P DB 16R SMD short card power saving Automatically detected by Windows 95 98 2000 XP PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 1 2 Specifications M
31. o trigger the interrupt source PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 52 im Interrupt Demo for PIO D64 Total Boards Enable all DI DO Create Event OKII Interrupt Install OK Send the HIGH and LOW to the DO O to generate the TRIGGER The users can replace the internal trigger by external triqger Output 0x01 to D Output 0x00 ta DO 0 Wait Event Got Event Output 0x01 to DO 0 Output 0x00 ta DO 0 Wait Event Got Event I Test the PIODIO Card Figure 6 2 6 3 Counter Function of counter0 This demo program uses internal clock to test counter0 function User can select clock suitable clock output from the corresponding P4 soldering pad w Timer Counter demo for PIO D64 Total Boards Active Board E l JPl setting to 3 4 gt IMHs 2 Input the Clock Source into Counter gt Connect the P4 CLK with Pl CLKO Refer to Section 2 8 Pin Assignment of hardware manual 3 Enable the GATEO gt Connect the GATEO with 5v CN5 Pinl2 with CN5 Pinl9 Test the PIO Card Figure 6 3 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 53 Appendix Appendix A Related DOS Software A 1 Where is the related software The related DOS software and demos in the CD is given as following e TC e MSC e BC e TC LIB e TC DEMO e TC DIAG e TC LIB PIO H e TC LIB TCPIO_L LIB e TC LIB TCPIO_H
32. odel Name PIO D64 PIO D64U Digital Input Channels 32 Compatibility 5 V TTL Input Voltage Logic 0 0 8 V max Logic 1 2 0 V min Response Speed 1 2 MHz Typical Digital Output Channels 32 Compatibility 5 V TTL Output Voltage Logic 0 0 4 V max Logic 1 2 4 V min Output Capability Sink 24 mA 0 8 V Source 15 mA 2 0 V Response Speed 1 2 MHz Typical Timer Counter Channels 6 Independent x 3 EVTIRQ x 1 TMRIRQ x 1 EXTIRQ x 1 Resolution 16 bit Compatibility 5 V TTL Input Frequency 10 MHz max Reference Clock Internal 4 MHz General Bus Type 5 V PCI 32 bit 33 MHz 3 3 V 5 V Universal PCI 32 bit 33 MHz Data Bus 8 bit Card ID No Yes 4 bit VO Connector 20 pin box header x 5 Dimensions L x W x D 156 mm x 110 mm x 22 mm Power Consumption 580 mA Q 5 V Operating Temperature 0 60 C Storage Temperature 20 70 C Humidity 5 85 RH non condensing PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 7 1 3 Product Check List Your package includes the following items e One PIO D64 PIO D64U card e One company CD e One Quick Start Guide It is recommended to read the Quick Start Guide first All the necessary and essential information are given in the Quick Start Guide as follows e Where to get the software driver demo programs and other resources e How
33. or 1 PIODIO_DriverOpenError Device driver can t be opened 2 PIODIO_DriverNoOpen Users have to call the Driverlnit function firstly 3 PIODIO_ GetDriverVersionError Get driver version error 4 PIODIO_InstalllrgError Install IRQ Error 5 PIODIO ClearlntCountError Clear counter value Error 6 PIODIO_ GetlntCountError Get counter of interrupt error 7 PIODIO RemovelrqError Remove IRQ Error 8 PIODIO FindBoardError Can not find board 9 PIODIO ExceedBoardNumber The Max boards is 8 10 PIODIO ResetError Can t reset interrupt count 11 PIODIO IrgMaskError Irq Mask is 1 2 4 8 or 1 to OxF 12 PIODIO ActiveModeError Active Mode is 1 2 or 1 to 3 13 PIODIO GetActiveFlagError Can t get interrupt active flag 14 PIODIO ActiveFlagEndOfQueue The flag queue is empty 5 2 Function Descriptions All of the functions provided for PIO D64 PIO D64U are listed as below and the detail information for every function will be presented in the following section However in order to make the description simplify and clearly the attribute of the input and output parameter of the function are indicated as input and output respectively as shown in following table Table 5 2 Keyword Setting parameter by user Get the data value before calling this function from this parameter after calling this function Input Yes No Output No Yes Input Output Yes Yes PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 38 5 3
34. ows All of demo programs will not work normally if DLL driver would not be installed correctly During the installation process of DLL driver the install shields will register the correct kernel driver to the operation system and copy the DLL driver and demo programs to the correct position based on the driver software package you have selected Win98 Me NT 2K and 32 bit Win XP 2003 Vista 7 After driver installation the related demo programs and development library and declaration header files for different development environments are presented as follows Demo gt demo program prog BCB3 gt for Borland C Builder 3 APIODIO H gt Header file PIODIO LIB gt Linkage library for BCB only Delphi3 gt for Delphi3 PlODIO PAS gt Declaration file VB5 gt for Visual Basic 6 PIODIO BAS gt Declaration file VC6 gt for Visual C 6 PIODIO H 2 Header file PIODIO LIB gt Linkage library for VC The list of demo programs Dio Digital Input Output INT Interrupt of EXTIRQ Counter Counter0 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 51 6 1 Digital Input Output This demo program is used to check the digital input and output status of CN2 CN4 and CN1 ON3 Total Boards Active Board Figure 6 1 6 2 Interrupt of EXTIRQ This demo program uses EXTIRQ as interrupt source Then DOO output a high and low signal repeatedly t
35. q Dutput The IRQ number that the board using wSubVendor Output Sub Vendor ID wSubDevice Output Sub Device ID wSubAux Dutput Sub Aux ID wSlotBus Output Slot Bus number wSlotDevice Output Slot Device ID Return Please refer to Table A 1 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 56 A 2 5 PIO GetDriverVersion Description This subroutine obtains the version number of PIODIO driver Syntax WORD PIO_ GetDriverVersion WORD wDriverVersion Parameter wDriverVersion Output Address of wDriverVersion Return Please refer to Table A 1 A 2 6 ShowPIOPISO Description This function will show a text string for this special Sub ID This text string is the same as that defined in PIO H e Syntax WORD ShowPIOPISO wSubVendor wSubDevice wSubAux Parameter wSubVendor Input SubVendor ID of the board wSubDevice Input SubDevice ID of the board wSubAux Input SubAux ID of the board Return Please refer to Table A 1 PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 57
36. sk control register Same wBase 7 Aux pin status register Same INT polarity control register Same p es ae EE EEN Read U5 8254 counter3 Write U5 8254 counter3 Read U5 8254 counter4 Write U5 8254 counter4 Read U5 8254 counter5 Write U5 8254 counter5 Read U5 8254 control word Write U5 8254 control word wBase 0xf4_ Read Card ID Ss Note Refer to Sec 3 1 for more information about wBase PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 30 3 3 1 RESET Control Register Read Write wBase 0 Note Refer to Sec 3 1 for more information about wBase When the PC is first power up the RESET signal is in Low state This will disable all D I O operations The user has to set the RESET signal to High state before any D I O command outportb wBase 1 RESET High gt all D VO are enable now outportb wBase 0 RESET Low 2 all D I O are disable now 3 3 2 AUX Control Register Read Write wBase 2 Note Refer to Sec 3 1 for more information about wBase Aux 0 gt this Aux is used as a Di Aux 1 this Aux is used as a D O When the PC is first power on All Aux signal are in Low state All Aux are designed as D I for all PIO PISO series Please set all Aux in D I state 3 3 3 AUX data Register MSIE wBase 3 Note Refer to Sec 3 1 for more information about wBase When the Aux is used as D O the output state is controlled by this register This register is designed for
37. t address of wDriverVersion Return Please refer to Section 5 1 Error Code 5 5 2 PIODIO_ Driverlnit Description This subroutine opens the PIODIO driver and allocates the computer resource for the device This function must be called once before applying other PIODIO functions Syntax WORD PIODIO_ Driverlnit Parameter None Return Please refer to Section 5 1 Error Code PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 42 5 5 3 PIODIO_SearchCard Description This subroutine will search the card and get total boards This function must be called once before applying other PIODIO functions Syntax WORD PIODIO SearchCard WORD wBoards DWORD dwPlOCardlD Parameter wBoards Output Number of boards found in this PC DwPIOCaralD Input Sub vendor sub device and sub aux id of the board to find Please refer to chapter 3 1 NOTE Different version PIO D64 PIO D64U boards may have different Sub IDs This function will find the total board of PIO D64 PIO D64U including all versions no matter what version Sub ID you input Following is the example demonstration wRtnzPIODIO SearchCard amp wBoards 0x800120 you will get the total numbers of PIO D64 PIO D64U boards including REV 1 0 and REV 2 0 in PC Return Please refer to Section 5 1 Error Code 5 5 4 PIODIO DriverClose Description This subroutine closes the PIODIO Driver and releases the
38. ther which has clock source 4 MHz It is used to generate pacer timer trigger of the interrupt PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 14 U5 8254 Timer Counter E i H CLK3 OUT3 OUT3 GATE3 H GATE3 Counter3 CLK4 OUT4 H OUT4 4MHz GATE4 GATE4 Counter4 to PCI controller TMRIRG O OUTS GATES EVTIRQ Counter5 EXTIRQ Figure 2 5 Note Refer to Sec 2 3 for more information about pin assignment Refer to Sec 2 7 for more information about operation of interrupt PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 15 2 6 Clock source The PIO D64 PIO D64U provides wide range clock source as below table By jumper setting of JP1 user can select suitable clock output from the corresponding P4 soldering pad P4 2MHz CLK 1MHz default CLK 10 0 5MHz CLK 100 0 25MHz clock source select P4 soldering pad clock output PIO D64 PIO D64U User s Manual Ver 1 5 Apr 2010 PMH 007 15 16 2 7 Interrupt Operation There are three interrupt sources in PIO D64 PIO D64U These three signals are named as INT CHAN 0 INT CHAN 1 and INT CHAN 2 Their signal sources are given as follows Refer to Sec 2 5 for the source of interrupt signal INT_CHAN_0 EXTIRQ INT CHAN 1 EVTIRQ INT CHAN 2 TMRIRQ If only one interrupt signal source is used the interrupt service routine does not have to identify the interrupt source
Download Pdf Manuals
Related Search
Related Contents
Untitled Samsung PG113U User Manual Basic characteristics data • Instruction manual Manual de Instalação Installation Guide Manual de Instalación RSI - Richter Chemie ULVAC油拡散ポンプ VPC250F Istruzioni per l`uso BaByliss D420E hair dryer ECO STRIP 0.50 - 0.70 - 0.90 - 1.1 - 1.3 vers. 1.0 Copyright © All rights reserved.
Failed to retrieve file