National Instruments PC-DIO-96 User Manual Download Page 1

© Copyright 1990, 1995 National Instruments Corporation.

All Rights Reserved.

PC-DIO-96

User Manual

Digital I/O Board for the IBM PC/XT/AT

September 1995 Edition

Part Number 320289B-01

Summary of Contents for PC-DIO-96

Page 1: ...Copyright 1990 1995 National Instruments Corporation All Rights Reserved PC DIO 96 User Manual Digital I O Board for the IBM PC XT AT September 1995 Edition Part Number 320289B 01...

Page 2: ...elgium 02 757 00 20 Canada Ontario 519 622 9310 Canada Qu bec 514 694 8521 Denmark 45 76 26 00 Finland 90 527 2321 France 1 48 14 24 24 Germany 089 741 31 30 Hong Kong 2645 3186 Italy 02 48301892 Japa...

Page 3: ...any damages arising out of or related to this document or the information contained in it EXCEPT AS SPECIFIED HEREIN NATIONAL INSTRUMENTS MAKES NO WARRANTIES EXPRESS OR IMPLIED AND SPECIFICALLY DISCL...

Page 4: ...or application designer Any use or application of National Instruments products for or involving medical or clinical treatment must be performed by properly trained and qualified medical personnel an...

Page 5: ...ter 2 Configuration and Installation 2 1 Board Configuration 2 1 Base I O Address Settings 2 2 Interrupt Level Selection 2 5 Installation 2 5 Signal Connections 2 6 I O Connector Pin Description 2 7 I...

Page 6: ...ode 1 4 9 Mode 2 4 10 Single Bit Set Reset Feature 4 10 Mode 0 Basic I O 4 10 Mode 0 Programming Example 4 11 Mode 1 Strobed Input 4 12 Mode 1 Input Programming Example 4 14 Mode 1 Strobed Output 4 15...

Page 7: ...gh 50 2 10 Figure 2 6 Cable Assembly Connector Pinout for Pins 51 through 100 2 11 Figure 2 7 Digital I O Connections 2 13 Figure 3 1 PC DIO 96 Block Diagram 3 1 Figure 4 1 Control Word Formats for th...

Page 8: ...ter 2 Configuration and Installation 2 1 Board Configuration 2 1 Base I O Address Settings 2 2 Interrupt Level Selection 2 5 Installation 2 5 Signal Connections 2 6 I O Connector Pin Description 2 7 I...

Page 9: ...ode 1 4 9 Mode 2 4 10 Single Bit Set Reset Feature 4 10 Mode 0 Basic I O 4 10 Mode 0 Programming Example 4 11 Mode 1 Strobed Input 4 12 Mode 1 Input Programming Example 4 14 Mode 1 Strobed Output 4 15...

Page 10: ...gh 50 2 10 Figure 2 6 Cable Assembly Connector Pinout for Pins 51 through 100 2 11 Figure 2 7 Digital I O Connections 2 13 Figure 3 1 PC DIO 96 Block Diagram 3 1 Figure 4 1 Control Word Formats for th...

Page 11: ...follows Chapter 1 Introduction describes the PC DIO 96 lists what you need to get started describes software programming choices optional equipment and custom cables and explains how to unpack the PC...

Page 12: ...ves paths directories programs subprograms subroutines device names functions variables filenames and extensions and for statements and comments taken from program code NI DAQ NI DAQ is used throughou...

Page 13: ...ets and the NI DAQ manuals a 4 6 1 or earlier version of NI DAQ supports LabWindows for DOS After you set up your hardware system use either the application software LabVIEW or LabWindows CVI manuals...

Page 14: ...ional Instruments PC DIO 96 PC DIO 24 or AT DIO 32F IBM Personal System 2 with a National Instruments MC DIO 24 or MC DIO 32F Macintosh II with a National Instruments NB DIO 24 or NB DIO 32F Any other...

Page 15: ...traditional programming languages Both packages include extensive libraries for data acquisition instrument control data analysis and graphical data presentation LabVIEW features interactive graphics...

Page 16: ...level functions are streaming data to disk or acquiring a certain number of data points An example of a low level function is writing directly to registers on the DAQ device NI DAQ does not sacrifice...

Page 17: ...p to 3 072 channels Low channel count signal conditioning modules boards and accessories including conditioning for strain gauges and RTDs simultaneous sample and hole and relays For more specific inf...

Page 18: ...is as follows Robinson Nugent part number P50E 100S TG The recommended manufacturer part numbers for 50 pin female ribbon socket connectors suitable for use with the preceding connector are Electronic...

Page 19: ...at the factory to a base I O address of hex 180 and to interrupt level 5 These settings shown in Table 2 1 are suitable for most systems However if your system has other hardware at this base I O add...

Page 20: ...80 through 19F Note Verify that this space is not already used by other equipment installed in your computer If any equipment in your computer uses this I O address space you must change the base I O...

Page 21: ...inary value of 0 for the corresponding address bit Figure 2 2 shows two possible switch settings The black side indicates the side of the switch that is pushed down 1 2 3 4 5 A9 A8 A7 A6 A5 U26 O N O...

Page 22: ...11F 0 1 0 0 1 120 120 13F 0 1 0 1 0 140 140 15F 0 1 0 1 1 160 160 17F 0 1 1 0 0 180 180 19F 0 1 1 0 1 1A0 1A0 1BF 0 1 1 1 0 1C0 1C0 1DF 0 1 1 1 1 1E0 1E0 1FF 1 0 0 0 0 200 200 21F 1 0 0 0 1 220 220 2...

Page 23: ...s with other devices because it uses a tri state driver to drive its selected interrupt line For information on how to disable this driver see Chapter 4 Register Level Programming Installation The PC...

Page 24: ...have an EISA class computer you need to update the computer s resource allocation or configuration table by reconfiguring your computer See your computer s user manual for information about updating t...

Page 25: ...5 14 64 13 63 12 62 11 61 10 60 9 59 8 58 7 57 6 56 5 55 4 54 3 53 2 52 1 51 GND GND 5 V 5 V BPA0 DPA0 APA0 CPA0 BPA1 DPA1 APA1 CPA1 BPA2 DPA2 APA2 CPA2 BPA3 DPA3 APA3 CPA3 BPA4 DPA4 APA4 CPA4 BPA5 DP...

Page 26: ...89 91 93 95 97 CPA 7 0 Bidirectional Data Lines for Port A of PPI C CPA7 is the MSB CPA0 the LSB 52 54 56 58 60 62 64 66 DPC 7 0 Bidirectional Data Lines for Port C of PPI D DPC7 is the MSB DPC0 the...

Page 27: ...l is active low Cable Assembly Connectors The cable assembly listed under Optional Equipment in Chapter 1 is an assembly of two 50 pin cables and three connectors Both cables are joined to a single co...

Page 28: ...1 APC2 APC3 APC4 APC5 APC6 APC7 GND BPA1 BPA2 BPA4 BPA5 BPA6 BPA7 BPA0 BPA3 BPB0 BPB1 BPB2 BPB3 BPB4 BPB5 BPB6 BPB7 BPC0 BPC1 BPC2 BPC3 BPC4 BPC5 BPC6 BPC7 49 50 47 48 45 46 43 44 41 42 39 40 37 38 35...

Page 29: ...CPC2 CPC3 CPC4 CPC5 CPC6 CPC7 GND DPA1 DPA2 DPA4 DPA5 DPA6 DPA7 DPA0 DPA3 DPB0 DPB1 DPB2 DPB3 DPB4 DPB5 DPB6 DPB7 DPC0 DPC1 DPC2 DPC3 DPC4 DPC5 DPC6 DPC7 49 50 47 48 45 46 43 44 41 42 39 40 37 38 35...

Page 30: ...gital input specifications referenced to GND Input logic high voltage 2 2 V minimum 5 3 V maximum Input logic low voltage 0 3 V minimum 0 8 V maximum Maximum input current 0 Vin 5 V 1 0 A minimum 1 0...

Page 31: ...2 7 Digital output applications include sending TTL signals and driving external devices such as the LED shown in Figure 2 7 Power Connections Pins 49 and 99 of the I O connector are connected to the...

Page 32: ...data written to the port has been accepted This signal is a response from the external device indicating that it has received the data from the PC DIO 96 OBF Output Output Buffer Full A low signal on...

Page 33: ...illustrates the timing specifications for an input transfer in mode 1 T3 T5 T6 T7 T4 T1 T2 STB IBF INTR RD DATA Name Description Minimum Maximum T1 STB pulse width 100 T2 STB 0 to IBF 1 150 T3 Data b...

Page 34: ...llowing figure illustrates the timing specifications for an output transfer in mode 1 T2 T3 WR OBF INTR DATA T4 T6 T5 ACK T1 Name Description Minimum Maximum T1 WR 0 to INTR 0 250 T2 WR 1 to output 20...

Page 35: ...ectional transfers in mode 2 T2 T1 WR OBF INTR ACK DATA T6 T7 T3 T4 T10 STB T9 T8 T5 IBF RD Name Description Minimum Maximum T1 WR 1 to OBF 0 150 T2 Data before STB 1 20 T3 STB pulse width 100 T4 STB...

Page 36: ...ional components of the PC DIO 96 board 8 21 6 5 VDC 8 8 8 8 8 8 8 8 8 8 8 8 Data Transceiver PC I O Channel Control Interrupt Control Circuitry Port A Port B Port C I O Connector PC I O Channel OKI 8...

Page 37: ...ts are divided into two groups group A and group B Each group has eight data bits and four control and status bits from port C PC Modes 1 and 2 use handshaking signals from port C to synchronize data...

Page 38: ...to Chapter 4 Register Level Programming Appendix B OKI 82C55A Data Sheet or Appendix C AMD 8253 Data Sheet for more detailed information Digital I O Connector All digital I O is transmitted through a...

Page 39: ...lects the mode of operation for each group The group A control bits configure port A A7 through A0 and the upper 4 bits nibble of port C C7 through C4 The group B control bits configure port B B7 thro...

Page 40: ...er 05 8 bit Read and write PORTC Register 06 8 bit Read and write CNFG Register 07 8 bit Write only PPI C PORTA Register 08 8 bit Read and write PORTB Register 09 8 bit Read and write PORTC Register 0...

Page 41: ...ugh 0 select the I O characteristics of the 82C55A ports These bits also select the mode in which the ports are operating that is mode 0 mode 1 or mode 2 When the control word flag is 0 bits 3 through...

Page 42: ...0xxx1000 xxxbxxxx 5 0xxx1011 0xxx1010 xxbxxxxx 6 0xxx1101 0xxx1100 xbxxxxxx 7 0xxx1111 0xxx1110 bxxxxxxx Register Description for the 8253 Figure 4 2 shows the control word format used to completely p...

Page 43: ...rs on the PC DIO 96 One of these registers has individual enable bits for the two interrupt lines from each of the 82C55A devices The other register has a master interrupt enable bit and two bits for...

Page 44: ...rrupt Control Register 2 are both set PPI C sends an interrupt INTRB to the host computer If this bit is cleared PPI C does not send the interrupt INTRB to the host computer regardless of the setting...

Page 45: ...ends an interrupt INTRB to the host computer If this bit is cleared PPI A does not send the interrupt INTRB to the host computer regardless of the setting of INTEN 0 AIRQ0 PPI A Interrupt Request for...

Page 46: ...r W1 1 CTRIRQ Counter Interrupt Enable Bit If this bit is set the 8253 counter outputs can interrupt the host computer If this bit is cleared the counter outputs have no effect 0 CTR1 Counter 1 Enable...

Page 47: ...r read from a specified port Mode 0 has the following features Two 8 bit ports A and B and two 4 bit ports upper and lower nibbles of port C Any port can be input or output Outputs are latched but inp...

Page 48: ...atus port port C Latched inputs and outputs Interrupt generation and enable disable functions Single Bit Set Reset Feature Any of the eight bits of port C can be set or reset with one control word Thi...

Page 49: ...1 Input Output Input Input 12 10011000 Input Input Output Output 13 10011001 Input Input Output Input 14 10011010 Input Input Input Output 15 10011011 Input Input Input Input 1 Upper nibble of port C...

Page 50: ...utp cnfg 0x82 Ports A and C are outputs port B is an input EXAMPLE 4 outp cnfg 0x89 Ports A and B are outputs port C is an input Mode 1 Strobed Input In mode 1 the digital I O bits are divided into tw...

Page 51: ...A is in mode 1 input If these bits are configured for output the port C bit set reset function must be used to manipulate them 5 IBFA Input Buffer for Port A A high setting indicates that data has bee...

Page 52: ...ard located at address 180 define APORTAoffset 0x00 Offset for PPI A port A define APORTBoffset 0x01 Offset for PPI A port B define APORTCoffset 0x02 Offset for PPI A port C define ACNFGoffset 0x03 Of...

Page 53: ...errupt signals can be obtained by reading port C Notice that the bit definitions are different for a write and a read transfer Port C status word bit definitions for output port A and port B D7 D6 D5...

Page 54: ...included when port C is read PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 OBFA ACKA I O I O INTRA ACKB OBFB INTRB Group A Group B Mode 1 Output Programming Example The following example shows how to configure PPI...

Page 55: ...without changing the configuration The data transfers are synchronized with handshaking lines in port C This mode uses only port A however port B can be used in either mode 0 or mode 1 while port A i...

Page 56: ...for Port A If INTE1 and IBFA are high then this bit is high indicating that an interrupt request is pending for port A input transfers If INTE2 and OBFA are high then this bit is high indicating that...

Page 57: ...inp portc 0x20 Wait until IBFA is set indicating that data is available in port A to be read valread inp porta Read data from port A Interrupt Programming Examples for the 82C55A The following example...

Page 58: ...REG2offset EXAMPLE 1 Set up interrupts for mode 1 input for port A Enable the appropriate interrupt bits outp cnfg 0xB0 Port A is an input in mode 1 outp cnfg 0x09 Set PC4 to enable interrupts from 82...

Page 59: ...his section also includes an indepth example of handling interrupts generated by the 8253 General Information The 8253 contains three counter timers each of which can operate in one of six different m...

Page 60: ...msec define ctr1_data 1000 Pulse every 5 sec unsigned int ctr0 ctr1 cnfg ireg1 ireg2 Calculate register addresses ctr0 BASE_ADDRESS CTR0offset ctr1 BASE_ADDRESS CTR1offset cnfg BASE_ADDRESS CTRCNFGoff...

Page 61: ...pt service routine before exiting your program do this now remove_isr Sample code for the functions install_isr and remove_isr is presented as follows Be sure to pass a 32 bit structure pointer to the...

Page 62: ...DATA declarations ackm equ 00020h acks equ 000a0h eoi equ 00020h maskm equ 00021h masks equ 000a1h int_addr dd 0 int_mask dw 0 isrb_addr dd 0 slave_ack db 0 vect_num db 0 _DATA ends _TEXT segment word...

Page 63: ...ndler je short ii_exit Vector already installed exit ii_0 mov vect_num al Save vector number for remove_isr mov word ptr int_addr 0 bx Save the address mov word ptr int_addr 2 es push ds Save the data...

Page 64: ...ax seg _DATA mov ds ax see if our vector is installed if not do not remove the vector cmp vect_num 0 See if vect_num was ever set jz short ri_exit Our vector never installed exit mov al vect_num Get v...

Page 65: ...or data transfer mov al vect_num al holds interrupt level mov ah 25h lds dx int_addr ds dx points to new handler int 21h Install the old vector restore saved registers ri_exit pop es pop ds pop dx pop...

Page 66: ...output for port A After interrupts have been enabled from the 82C55A set the appropriate enable bit for the selected 82C55A for example if you selected both mode 2 interrupts for PPI C you would set...

Page 67: ...V Input logic low voltage 0 3 V 0 8 V Input current 0 Vin 5 V 1 0 A 1 0 A Output Signals Pin 49 at 5 V 0 5 A max Pin 99 at 5 V 0 5 A max Note The total combined current output from pins 49 and 99 may...

Page 68: ...100 pin male ribbon cable connector Power Requirement from PC I O Channel Typ power 0 38 A at 5 VDC 5 Max power 0 8 A at 5 VDC 5 Note These power usage figures do not include the power used by externa...

Page 69: ...ISA16 486DX4 100 MHz 490 kbytes s 470 kbytes s Assembly language code mov cx 64 Count out 64 transfers mov dx 0180h The port to access loop lodsb Assume ds si points to buffer of data out dx al Send t...

Page 70: ...he manufacturer data sheet for the OKI 82C55A OKI Semiconductor CMOS programmable peripheral interface This interface is used on the PC DIO 96 board Copyright OKI Semiconductor 1993 Reprinted with per...

Page 71: ...OKI 82C55A Data Sheet Appendix B PC DIO 96 User Manual B 2 National Instruments Corporation...

Page 72: ...Appendix B OKI 82C55A Data Sheet National Instruments Corporation B 3 PC DIO 96 User Manual...

Page 73: ...OKI 82C55A Data Sheet Appendix B PC DIO 96 User Manual B 4 National Instruments Corporation...

Page 74: ...Appendix B OKI 82C55A Data Sheet National Instruments Corporation B 5 PC DIO 96 User Manual...

Page 75: ...OKI 82C55A Data Sheet Appendix B PC DIO 96 User Manual B 6 National Instruments Corporation...

Page 76: ...Appendix B OKI 82C55A Data Sheet National Instruments Corporation B 7 PC DIO 96 User Manual...

Page 77: ...OKI 82C55A Data Sheet Appendix B PC DIO 96 User Manual B 8 National Instruments Corporation...

Page 78: ...Appendix B OKI 82C55A Data Sheet National Instruments Corporation B 9 PC DIO 96 User Manual...

Page 79: ...OKI 82C55A Data Sheet Appendix B PC DIO 96 User Manual B 10 National Instruments Corporation...

Page 80: ...Appendix B OKI 82C55A Data Sheet National Instruments Corporation B 11 PC DIO 96 User Manual...

Page 81: ...OKI 82C55A Data Sheet Appendix B PC DIO 96 User Manual B 12 National Instruments Corporation...

Page 82: ...Appendix B OKI 82C55A Data Sheet National Instruments Corporation B 13 PC DIO 96 User Manual...

Page 83: ...OKI 82C55A Data Sheet Appendix B PC DIO 96 User Manual B 14 National Instruments Corporation...

Page 84: ...Appendix B OKI 82C55A Data Sheet National Instruments Corporation B 15 PC DIO 96 User Manual...

Page 85: ...OKI 82C55A Data Sheet Appendix B PC DIO 96 User Manual B 16 National Instruments Corporation...

Page 86: ...Appendix B OKI 82C55A Data Sheet National Instruments Corporation B 17 PC DIO 96 User Manual...

Page 87: ...e manufacturer data sheet for the AMD 8253 integrated circuit Advanced Micro Devices Inc This circuit is used on the PC DIO 96 board Copyright Advanced Micro Devices Inc 1987 Reprinted with permission...

Page 88: ...AMD 8253 Data Sheet Appendix C PC DIO 96 User Manual C 2 National Instruments Corporation...

Page 89: ...Appendix C AMD 8253 Data Sheet National Instruments Corporation C 3 PC DIO 96 User Manual...

Page 90: ...AMD 8253 Data Sheet Appendix C PC DIO 96 User Manual C 4 National Instruments Corporation...

Page 91: ...Appendix C AMD 8253 Data Sheet National Instruments Corporation C 5 PC DIO 96 User Manual...

Page 92: ...AMD 8253 Data Sheet Appendix C PC DIO 96 User Manual C 6 National Instruments Corporation...

Page 93: ...Appendix C AMD 8253 Data Sheet National Instruments Corporation C 7 PC DIO 96 User Manual...

Page 94: ...AMD 8253 Data Sheet Appendix C PC DIO 96 User Manual C 8 National Instruments Corporation...

Page 95: ...Appendix C AMD 8253 Data Sheet National Instruments Corporation C 9 PC DIO 96 User Manual...

Page 96: ...AMD 8253 Data Sheet Appendix C PC DIO 96 User Manual C 10 National Instruments Corporation...

Page 97: ...Appendix C AMD 8253 Data Sheet National Instruments Corporation C 11 PC DIO 96 User Manual...

Page 98: ...AMD 8253 Data Sheet Appendix C PC DIO 96 User Manual C 12 National Instruments Corporation...

Page 99: ...Appendix C AMD 8253 Data Sheet National Instruments Corporation C 13 PC DIO 96 User Manual...

Page 100: ...AMD 8253 Data Sheet Appendix C PC DIO 96 User Manual C 14 National Instruments Corporation...

Page 101: ...est branch office You may fax questions to us at any time Corporate Headquarters 512 795 8248 Technical support fax 800 328 2203 512 794 5678 Branch Offices Phone Number Fax Number Australia 03 9 879...

Page 102: ...iciently If you are using any National Instruments hardware or software products related to this problem include the configuration forms from their user manuals Include additional pages if necessary N...

Page 103: ..._____________________ NI DAQ Version _________________________________________________ Windows Version _________________________________________________ Windows Mode __________________________________...

Page 104: ...dition Date September 1995 Part Number 320289B 01 Please comment on the completeness clarity and organization of the manual If you find errors in the manual please record the page numbers and describe...

Page 105: ...ecimal C Celsius DMA direct memory access EISA Extended Industry Standard Architecture hex hexadecimal Hz hertz in inches Iout output current ISA Industry Standard Architecture kbytes 1 024 bytes LSB...

Reviews: