Home

1. Introducton

image

Contents

1. 6 Pia BOARD LAYOUT ss 6 2 25 PORT EOCATION citet cec dece ede eoe ero Bid oe dea 7 2 3 SENABEE O OBERBATION 5 tete co ien eto eate 7 2 4 INTERRUPT 11 2 5 DAUGHTER BOARDS tat ote hb 18 2 6 24 CONTROL 5 DIAS 26 3 1 HOWTO FIND THE I O 26 3 2 THE ASSIGNMENT OF I O 004 4 31 3 3 3THE O ADDBESS MAP 32 DEMO PROGRAM edere senken VK nur dua ANN 37 as PIS ecd e ce te va t ec a cete E NE 38 4 23 DEMQOJ3T tut mue e ttt tu t emet 40 4 3 DEMO ott dte toc ica to te e a ovs 41 ALA TER EEN A E T 42 2 5 WOE MOS
2. dees 44 4 67 DEMO ctor i In Ar 46 PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 2 1 Introduction The PIO D56 PIO D24 provides 56 24 TTL digital I O lines The PIO D56 PIO D24 consists of one 24 bit bi directional port one 16 bit input port and one 16 bit output port only for PIO D56 The 24 bit port supports three 8 bit groups PA PB amp PC Each 8 bit group can be configured to function as either inputs or outputs individual All groups at 24 bit bi directional port are configured as inputs upon power up or reset The user can use the DB 24PD to connect the input port for isolation purpose or use DB 24RD to interface to the output port for relay control The PIO D56 PIO D24 has one D sub connector and two 20 pin flat cable only for PIO D56 The flat cable can be connected to ADP 20 PCI adapter The adapter can be fixed on the chassis It can be installed in a 5V PCI bus and can support truly Plug amp Play 1 1 Features PCI bus e Up to 56 24 PIO D56 PIO D24 channels of digital I O e All I O lines buffered on the board Eight bit groups independently selectable for I O on 24 bit port Input Output programmable ports under software control e Double side SMD short card e Connects directly to DB 24PR DB 24PD DB 24RD DB 24PRD DB 16P8R DB 24POR DB 24SSR DB 24C or any OPTO 22 Compatible daughter boards e 4 interrupt sources PCO PCI PC2 PC
3. 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 There is no 50 pin flat cable header in PIO D56 PIO D24 The PIO D56 PIO D24 has one DB 37 connector and two 20 pin flat cable headers only for PIO D56 PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 23 2 6 Pin Assignment CON3 37 pin of D type female connector E gw 7 All signals are TTL compatible PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 24 CONO 20 pin header only for PIO D56 O mn DIO DI DM 6 ps5 k DI6 DI7 DIS DI9 All signals are TTL compatible PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 25 3 Control Register 3 1 How to Find the 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 fixed IDs of PIO PISO series cards are given as follows e Vendor ID E159 e Device ID 0002 The sub IDs of PIO D56 PIO D24 are given as follows e Sub vendor ID 80 e Sub device ID 01 e Sub auxID 40 We provide all necessary functions as follows 1 PIO DriverInit amp wBoard wSubVendor wSubDevice wSubAux 2 GetConfigAddressSpace wBoardNo wBase wlIrq wSubVendor wSubD
4. nt COUNT irqmask now int state ORD wBoards wRetVal t1 t2 t3 t4 t5 t6 ORD wSubVendor wSubDevice wSubAux 510 wSlotDevice stepl find address mapping of PIO PISO cards step2 enable all D I O port outportb 1 step3 configure I O direction outportb 0 0x00 COUNT 0 init_high select 0 RESET gt 1 set CON3 as D I ports printf n n show the count of Low pulse n tor 77 gotoxy 1 7 printf nCOUNT d 0 break if kbhit outporth wBaset5 0 PIO DriverClose Use PCO as external interrupt signal WORD init high disable outportb wBaset5 if wIrq 8 0 COUNT irqmask inportb A1l 825941 outporthb A1_8259 1 irqmask amp Oxff setvect wIrq 8 irq service disable all interrupt disable all interrupt 1 lt lt PIO D56 PIO D24 User Manual 1 0 09 20 99 44 T else irqmask inportb 1_8259 1 outporth A1_8259 1 irgmask amp Oxfb irqmask inportb A2 825941 outporthb A2_8259 1 irqmask amp Oxff setvect 1 8 0 70 service outporth wBase t5 1 now int state 1 outportb wBaset 0x2a 0 enable void interrupt irq_service if now int state 1 COUNT if inporth 7 amp 1
5. 0 outportb 0 2 1 now int state 0 else now int state 1 else if inporth 7 amp 1 1 outportb 0 2 0 now int state 1 else now int state 0 if wIrq 8 outportb 1_8259 0x20 outporth A2_8259 0x20 IRQ2 1 lt lt wIrq 8 enable interrupt PCO now ini signal is high select the invert now PCO change to low INT 0 PCO PCO still fixed in low need to generate a high pulse INVO select noninverted input now PCO0 low now PCO High now PCO change to high 0 PCO kJ PCO still fixed in high xy need to generate a high pulse INVO select inverted input wf now PCO high ky now PCO0 low PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 45 4 6 DEMOS5 demo 5 Four interrupt source x 5 PCO initial Low active High px 1 initial High active Low PC2 initial Low active High wf PC3 initial High active Low step 1 run DEMO5 EXE DA x include PIO H define A1 8259 0x20 define 2 8259 OxAO define EOI 0x20 WORD init WORD wBase wIrqg static void interrupt service int irqmask now int state new int state invert int c int num int CNT L1 CNT L2 CNT L3 CNT L4 int CNT H1 CNT 2 H3 CNT H4 int main int 4 3 WORD wBoards
6. CNT_L4 invert invert 8 now_int_state new_int_state outportb 0 2 invert if wIrq 8 outportb 1 8259 0x20 0 0 is change to low to generate a high pulse INT CHAN 2 is active now PC2 is change to high now PC2 is change to low to generate a high pulse INT CHAN 3 is active now PC3 is change to high now PC3 is change to low to generate a high pulse outportb A2 8259 0x20 PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 48 ty a
7. Description Sub vendor Sub device Sub AUX card PIO D144 144 DA O 80 01 00 PIO D96 96 80 01 10 PIO D64 64 80 01 20 PIO D56 24 D I O 80 01 40 16 D I 16 D O PIO D48 48 D I O 80 01 30 PIO D24 24 D I O 80 01 40 PIO 823 Multi function 80 03 00 PIO 821 Multi function 80 03 10 PIO DA16 16 D A 80 04 00 PIO DA8 8 D A 80 04 00 PIO DA4 4 D A 80 04 00 PISO C64 64 isolated D O 80 08 00 PISO P64 64 isolated D I 80 08 10 PISO P32C32 32 32 80 08 20 PISO P8R8 8 isolated D I 80 08 30 8 220V relay PISO P8SSR8AC 8 isolated D I 80 08 30 8 SSR AC PISO P8SSR8DC 8 isolated D I 80 08 30 8 SSR DC PISO 730 16 DI 16 D O 80 08 40 16 isolated 16 isolated D O PISO 813 32 isolated A D 80 OA 00 PISO DA2 2 isolated D A 80 OB 00 Note The sub IDs will be added more and more without notice The user can refer to PIO H for the newest information PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 28 3 1 2 PIO GetConfigAddressSpace PIO GetConfigAddressSpace wBoardNo wBase wlIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice wBoardNo 0toN gt totally N 1 boards found by PIO Drivelnit e wBase gt base address of the board control word wlrq allocated IRQ channel number of this board e wSubVendor gt subVendor ID of this board e wSubDevice gt subDevice ID of this board e wSubAux gt subAux ID of this board e wSlotBus gt hardware sl
8. Diagram of PIO D56 D24 INT CHAN 0 INT CHAN 1 INT INT CHAN 2 Level trigger INT CHAN 3 initial low active high The interrupt output signal of PIO D56 PIO D24 INT is Level trigger amp Active Low If the INT generate a low pulse the PIO D56 PIO D24 will interrupt the PC once a time If the INT is fixed in low level the PIO D56 PIO D24 will interrupt the PC continuously So that INT CHAN 0 1 2 3 must be controlled in a pulse type signals They must be fixed in low level state normally and generated a high pulse to interrupt the PC The priority of INT 0 1 2 3 is the same If all these four 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 Sec 2 4 for mare information DEMOS C for multi channel interrupt source If only one interrupt source is used the interrupt service routine doesn t have to read the status of interrupt source The demo program DEMO3 C amp DEMO4 C are designed for single channel interrupt demo as follows for INT CHAN 0 only PCO initial low DEMOA C for INT CHAN 0 only PCO initial high PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 12 2 4 2 INT CHAN 0 1 2 3 INT CHAN 0 1 2 3 PCO PC1 PC2 PC3 7 uw Inverte
9. Write 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 feature extension so don t control this register now PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 33 3 3 4 INT Mask Control Register Read Write wBase 5 o b NO Note Refer to Sec 3 1 for more information about wBase EN0z02 disable PCO as a interrupt signal default ENO 17 enable PCO as a interrupt signal outportb wBase 5 0 disable interrupt outportb wBase 5 1 enable interrupt PCO outportb wBase 5 0x0f enable interrupt 2 3 3 5 Aux Status Register Read Write wBase 7 Note Refer to Sec 3 1 for more information about wBase Aux0 PCO Auxl PC1 Aux2 PC2 Aux3 PC3 Aux7 4 Aux ID Refer to DEMOS C for more information The Aux 0 3 are used as interrupt source The interrupt service routine has to read this register for interrupt source identification Refer to Sec 2 5 for more information PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 34 3 3 6 Interrupt Polarity Control Register Read Write wBase 0x2A o b b mv Note Refer to Sec 3 1 for more information about wBase 0 1 gt select the non inverted signal from PCO INV0z02 select the inverted signal from PCO outportb wBase 0x2a 0x0f select the non
10. e wSubAux gt subAux ID of board to find This function will show a text string for this special subIDs This text string is the same as that defined in PIO H The demo program is given as follows wRetVal PIO_DriverInit amp wBoards Oxff Oxff Oxff find all PIO PISO printf nThrer are d PIO PISO Cards in this PC wBoards if wBoards 0 exit 0 printf Mn for i 0 i lt wBoards i GetConfigAddressSpace 1 amp wBase amp wlrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x subID x 3x Sx Slot ID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice prointfi ys ShowPioPiso wSubVendor wSubDevice wSubAux PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 30 3 2 The Assignment of I O 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 the user will be very difficult to identify which board is card 0 The software driver can support 16 boards max Therefore the user can install 16 boards of PIO PSIO series in one PC system How to find the card 0 amp card 1 It is difficult to find the card NO The simplest way to identify which card is 0 is to use wSlotBus amp wSlotDevice as follows 1 Remove
11. in Low state gt all DI operation is disable e The RESET is in High state gt all DI operation is enable RESET disable Buffer input Clock input D I buffer CKT PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 9 2 3 3 DO Port Architecture 1 When the PC is power up all operation of DO port CONI is disable The enable disable of DO port is controlled by the RESET signal Refer to Sec 3 3 1 for more information about RESET signal e The RESET is in Low state gt all DO operation is disable The RESET is in High state all DO operation is enable The power up states are given as follows e All DO operations are disable e All output latch be cleared to Low Level RESET clear input Latch Clock input D O buffer CKT PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 10 2 4 Interrupt Operation PCO PC2 and PC3 can be used as interrupt signal source Refer to Sec 2 1 for PCO PCI PC2 PC3 location The interrupt of PIO D56 PIO D24 is level trigger amp Active High The interrupt signal can be inverted or non inverted programmable The procedures of programming are given as follows 1 make sure the initial level is High or Low 2 ifthe initial state is High select the inverted signal Sec 3 3 6 3 ifthe initial state is Low select the non inverted signal Sec 3 3 6 4 enable the INT function Sec 3 3 4 5 Ifthe interrupt signal is active program will transfer in
12. inverted input PCO 1 2 3 outportb wBase 0x2a 0x00 select the inverted input of PC0 1 2 3 outportb wBase 0x2a 0x0e select the inverted input of PCO select the non inverted input PC1 2 3 outportb wBase 0x2a 0x0c select the inverted input of 1 select the non inverted input PC2 3 Refer to 2 4 for more information Refer to DEMOS C for more information 3 3 7 O Selection Control Register Write wBase Oxcc o b b 0 feom Note Refer to Sec 3 1 for more information about wBase Port 1 gt this port is used as a D O port Port 0 gt this port is used as a port outportb wBase Oxcc 0x00 configure Port0 1 2 as port outportb wBase 0xcc 0x04 configure 0 1 as port configure Port2 as D O port PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 35 3 3 8 Read Write 8 bit data Register Read Write wBase40xc0 0xcA 0xc8 0xd0O Oxd4 D 1 6 14 jp gt Note Refer to Sec 3 1 for more information about wBase There are five three 8 bit I O ports in the PIO D56 PIO D24 Each port is easy to read write by access his owns data register outportb wBase 0xc0 Val Val inportb wBase 0xc0 write to D O port read from port outportb wBase 0xcc 0x07 configure Port0 Port2 as DO port outportb wBase 0xc0 i1 write to PortO outportb wBase 0xc0 12 write to Port1 out
13. 0 70 service outportb 5 1 enable interrupt PCO now_int_state 0 now ini_signal is low outportb wBaset0x2a 1 select the non invert enable void interrupt irq_service if now int state 1 now PCO change to low INT CHAN 0 PCO if 7 amp 1 0 PCO still fixed in low my need to generate a high pulse outportb 0 2 1 select noninverted input now int state 0 now PCO low else now int state 1 now PCO High else now PCO change to high INT CHAN 0 PCO Ky COUNT if 7 amp 1 1 PCO still fixed in high need to generate a high pulse outportb 0 2 0 INVO select inverted input now int state 1 now PCO high else now int state 0 now PCO low if gt 8 outportb A2 8259 0x20 outportb 1_8259 0x20 PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 43 4 5 DEMOA demo 4 Count high pulse of PCO 5 initial Hig step 1 run D h amp active Low 4 include PIO H define A1 8259 0x20 define 2 8259 OxAO define EOI 0x20 WORD init high WORD wBase wIrqg i int main int 1 5 W W char c clrscr static void interrupt service
14. 20 99 4 1 4 PCI Data Acquisition Family We provide a family of PCI BUS data acquisition cards These cards can be divided into three groups as follows 1 first generation isolated or non isolated cards PCI 1002 1202 1800 1802 1602 multi function family non isolated PCI P16R16 P16C16 P16POR16 P8R8 D I O family isolated PCI TMC12 timer counter card non isolated 2 PIO series cost effective generation non isolated cards PIO 823 821 multi function family PIO D144 D96 D64 D56 D48 D24 D I O family PIO DA16 DA8 DA4 D A family 3 PISO series cost effective generation isolated cards PISO 813 A D card PISO P32C32 P64 C64 D I O family PISO P8R8 P8SSR8AC P8SSR8DC D I O family PISO 730 D I O card PISO DA2 D A card 1 5 Product Check List In addition to this manual the package includes the following items one piece of PIO D56 or PIO D24 card one piece of company floppy diskette or CD one piece of release note It is recommended to read the release note firstly important information will be given in release note as follows l where you can find the software driver amp utility 2 how to install software amp utility 3 4 FAQ where is the diagnostic program Attention If any one of these items is missing 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 f
15. 3 e One DB37 connector two 20 pin flat cable connectors only for PIO D56 High driving capability Automatically detected by windows 95 98 NT No base address or IRQ switches to set PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 3 1 2 Specifications All inputs TTL compatible Logic high voltage 2 4V Min Logic low voltage 0 8V Max All outputs are TTL compatible OPTO 22 output CON3 Sink current 64mA Max Source current 32mA Max 16 output CONI Sink current 8mA Max Source current 0 4mA Max Environmental Operating Temperature 0 to 60 C Storage Temperature 20 C to 80 C Humidity 0 to 90 non condensing Dimension 143mm X 105mm Power Consumption 5V 530mA 420mA PIO D56 PIO D24 1 3 Order Description PIO D56 PCI bus 56 bit DI O board PIO D24 PCI bus 24 bit DI O board 1 3 1 Options DB 24PD 24 channel isolated D I board DB 24RD 24 channels relay board DB 24PRD 24 channels power relay board DB 16P8R 16 channels isolated and 8 channels relay output board DB 24POR 24 channels PhotoMos output board DB 24C 24 channels open collector output board ADP 20 PCI extender 20 pin header to 20 pin header for PCI bus I O boards NAPPCI win DLLs for Windows 95 98 NAPPCI wnt DLLs for Windows NT 4 0 NAPVIEW 1 LabVIEW driver for Windows 95 98 NAPVIEW 2 LabVIEW driver for Windows NT PIO D56 PIO D24 User Manual Ver 1 0 09
16. C 24 30V 100 mA DB 16P8R 16 Relay 120V 0 5A 8 isolated input PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 21 2 5 7 DB 24PRD DB 24POR DB 24C DB 24PRD 24 power relay 5A 250V DB 24POR 24 photoMOS relay 0 1A 350VAC DB 24C 24 open collector 100mA per channel 30V max The DB 24PRD 24 channel power relay output board consists of 8 form C and 16 form A electromechanical relays for efficient switching of load programmed control The contact of each relay can control a 5A load at 250ACV 30VDCV 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 Twenty four enunciator LEDs one for each relay light when their associated relay is activated To avoid overloading your power supply this board needs a 12VDC or 24VDC external power supply Normal Open Form A Relay l 50 pin header Note 50 Pin connector OPTO 22 compatible for DIO 24 DIO 48 DIO 144 PIO D144 PIO D96 PIO D56 PIO D48 PIO D24 Channel 16 Form A Relay 8 Form C Relay Relay switching up to 5A at 110 5A at 30DCV PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 22 2 5 8 Daughter Boards Comparison Table 20 pin flat cable 50 pin flat cable D sub 37 pin
17. PIO D56 D24 User 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 1999 by ICP DAS rights are reserved Trademark The names used for identification only maybe registered trademarks of their respective companies PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 1 Tables of Content 1 INTRODUCTION FEATURES otis 3 1 2 SPECIEIGATIONS 2255 Ped easet te Tode eae 4 1 3 ORBER DESCRIPTION dee dede ba tes 4 1 4 PCI DATA ACQUISITION 2 2 5 1 5 PRODUCT GHECK LIST 5 HARDWARE
18. all PIO D56 PIO D24 from this PC 2 Install one PIO D56 PIO D24 into the PC s PCI 5101 run PISO EXE amp record the wSlotBusl1 amp wSlotDevicel 3 Remove all PIO D56 PIO D24 from this PC 4 Install one PIO D56 D24 into the PC s PCI slot2 run PISO EXE amp 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 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 The above procedure will record all wSlotBus amp wSlotDevice in this PC These values will be mapped to this PC s physical slot This mapping will not be changed for any PIO PISO cards So it can be used to identify the specified PIO PISO card as follows Step 1 Record all wSlotBus amp wSlotDevice Step2 Use PIO GetConfigAddressSpace to get the specified card s wSlotBus amp wSlotDevice Step3 The user can identify the specified PIO PISO card if he compare the wSlotBus amp wSlotDevice in step2 to step1 PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 31 3 3 Thel O Address The I O 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
19. ally isolated inputs of the DB 24PD consist of a bi directional optocoupler with a resistor for current sensing You can use the DB 24PD to sense DC signal from TTL levels up to 24V or use the DB 24PD to sense a wide range of AC signals You can use this board to isolated the computer from large common mode voltage ground loops and transient voltage spike that often occur in industrial environments PIO D56 D24 W PIO D56 D24 O STL DB 24PD 22222 AC or DC Signal OV to 24V DB 24PD 50 pin flat cable header Yes D sub 37 pin header Yes PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 20 2 5 6 DB 24RD Relay Board The DB 24RD 24 channel relay output board consists of 24 form C relays for efficient switch of load by programmed control The relay are energized by apply 12V 24V voltage signal to the appropriated relay channel on the 50 pin flat connector There are 24 enunciator LEDs for each relay light when their associated relay is activated Form C Relay Normal Open Normal Close Com Note Channel 24 Form C Relay Relay Switching up to 0 5A at 110ACV or 1A at 24DCV DB 24RD 50 pin flat cable header Yes D sub 37 pin header Yes DB 24R DB 24RD 24 Relay 120V 0 5A DB 24PR DB 24PRD 24 Power Relay 250V 5A DB 24POR 24 photoMOS Relay 350V 01 A DB 24SSR 24 SSR 250VAC 4A DB 24
20. by user The plug amp play BIOS will assign proper I O address to each PIO PISO series card very well The I O address of PIO D56 PIO D24 are given as follows Address Read Wbase 0 RESET control register 5 INT mask control register Same Nase Aux pin status register Same __ Wbase 0x2a INT polarity control register Wbase 0xc8 read Port2 write Port2 Wbase 0xcc read configuration PortO Port2 configuration only for PIO D56 only for PIO D56 only for PIO D56 only for PIO D56 Note Refer to Sec 3 1 for more information about wBase PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 32 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 on 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 2 all D I O are enable now outportb wBase 0 RESET Low gt 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 Aux 1 gt this Aux is used as a D O When the PC is first power up All Aux signal are in Low state All Aux are designed as for all PIO PISO series Please set all Aux in state 3 3 3 data Register Read
21. ct CON1 t0 CON2 of PIO D56 step 2 run DEMO2 EXE step 3 check the information on screen will same as D O check the result on screen will same as CON3 input include PIO H WORD wBase wIrqg int main int i1 12 t 3 31 j2 7j3 WORD wBoards wRetVal t1 t2 t3 t4 t5 t60 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c long i clrscr stepl step2 enable all D I O port outportb wBase 1 step3 configure I O direction outportb 0 0x00 1 for gotoxy 1 7 11 1 amp 0 i2 i 8 amp 0xff outportb 0 0 il outportb 0 4 12 jl inportb 0 32 wBase 0xd4 2 2 1 12 find address mapping of PIO PISO cards RESET gt 1 set CON3 as D I ports printf AnDO 2x 2x DI if 31 11 11 2 12 printf n nError else printf MnO K jl inportb 0 0 j2 inportb 0 4 j3 inportb 0 8 printf n nD I of CON3 1 1 lt lt 1 i i amp OxOffff if i220 1 1 if kbhit 0 PIO DriverClose return il j2 j1 2x 2x 2x PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 41 xy hu 11 12 13 4 4 demo 3 Count high pulse of PCO x initial Lo
22. d Noninverted select 0 1 2 3 Enable Disable select 0 1 2 3 The INT CHAN 0 must be fixed in low level state normally and generated a high pulse to interrupt the PC The ENO EN1 EN2 EN3 can be used to enable disable the INT CHAN 0 1 2 3 as follows Refer to Sec 3 3 4 ENO 1 2 3 0 gt gt INT 0 1 2 3 disable ENO 1 2 32 1 gt INT 0 1 2 3 enable The INVO can be used to invert non invert the PCO 1 2 3 as follows Refer to Sec 3 3 6 INVO 1 2 3 0 gt INT CHAN 0 1 2 3 inverted state of PCO 1 2 3 INVO 1 2 3 1 gt INT 0 1 2 3 non inverted state of PCO 1 2 3 PIO D56 PIO D24 User Manual 1 0 09 20 99 13 2 4 3 high active low Interrupt source If the PCO is a initial high active low signal the interrupt service routine should use INVO to inverted non inverted the PCO for high pulse generation as follows Refer to DEMO4 C Initial set now int state 1 initial state for PCO outportb wBase 0x2a 0 select the inverted PCO void interrupt irq_ service if now_int_state 1 now PCO is changed to LOW gt INT_CHAN_0 PCO HIGH now f COUNT Ltt find a LOW pulse PCO inport wBase 7 amp 1 0 the PCO is still fixed LOW gt need to generate a high pulse outportb 0 2 1 INVO select the non inv
23. e four falling edge amp rising edge can be detected by DEMOS C Note when the interrupt is active the user program has to identify the active signals These signals maybe active at the same time So the interrupt service routine has to service all active signals at the same time PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 16 void interrupt irq_ service new_int_state inportb wBase 7 amp 0x0f int_c new_int_state now_int_state if int_c amp 0x1 0 if new_int_state amp 0x01 0 CNT_H1 else CNT_L1 invert invert l1 if int_c amp 0x2 0 if new_int_state amp 0x02 0 CNT_H2 else CNT_L2 invert invert 2 if int_c amp 0x4 0 If new_int_state amp 0x04 0 CNT_H3 else CNT_L3 invert invert 4 if int_c amp 0x8 0 if new_int_state 0x08 0 CNT_H4 else CNT_L4 invert invert 8 now int state new int state outportb 0 2 invert if wIrq 8 outportb 1_8259 0x20 outporth A2_8259 0x20 read all interrupt state compare which interrupt signal be change INT CHAN 0 is active now PCO change to high now PCO change to low to generate a high pulse now 1 change to high change to low to generate a high p
24. erted input b INT CHAN 0 PCO LOW gt E INT CHAN 0 generate a high pulse now int state 0 now PCO LOW else now_int_state 1 now PCO HIGH don t have to generate high pulse else now PCO is changed to HIGH c gt INT CHAN 0 PCO HIGH now zy COUNT Htt find a HIGH pulse If inport wBase 7 amp 1 1 the PCO is still fixed in HIGH need to generate a high pulse outportb 0 2 0 INVO select the inverted input d INT CHAN 0 PCO LOW gt x INT CHAN 0 generate a high pulse now int state 1 now PCO HIGH else now_int_state 0 now PCO LOW don t have to generate high pulse if gt 8 outportb A2 8259 0x20 outportb 1_8259 0x20 INT CHAN O PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 14 2 4 4 Initial low active high Interrupt source If the PCO is a initial low active high signal the interrupt service routine should use INVO to inverted non inverted the PCO for high pulse generation as follows Refer to DEMO3 C Initial set now int state 0 initial state for PCO outportb wBase 0x2a 1 select the non inverted PCO void interrupt service if now int state 1 now PCO is changed to LOW c gt INT CHAN 0 PCO HIGH now COUNT Ltt find a LOW pulse PCO inport wBase 7 amp 1 0 t
25. evice wSubAux wSlotBus wSlotDevice 3 Show PIO PISO wSubVendor wSubDevice wSubAux functions are defined in PIO H Refer to Chapter 4 for more information The important driver information is given as follows 1 Resource allocated information wBase BASE address mapping in this PC e wlrq IRQ channel number allocated in this PC 2 PIO PISO identification information wSubVendor subVendor ID of this board wsubDevice subDevice ID of this board wSubAux subAux ID of this board 3 PC s physical slot information wSlotBus hardware slot ID1 in this PC s slot position wSlotDevice hardware slot ID2 in this PC s slot position The utility program PIO 8 will detect amp show all PIO PISO cards installed in this PC Refer to Sec 4 1 for more information PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 26 3 1 1 Driverlnit PIO_DriverInit amp wBoards wSubVendor wSubDevice wSubAux wBoards 0 to number of boards found in this PC e wSubVendor subVendor ID of board to find e wSubDevice gt subDevice ID of board to find wSubAux gt subAux ID of board to find This function can detect all PIO PISO series card in the system It is implemented based on the PCI plug amp play mechanism 1 It will find all PIO PISO series cards installed in this system amp save all their resource in the library Sample program 1 find all PIO D56 PIO D24 in this PC wSubVendor 0x80 wSubDev
26. he PCO is still fixed LOW gt need to generate a high pulse outportb wBase 0x2a 1 INVO select the non inverted input d INT CHAN 0 PCO LOW gt A INT CHAN 0 generate a high pulse now int state 0 now PCO LOW else now int state 1 now PCO HIGH don t have to generate high pulse else now PCO is changed to HIGH a gt INT CHAN 0 PCO HIGH now sy COUNT find a High pulse If inport wBase 7 amp 1 1 the PCO is still fixed in HIGH need to generate a high_pulse outportb 0 2 0 INVO select the inverted input b INT CHAN 0 PCO LOW gt xf INT CHAN 0 generate a high pulse now int state 1 now PCO HIGH else now_int_state 0 now PCO LOW don t have to generate high pulse if gt 8 outportb A2 8259 0x20 outportb 1_8259 0x20 INT CHAN O PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 15 2 4 5 Muliti Interrupt Source Assume PCO is initial Low active High is initial High active Low PC2 is initial Low active High PC3 is initial High active Low as follows PCO PCI PCO amp PC1 PCO amp active at the same return to normal time at the same time PC2 amp PC3 are PC2 amp PC3 are active at the same return to normal at time the same time Refer to DEMOS C for source program All thes
27. ice 1 wSubAux 0x40 for PIO D56 D24 wRetVal PIO_DriverInit amp wBoards wSubVendor wSubDevice wSubAux printf Threr are PIO D56 PIO D24 Cards in this PC n wBoards step2 save resource of all PIO D56 PIO D24 cards installed in this PC for 120 i lt wBoards i PIO_GetConfigAddressSpace i amp wBase amp wlrq amp wID1 amp wID2 amp wID3 amp wID4 amp wID5 printf nCard_ d wBase x wlIrq x i wBase wlrq wConfigSpace i 0 wBaseAddress save all resource of this card wConfigSpace 1i 1 wlrq save all resource of this card Sample program 2 find all PIO PISO in this PC refer to Sec 4 1 for more information wRetVal PIO_DriverInit amp wBoards Oxff Oxff Oxff find all PIO PISO printf nThrer are d PIO_PISO Cards in this PC wBoards if wBoards 0 exit 0 printf n for i 0 i lt wBoards i PIO_GetConfigAddressSpace 1 amp wBase amp amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x subID x 3x Slot ID x x i wBase wlIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice prinE ys ShowPioPiso wSubVendor wSubDevice wSubAux PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 27 The sub IDs of PIO PISO series card are given as follows PIO PISO series
28. nCard_ d wBase x subID x x Sx Slot ID x x i wBase wlIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice pruintt gt 33 ShowPioPiso wSubVendor wSubDevice wSubAux PIO DriverClose NOTE the PIO PISO EXE is valid for all PIO PISO cards The user can execute the PIO PISO EXE to get the following information List all PIO PISO cards installed in this PC List all resources allocated to every PIO PISO cards List the wSlotBus amp wSlotDevice for specified PIO PISO card identification refer to Sec 3 2 for more information PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 38 4 1 1 PIO PISO EXE for Windows User can find this utility in the company CD or floppy disk It is useful for all PIO PISO series card After executing the utility every detail information for all PIO PISO cards that installed in the PC will be show as follows Cor Board PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 39 4 2 DEMO demo 1 D O demo of CON3 x is step 1 connect a DB 24C to CON3 of PIO D56 PIO D24 step 2 run DEMO1 EXE step 3 check the LEDs of DB 24C will turn on sequentially include PIO H WORD wBase wIrqg int main int dl 22 13 long i WORD wBoards wRetVal t1 t2 t3 t4 t5 t6 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c eLrser gt ste
29. ot ID1 of this board e wSlotDevice gt hardware slot ID2 of this board 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 The sample program source is given as follows step1 detect all PIO D56 PIO D24 cards first wSubVendor 0x80 wSubDevice 1 wSubAux 0x40 for PIO D56 D24 wRetVal PIO_DriverInit amp wBoards wSubVendor wSubDevice wSubAux printf Threr are PIO D56 PIO D24 Cards in this PC n wBoards step2 save resource of all PIO D56 PIO D24 cards installed in this PC for 120 i lt wBoards i PIO GetConfigAddressSpace i amp wBase amp wlrq amp t1 amp t2 amp t3 amp t4 amp t5 printf nCard_ d wBase x wIrq x i wBase wlrq wConfigSpace i 0 wBaseAddress save all resource of this card wConfigSpace i 1 wlrq save all resource of this card step3 control the PIO D56 PIO D24 directly wBase wConfigSpace 0 0 get base address the card 0 outport wBase 1 enable all D I O operation of card 0 wBase wConfigSpace 1 0 get base address the card 1 outport wBase 1 enable all D I O operation of card 1 PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 29 3 1 3 Show PIO PISO Show PIO PISO wSubVendor wSubDevice wSubAux wSubVendor gt subVendor ID of board to find e wSubDevice gt subDevice ID of board to find
30. pl find address mapping of PIO PISO cards wRetVal PIO DriverInit amp wBoards 0x80 0x01 0x40 for PIO D56 D24 printf n 1 Threr are d PIO D56 D24 Cards in this PC wBoards if wBoards 0 exit 0 printf n n The Configuration Spac for i 0 i lt wBoards i GetConfigAddressSpace i amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf d wBase x wIrq x subID x x x SlotID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice gt s ShowPioPiso wSubVendor wSubDevice wSubAux GetConfigAddressSpace 0 amp wBase amp wIrq amp tl amp t2 amp t3 amp t4 amp t5 select card 0 step2 enable all D I O port outportb wBase 1 RESET gt 1 step3 configure I O direction outportb 0 0x07 set CON3 as D O ports 1 il i amp Oxff 12 1 gt gt 8 amp Oxff i3 2 i 16 amp 0xff outportb 0 0 il outportb 0 4 12 outportb 0 8 13 delay 10000 1 1 lt lt 1 i i amp OxOffffff if i 0 i 1 if kbhit 20 break PIO_DriverClose PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 40 4 3 DEMO2 demo 2 DI O demo of CON1 CON2 amp CON3 step 1 connect DB 24P to CON3 of PIO D56 PIO D24 EX conne
31. portb wBase 0xc0 13 write to Port2 outportb wBase 0xcc 0x01 configure as DO port Port2 as DI port TE outportb wBase 0xc0 i1 write to PortO j2 inportb wBase 0xc4 read 1 oh j3 inportb wBase 0xc8 read Port2 1 inportb wBase 0xd0 read CON2 Low byte h inportb wBase 0xd4 read CON2 High byte Val h lt lt 8 l Val is 16 bit data outportb wBase 0xd0 Val write to CONI Low byte outportb wBase 0xd4 Val gt gt 8 write to CONI high byte f PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 36 4 Demo program It is recommended to read the release note first All important information will be given in release note as follows l where you can find the software driver amp utility 2 how to install software amp utility 3 4 FAQ where is the diagnostic program There are many demo programs given in the company floppy disk or CD After the software installation the driver will be installed into disk as follows MSC BC TC LIB TC LIB Large TC LIB Huge TC LIB Large PIO H TC LIB Large TCPIO_L LIB TC LIB Huge PIO H TC LIB Huge TCPIO_H LIB MSC LIB Large PIO H MSC LIB Large MSCPIO_L LIB MSC LIB Huge PIO H MSC LIB Huge MSCPIO_H LIB BC LIB Large PIO H BC LIB Large BCPIO_L LIB BC LIB Huge PIO H BC LIB Huge BCPIO_H LIB gt for Turbo C 2 xx or above gt fo
32. r MSC 5 xx or above gt for BC 3 xx or above gt for TC library gt for TC demo program gt TC large model library gt TC huge model library gt TC declaration file gt TC large model library file gt TC declaration file gt TC huge model library file gt MSC declaration file gt MSC large model library file gt MSC declaration file gt MSC huge model library file gt BC declaration file gt BC large model library file gt BC declaration file gt BC huge model library file NOTE The library is validate for all PIO PISO series cards PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 37 4 1 PISO 1 WO WO in WO WO Find all PIO PISO series cards in this PC system step 1 plug all PIO PISO cards into PC step 2 run PIO PISO EXE nclude PIO H RD wBase wIrq RD wBase2 wIrq2 t main t 1 75 31 32 33 j4 k jj add 311 322 333 344 RD wBoards wRetVal RD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c float ok err clrscr wRetVal PIO DriverInit amp wBoards 0xff O0xff 0xff for PIO PISO printf nThrer are d PIO PISO Cards in this PC wBoards if wBoards 0 exit 0 printf Mn for i 0 i wBoards i GetConfigAddressSpace i amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf
33. ree D I O ports are configured as D I port All D O latch register are undefined refer to Sec 2 3 2 The user has to perform some initialization before using these D I O The recommended steps are given as follows Step 1 find address mapping of PIO PISO cards refer to Sec 3 1 Step 2 enable all D I O operation refer to Sec 3 3 1 Step 3 configure the three ports in CON3 to their expected D I O state amp send the initial value to all D O ports refer to Sec 3 3 8 Refer to DEMOI C for demo program PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 7 I O select Sec 3 3 7 RESET Sec 3 3 1 disable input Latch Sec 3 3 8 D O latch CKT disable Buffer input Sec 3 3 8 P Clock input D I buffer CKT The RESET is in Low state gt all D I O operation is disable The RESET is in High state gt all D I O operation is enable If D I O is configured as port D I external input signal If D I O is configured as D O port D I read back of D O If D I O is configured as D I port send to D O will change the D O latch register only The D I amp external input signal will not change PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 8 2 3 2 DI Port Architecture CON2 When the PC is power up all operation of DI port CON2 is disable The enable disable of DI port is controlled by the RESET signal Refer to Sec 3 3 1 for more information about RESET signal e The RESET is
34. to the interrupt service routine if INT signal is High now gt select the inverted input gt if INT signal is Low now gt select the non inverted input Refer to DEMO3 C amp DEMOA C for single interrupt source Refer to DEMOS C for four interrupt sources If only one interrupt signal source is used the interrupt service routine does not have to identify the interrupt source refer to DEMO3 C amp DEMOA C If there are more than one interrupt source the interrupt service routine has to identify the active signals as follows refer to DEMOS C Read the new status of the interrupt signal source Compare the new status with the old status to identify the active signals If PCO is active service PCO amp non inverter inverted the PCO signal If PC1 is active service amp non inverted inverted the signal If PC2 is active service PC2 amp non inverted inverted the PC2 signal If PC3 is active service PC3 amp non inverted inverted the PC3 signal gab Que e ups oe Save the new status to old status Limitation if the interrupt signal is too short the new status may be as same as old status So the interrupt signal must be hold active until the interrupt service routine is executed This hold time is different for different O S The hold time can be as short as micro second or as long as second In general 20ms is enough for all O S PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 11 2 4 4 Interrupt Block
35. ulse now PC2 change to high now PC2 change to low to generate a high pulse now PC3 change to high now PC3 change to low to generate a high pulse PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 17 A E T 2 5 Daughter Boards 2 5 1 DB 37 The DB 37 is a general purpose daughter board for D sub 37 pins It is designed for easy wire connection 2 5 2 DN 37 The DN 37 is a general purpose daughter board for DB 37 with DIN Rail Mounting It is designed for easy wire connection 1 mil SEI a 2 5 3 DB 8125 The DB 8125 is a general purpose screw terminal board It is designed for easy wire connection There are one DB 37 amp two 20 pin flat cable header in the DB 8125 37pin cable DB 8125 for DB 37 or i Hoey j 20 pin flat cable header UN UR p E sa PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 18 2 5 4 ADP 20 PCI The ADP 20 PCI is a extender for 20 pin header One side of ADP 20 PCI can be connected to a 20 pin header The other side can be mounted on the PC chassis as follows NOTE The user can choose the suitable extender for his own application PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 19 2 5 5 DB 24PD Isolated Input Board The DB 24PD is a 24 channel isolated digital input daughter board The optic
36. uture PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 5 2 Hardware configuration 2 1 Board Layout NOO v2d Old O 9Sq Old 0 Sna 19 i 0000000000 0000000000 MER z 3 lt m O PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 6 2 2 port Location The PIO D56 PIO D24 consists of one 24 bit bi directional port one 16 bit input port and one 16 bit output port only for PIO D56 The 24 bit port supports three 8 bit groups PA PB amp PC Each 8 bit group can be configured to function as either inputs or outputs individual All groups at 24 bit bi directional port are configured as inputs upon power up or reset The I O port location is given as follows Connector of PAO PA7 PBO PB7 PCO PC7 PIO D56 PIO D24 CON3 DI O 0 Port Port2 Connector of PIO D56 Description CONI D O CON2 D I Refer to Sec 2 1 for board layout amp I O port location Note PCO 1 PC2 and PC3 can be used as interrupt signal source Refer to Sec 2 4 for more information 2 3 Enable Operation 2 3 1 DI O Port Architecture CON3 When the PC is power up all operation of D I O port CON3 is disable The enable disable of D I O port is controlled by the RESET signal Refer to Sec 3 3 1 for more information about RESET signal The power up states are given as follows e All D I O operations are disable e All th
37. verte input now int state 0x0a PCO Low 1 High PC2 Low PC3 High CNT L1 2CNT 1 2 L3 2CNT 1 4 0 Low pulse counter CNT_H1 CNT_H2 CNT_H3 CNT_H4 0 High_pulse counter int num 0 outportb 5 0x0f enable interrupt enable PC2 PC3 x 1 hold time of INT CHAN 0 1 2 3 must long enough 2 The ISR must read the interrupt status again to the active interrupt sources Es 3 The INT CHAN O amp INT CHAN 1 can be active at the same time E void interrupt irq_ service char c int num t t new int state inportb 7 amp 0x0f read all interrupt state int c new int state now int state compare which interrupt signal be change xy if int amp 0 1 0 INT CHAN 0 is active m new int state amp 0x1 0 now PCO is change to high now PCO is change to low ope to generate a high pulse if E INT CHAN 1 is active ie new int state amp 0x2 0 is change to high UNE PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 47 else CNT_L2 invert invert 2 if _ amp 0 4 0 if new int state amp 0x4 CNT_H3 else CNT_L3 invert invert 4 if int_c amp 0x8 0 if new int state amp 0x8 CNT_H4 else
38. w amp active High step 1 run DEMO3 EXE A include PIO H define A1 8259 0x20 define 2 8259 OxAO define EOI 0x20 WORD init_low WORD wBase wIrqg static void interrupt irg_service int COUNT irqmask now int state int main LNG 1 1 WORD wBoards wRetVal t1 t2 t3 t4 t5 t6 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c clrscr stepl find address mapping of PIO PISO cards select card 0 step2 enable all D I O port outportb wBase 1 RESET gt 1 step3 configure I O direction outportb 0 0x00 set CON3 as D I ports COUNT 0 init_low printf n n show the count of High pulse n for gotoxy 1 8 printf nCOUNT d COUNT if kbhit 0 break outportb 5 0 disable all interrupt PIO_DriverClose Use PCO as external interrupt signal WORD init_low disable outportb 5 0 disable all interrupt if wIrq 8 irqmask inportb A1l 825941 outporth A1_8259 1 irgmask amp Oxff 1 lt lt wIrq setvect wIrq 8 irq service PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 42 else irqmask inportb 1 825941 outportb A1 8259 41 irqmask amp Oxfb IRQ2 irqmask inportb A2 825941 outporth A2_8259 1 irgmask amp Oxff 1 wlIrq 8 setvect 1 8
39. wRetVal t1 t2 t3 t4 t5 t60 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c clrscr stepl find address mapping of PIO PISO cards select card 0 step2 enable all D I O port outportb wBase 1 RESET gt 1 step3 configure I O direction outportb 0 0x00 set CON3 as D I ports init printf n show the count of pulse n for gotoxy 1 7 printf Xn CNT L CNT H d d d d L1 CNT H1 CNT L2 CNT H2 CNT L3 CNT H3 CNT LA4 CNT H4 int num if kbhit 0 break outportb 5 0 disable all interrupt PIO_DriverClose Use PCO 1 PC2 amp as external interrupt signal WORD init disable outportb 5 0 disable all interrupt PIO D56 PIO D24 User Manual Ver 1 0 09 20 99 46 if wIrq 8 irqmask inportb A1l 825941 outporth A1_8259 1 irgmask amp Oxff 1 lt lt wIrq setvect wIrq 8 irq service else irgqmask inportb 1_8259 1 outportb A1_8259 1 irqmask amp Oxfb IRQ2 irqmask inportb A2 825941 outporth A2_8259 1 irgmask amp Oxff 1 wlIrq 8 setvect 1 8 0 70 service invert 0x05 outportb wBase 0x2a invert PCO non inverte input inverte input PC2 non inverte input PC3 in

Download Pdf Manuals

image

Related Search

Related Contents

A-307R A-209R - Pioneer Europe - Service and Parts Supply website  LCD Projektor VT45 Bedienungshandbuch  

Copyright © All rights reserved.
Failed to retrieve file