ICP DAS USA PIO-D144 User Manual
Hide thumbs Also See for PIO-D144:

Advertisement

Quick Links

ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ
+7(495)109-02-08 sales@bbrc.ru www.bbrc.ru
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. All rights are reserved.
Trademark
The names used for identification only maybe registered
trademarks of their respective companies.
PIO-D144
User's Manual
Version: 2.1
Date:1999/10
Page 1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIO-D144 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ICP DAS USA PIO-D144

  • Page 1 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 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.
  • Page 2: Table Of Contents

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual Tables of Contents INTRODUCTION ......................... 3 HARDWARE CONFIGURATION....................4 2.1 B ..........................4 OARD AYOUT I/O P ........................5 OCATION 2.3 E I/O O ......................
  • Page 3: Introduction

    The PIO-D144 consists of one DB-37 & five 50-pin flat-cable connectors. There are three 8-bit port, PA, PB & PC in each connector. Every port consists of 8- bit programmable D/I/O. So the PIO-D144 can provide 144 channels of TTL- compatible D/I/O.
  • Page 4: Hardware Configuration

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual Hardware configuration Board Layout Page 4 Version: 2.1 Date: 1999/10...
  • Page 5: I/O Port Location

    PIO-D144 User’s Manual I/O Port Location There are eighteen 8-bit I/O ports in the PIO-D144. Every I/O port can be programmed as D/I or D/O port. When the PC is first power-on, all eighteen ports are used as D/I port. The I/O port location is given as following:...
  • Page 6: D/I/O Architecture

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual D/I/O Architecture I/O select (Sec. 3.3.9) D/I/O RESET\ (Sec. 3.3.1) disable\ Data input Latch (Sec. 3.3.7) Clock input D/O latch CKT disable Data Buffer input (Sec.
  • Page 7: Interrupt Operation

    Interrupt Operation The PC0, PC1, PC2, PC3 of CN1_PC can be used as interrupt signal source. Refer level-trigger & to Sec. 2.1 for PC0/1/2/3 location. The interrupt of PIO-D144 is Active_High inverted or non-inverted . The interrupt signal can be programmable.
  • Page 8 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual Example 1: assume initial level=Low, PC0 is used as interrupt source: Initial=Low Iniaial_sub() { now_int_state=0 _outpd(wBase+0x2a,0) /*(select the non-inverted signal)*/ ISR_sub() If (now_int_state==0) /* old state=low ! change to high now */ now_int_state=1;...
  • Page 9 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual Example 2: assume initial level=High, PC0 is used as interrupt source: Initial=High Inverted=Low Iniaial_sub() { now_int_state=1 _outpd(wBase+0x2a,1) /*(select the inverted signal)*/ ISR_sub() If (now_int_state==0) /* old state=low ! change to high now */ now_int_state=1;...
  • Page 10 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual Example 3: assume CN1_PC0 is initial Low, active High, CN1_PC1 is initial High, active Low CN1_PC2 is initial Low, active High CN1_PC3 is initial High, active Low...
  • Page 11 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual void interrupt irq_service() char cc; int_num++; /* 1. Read interrupt signal status */ new_int_state=inp(wBase+0x07)&0xff; /* 2. Find the active signal int_c=new_int_state ^ now_int_state; /* 3. IF PC0 is active if ((int_c&0x01) != 0)
  • Page 12: Daughter Boards

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual Daughter Boards 2.6.1 DB-37 The DB-37 is a general purpose daughter board for D-sub 37 pins. It is designed for easy wire connection. 37-PIN cable DB-37 2.6.2...
  • Page 13 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual 2.6.4 ADP-37/PCI & ADP-50/PCI The ADP-37/PCI & ADP-50/PCI are extender for 50-pin header. One side of ADP-37/PCI & ADP-50/PCI can be connected to a 50-pin header. The other side can be mounted on the PC chassis as following: ADP-37/PCI: 50-pin header to DB-37 extender.
  • Page 14 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual 2.6.5 DB-24P, DB-24PD Isolated Input Board The DB-24P is a 24-channel isolated digital input daughter board. The optically isolated inputs of the DB-24P consists of a bi-directional optocoupler with a resistor for current sensing.
  • Page 15 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual 2.6.6 DB-24R, DB-24RD Relay Board The DB-24R, 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.
  • Page 16 PIO-D144 50-Pin cable Note: 50-Pin connector(OPTO-22 compatible), for DIO-24, DIO-48, DIO-144, PCI-D144, PIO-D144, PIO-D96, PIO-D56, PIO-D48, PIO-D24 20-Pin connector for 16 channel digital output, A-82X, A-62X, DIO-64, ISO-DA16/DA8 Channel: 16 Form A Relay , 8 Form C Relay. Relay: switching up to 5A at 110ACV / 5A at 30DCV.
  • Page 17 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual 2.6.8 Daughter Board Comparison Table 20-pin flat-cable 50-pin flat-cable D-sub 37-pin DB-37 DN-37 ADP-37/PCI ADP-50/PCI DB-24P DB-24PD DB-16P8R DB-24R DB-24RD DB-24C DB-24PR Db-24PRD DB-24POR DB-24SSR Version: 2.1...
  • Page 18: Pin Assignment

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual Pin Assignment CN1: 37-PIN of D-type female connector. Pin Number Description Pin Number Description N. C. N. C. N.C. N.C. N.C. XXXXXXX This pin not available All signals are TTL compatible.
  • Page 19 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual CN2/CN3/CN4/CN5/CN6: 50-PIN in of flat-cable connector Pin Number Description Pin Number Description Version: 2.1 Date: 1999/10 Page 19...
  • Page 20: I/O Control Register

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual I/O Control Register 3.1 How to Find the I/O Address The plug&play BIOS will assign a proper I/O address to every PIO/PISO series card in the power-on stage. The fixed IDs of PIO/PISO series card are given as following: •...
  • Page 21 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual The Sub IDs of PIO/PISO series card are given as follows: PIO/PISO series Description Sub_vendor Sub_device Sub_AUX card 144 × D/I/O PIO-D144 96 × D/I/O PIO-D96 64 ×...
  • Page 22: Pio_Driverinit

    /* for PIO_D144 */ wRetVal=PIO_DriverInit(&wBoards, wSubVendor, wSubDevice, wSubAux); printf("Threr are %d PIO-D144 Cards in this PC\n",wBoards); /* Step2: Save resource of all PIO-D144 cards installed in this PC */ for (i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i, &wBase, &wIrq, &wID1, &wID2, &wID3, &wID4, &wID5);...
  • Page 23: Pio_Getconfigaddressspace

    /* for PIO-D144 */ wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux); printf("Threr are %d PIO-D144 Cards in this PC\n",wBoards); /* Step2: Save resource of all PIO-D144 cards installed in this PC */ for (i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&t1,&t2,&t3,&t4,&t5); printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq); wConfigSpace[i][0]=wBaseAddress;...
  • Page 24: Show_Pio_Piso

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual 3.1.3 Show_PIO_PISO Show_PIO_PISO(wSubVendor, wSubDevice, wSubAux) • wSubVendor ! subVendor ID of board to find • wSubDevice ! subDevice ID of board to find • wSubAux ! subAux ID of board to find This function will show a text string for this special subIDs.
  • Page 25: The Assignment Of I/O Address

    & wSlotDevice as follows: 1. Remove all PIO-D144 from this PC 2. Install one PIO-D144 into the PC’s PCI_slot1, run PIO_PISO.EXE & record the wSlotBus1 & wSlotDevice1 3. Remove all PIO-D144 from this PC 4.
  • Page 26 4. Now all D/I value will be different from D/O value 5. Install a 50-pin flat cable into CN2 & CN3 of any PIO-D144 card 6. There will be one card’s D/I value = D/O value, the card number is also...
  • Page 27: The I/O Address Map

    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&Play BIOS will assign proper I/O address to each PIO/PISO series card very well. The I/O address of PIO-D144 are given as follows: Address Read...
  • Page 28: Aux Control Register

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual 3.3.2 AUX Control Register (Read/Write): wBase+2 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Aux7 Aux6...
  • Page 29: Aux Status Register

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual 3.3.5 Aux Status Register (Read/Write): wBase+7 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Aux7 Aux6...
  • Page 30: Read/Write 8-Bit Data Register

    Bit 1 Bit 0 Note. Refer to Sec. 3.1 for more information about wBase. There are eighteen 8-bit I/O port in the PIO-D144. Only one I/O port can be active at the same time. outp(wBase+0xc4,0); /* I/O port_0 is active now */ outp(wBase+0xc4,1);...
  • Page 31: I/O Selection Control Register

    CN1_PA=1! This port is used as a D/I port. CN1_PA=0! This port is used as a D/O port. There are eighteen 8-bit I/O port in the PIO-D144. Every I/O port can be programmed as D/I or D/O port. When the PC is first power-on, all eighteen ports are used as D/I port.
  • Page 32: Demo Program

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual Demo Program There are about 5 demo program given in the DOS floppy disk or CD- ROM. The program sources of library & demo program are all given in the disk. These demo program will help the user to solve their real world problem more easy.
  • Page 33: Pio-D144.H

    ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual PIO-D144.H /* The header file for PIO-D144 card */ #define Disable #define Enable #define D144 wBase+0x00 #define IO_SCR0 wBase+0xc8 #define IO_SCR1 wBase+0xcc #define IO_SCR2...
  • Page 34: Demo 1: Use D/Oof Cn1

    /* ----------------------------------------------------------- */ /* demo 1 : D/O demo /* step 1 : connect a DB-24C to CN1 of PIO-D144 /* step 2 : run DEMO1.EXE /* step 3 : check the LEDs of DB-24C will turn on sequentially */ /* ----------------------------------------------------------- */ #include "PIO.H"...
  • Page 35 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual outp(wBase+0xcc,0x00); /* CN3 to CN4 port are all output */ outp(wBase+0xd0,0x00); /* CN5 to CN6 port are all output */ for (;;) printf("\nCN1 : PA=0x55, PB=0xAA, PC=0x5A, press Q to stop");...
  • Page 36: Demo 2: Use D/Oof Cn1~Cn6

    /* ------------------------------------------------------------ */ /* demo 2 : D/O demo for CN1 ~ CN6 /* step 1 : connect a DB-24C to CN1 ~ CN6 of PIO-D144 /* step 2 : run DEMO2.EXE /* step 3 : check the LED's of DB-24C will turn on sequentially */ /* ------------------------------------------------------------ */ #include "PIO.H"...
  • Page 37 PIO_DriverClose(); This demo program is designed for CN1 ~ CN6. The user can install a DB-24C into CN1 ~ CN6 of PIO-D144. This demo will request the user to input a number K as following: If the DB-24C is installed in CN1 ! ! ! ! key in 0...
  • Page 38: Demo3: Interrupt Demo1

    Threr are %d PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); putch(0x07); printf("(1) There are no PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) Show the Configuration Space of all PIO-D144:"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, &wSubAux,&wSlotBus,&wSlotDevice);...
  • Page 39 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual outp(wBase+5,0); /* disable all interrupt */ PIO_DriverClose(); /* --------------------------------------------------------------- */ /* Use PC0 as external interrupt signal WORD init_low() DWORD dwVal; disable(); outp(wBase+5,0); /* disable all interrupt */ if (wIrq<8)
  • Page 40: Demo4: Interrupt Demo2

    Threr are %d PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); putch(0x07); printf("(1) There are no PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) Show the Configuration Space of all PIO-D144:"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, &wSubAux,&wSlotBus,&wSlotDevice);...
  • Page 41 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual outp(wBase+5,0); /* disable all interrupt */ PIO_DriverClose(); /* ------------------------------------------------------------ */ /* Use PC0 as external interrupt signal WORD init_high() DWORD dwVal; disable(); outp(wBase+5,0); /* disable all interrupt */ if (wIrq<8)
  • Page 42: Demo5: Interrupt Demo3

    Threr are %d PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); putch(0x07); printf("(1) There are no PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) Show the Configuration Space of all PIO-D144:"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, &wSubAux,&wSlotBus,&wSlotDevice);...
  • Page 43 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual for (;;) printf("\n(CNT_L, CNT_H) = (%d,%d) (%d,%d) (%d,%d) (%d,%d) %x", CNT_L1,CNT_H1,CNT_L2,CNT_H2,CNT_L3,CNT_H3,CNT_L4,CNT_H4, int_num); if (kbhit()!=0) {getch(); break;} outp(wBase+5,0); /* disable all interrupt */ PIO_DriverClose(); /* ------------------------------------------------------------ */...
  • Page 44: Demo 6: Outport Of Cn1-Cn6

    /* ------------------------------------------------------------ */ /* demo 6 : D/O demo /* step 1 : connect a DB-24C to CN1 of PIO-D144 /* step 2 : run DEMO6.EXE /* step 3 : check the LED's of DB-24C will turn on sequentially */ /* ------------------------------------------------------------ */ #include "PIO.H"...
  • Page 45 /* for PIO-D144 */ printf("\n(1) Threr are %d PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); putch(0x07); printf("(1) There are no PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) The Configuration Space -> wBase"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, &wSubAux,&wSlotBus,&wSlotDevice);...
  • Page 46 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual printf("\n"); for(i=1;i<=0x80;i=i<<1) printf("\nCN4: PA=%02xH, PB=%02xH, PC=%02xH, press Q to stop",i,i,i); outp(Act_IOPCR,CN4_PA); outp(RW_8BitDR,i); outp(Act_IOPCR,CN4_PB); outp(RW_8BitDR,i); outp(Act_IOPCR,CN4_PC); outp(RW_8BitDR,i); sleep(1); outp(IO_SCR2,0x00); printf("\n"); for(i=1;i<=0x80;i=i<<1) { printf("\nCN5: PA=%02xH, PB=%02xH, PC=%02xH, press Q to stop",i,i,i);...
  • Page 47: Demo10: Find Card Number

    /* for PIO-D144 */ printf("\n(1) Threr are %d PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); putch(0x07); printf("(1) There are no PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) The Configuration Space -> wBase"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, &wSubAux,&wSlotBus,&wSlotDevice);...
  • Page 48 ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PIO-D144 User’s Manual ok=1; outp(wBase+0xc8,0x00); /* CN2_PA is output */ outp(wBase+0xcc,0x01); /* CN3_PA is input outp(wBase+0xc4,3); /* select CN2_PA outp(wBase+0xc0,0x55); /* CN2_PA=0x55 outp(wBase+0xc4,6); /* select CN2_PA val=inp(wBase+0xc0)&0xff; /* read CN3_PA if (val != 0x55) ok=0;...

Table of Contents