background image

Appendix C

OKI 82C55A Data Sheet

PC

-DIO-24 User Manual

  

C-16

  

©

 National Instruments Corporation

Содержание PC-DIO-24

Страница 1: ...Copyright 1989 1995 National Instruments Corporation All Rights Reserved PC DIO 24 User Manual Digital I O Board for the IBM PC XT AT September 1995 Edition Part Number 320288B 01...

Страница 2: ...0 Belgium 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 J...

Страница 3: ...e for 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...

Страница 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...

Страница 5: ...ference from the equipment to radio reception in commercial areas Operation of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to c...

Страница 6: ...Equipment 1 4 Custom Cables 1 4 Unpacking 1 6 Chapter 2 Configuration and Installation 2 1 Board Configuration 2 1 Base I O Address Settings 2 2 Interrupt Selection 2 4 Interrupt Enable Settings 2 4 I...

Страница 7: ...Programming Considerations 4 5 Mode 0 Basic I O 4 5 Mode 0 Programming Example 4 6 Mode 1 Strobed Input 4 7 Mode 1 Input Programming Example 4 9 Mode 1 Strobed Output 4 9 Mode 1 Output Programming Exa...

Страница 8: ...for IRQ5 Factory Setting 2 4 Figure 2 5 Digital I O Connector Pin Assignments 2 6 Figure 3 1 PC DIO 24 Block Diagram 3 1 Figure 4 1 Control Word Formats 4 4 Figure B 1 PC DIO 24 I O Connector B 1 Tab...

Страница 9: ...he PC DIO 24 Chapter 2 Configuration and Installation describes how to configure and install the PC DIO 24 including I O connector signal descriptions handshake timing diagrams and cabling instruction...

Страница 10: ...s to the NI DAQ software for PC compatibles unless otherwise noted PC PC refers to the IBM PC XT the IBM PC AT and compatible computers unless otherwise noted SCXI SCXI stands for Signal Conditioning...

Страница 11: ...ge and complicated system it is worthwhile to look through the software manuals before you configure your hardware Accessory installation guides or manuals If you are using accessory products read the...

Страница 12: ...l digital I O applications The PC DIO 24 can be used in a wide range of digital I O applications With the PC DIO 24 a PC can be interfaced to any of the following Other computers Another PC with a Nat...

Страница 13: ...ges for data acquisition and control applications LabVIEW uses graphical programming whereas LabWindows CVI enhances traditional programming languages Both packages include extensive libraries for dat...

Страница 14: ...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...

Страница 15: ...amplifying exciting and multiplexing signals for relays and analog output With SCXI you can condition and acquire up to 3 072 channels Low channel count signal conditioning modules boards and accessor...

Страница 16: ...Consult the specification for the rack you intend to use for the location of any polarizing key The recommended manufacturer part numbers for this polarizing key are as follows Electronic Products Di...

Страница 17: ...ling the board take the following precautions Ground yourself via a grounding strap or by holding a grounded object Touch the antistatic package to a metal part of your PC chassis before removing the...

Страница 18: ...e I O address of hex 210 to use interrupt enable line PC4 and to use interrupt level 5 These settings shown in Table 2 1 are suitable for most systems However if your system has other hardware at this...

Страница 19: ...address space hex 210 through 213 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 c...

Страница 20: ...he switch to select a binary value of 0 for the corresponding address bit Figure 2 2 shows two possible switch settings The black side indicates the side that is pushed down O F F 1 2 3 4 5 6 7 8 O N...

Страница 21: ...the PC DIO 24 are disabled Figure 2 3 shows the possible jumper settings for W1 The board is shipped with this jumper set to PC4 therefore interrupt requests from the board are enabled and controlled...

Страница 22: ...r Communication You are now ready to install the PC DIO 24 The following are general installation instructions but consult the user manual or technical reference manual of your personal computer for s...

Страница 23: ...e PC Maximum ratings for each signal are given in this chapter under the discussion of that signal National Instruments is not liable for any damages resulting from any such signal connections 1 2 3 4...

Страница 24: ...The absolute maximum voltage input rating is 0 5 to 5 5 V with respect to GND Port C Pin Assignments The signals assigned to port C depend on the mode in which the 82C55A is programmed In mode 0 port...

Страница 25: ...put Acknowledge Input A low signal on this handshaking line indicates that the data written from the selected port has been accepted This signal is a response from the external device that it has rece...

Страница 26: ...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...

Страница 27: ...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...

Страница 28: ...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...

Страница 29: ...3 1 illustrates the key functional components of the PC DIO 24 board I O Connector Interrupt Control Circuitry 82C55A PPI PC I O Channel Control Circuitry Address Decoder Bus Transceivers PA PB PC 8 8...

Страница 30: ...ght 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 transfers Refer to Chapter 4 Register Level Programming or to Append...

Страница 31: ...ng with program examples written in C Note If you plan to use a programming software package such as LabWindows CVI or NI DAQ with your PC DIO 24 board you need not read this chapter Introduction The...

Страница 32: ...t port A or port B and one 4 bit control data port upper or lower nibble of port C The 8 bit data ports can be either input or output both of which are latched The 4 bit ports are used for control and...

Страница 33: ...e A number preceded by 0x is a hexadecimal number Register Descriptions Figure 4 1 shows the two control word formats used to completely program the 82C55A The Control Word Flag determines which contr...

Страница 34: ...C 0 mode 0 1 mode 1 Mode Selection Group A Group B Port B 1 input 0 output Flag D2 D1 D0 X X D3 D7 X 0 bit set reset 1 set 0 reset 000 001 010 111 Control Word Bit Select Bit Set Reset a Mode Set Wor...

Страница 35: ...xnxx 3 0xxx0111 0xxx0110 xxxxnxxx 4 0xxx1001 0xxx1000 xxxnxxxx 5 0xxx1011 0xxx1010 xxnxxxxx 6 0xxx1101 0xxx1100 xnxxxxxx 7 0xxx1111 0xxx1110 nxxxxxxx Programming Considerations Mode 0 Basic I O Mode 0...

Страница 36: ...Input 10 10010010 Input Output Input Output 11 10010011 Input Output Input Input 12 10011000 Input Input Output Output 13 10011001 Input Input Output Input 14 10011010 Input Input Input Output 15 1001...

Страница 37: ...digital I O bits are divided into two groups group A and group B Each of these groups contains one 8 bit port and one 4 bit control data port The 8 bit port can be either an input or an output and th...

Страница 38: ...it for Port A Enables interrupts from the 82C55A for port A Controlled by bit set reset of PC4 3 INTRA Interrupt Request Status for Port A When INTEA is high and IBFA is high this bit is high indicati...

Страница 39: ...portc BASE_ADDRESS PORTCoffset cnfg BASE_ADDRESS CNFGoffset EXAMPLE 1 port A input outp cnfg 0xB0 Port A is an input in mode 1 while inp portc 0x20 Wait until IBFA is set indicating that data has been...

Страница 40: ...t Name Description 7 OBFA Output Buffer Full for Port A Low indicates that the CPU has written data to port A 6 INTEA Interrupt Enable Bit for Port A If this bit is high interrupts are enabled from th...

Страница 41: ...ffset 0x02 Offset for port C define CNFGoffset 0x03 Offset for CNFG register unsigned int porta portb portc cnfg char valread Variable to store data read from a port Calculate register addresses porta...

Страница 42: ...X X X 1 0 1 0 1 0 7 6 5 4 3 2 1 0 1 input 0 output 1 input 0 output 0 mode 0 1 mode 1 Port C bits PC2 PC1 PC0 Port B direction Group B Mode During a mode 2 data transfer the status of the handshaking...

Страница 43: ...utput Extra I O status lines available if port B is not configured for mode 1 At the digital I O connector port C has the following pin assignments when in mode 2 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 OBFA...

Страница 44: ...ine BASE_ADDRESS 0x210 Board located at address 210 define PORTAoffset 0x00 Offset for port A define PORTBoffset 0x01 Offset for port B define PORTCoffset 0x02 Offset for port C define CNFGoffset 0x03...

Страница 45: ...nable bit outp cnfg 0xC0 mode 2 output outp cnfg 0x0D Set PC6 to enable interrupts from 82C55A outp cnfg 0x04 Clear PC2 to enable interrupts EXAMPLE 6 Set up interrupts for mode 2 input transfers Sele...

Страница 46: ...PC4 If port A is in mode 1 output PC2 If port A is in mode 2 port B is not in mode 1 To enable interrupts from the PC DIO 24 select PC2 PC4 or PC6 as the active low interrupt enable signal Initially s...

Страница 47: ...port Power on state Configured as inputs Data transfers Interrupts programmed I O Digital Logic Levels Input Signals Odd numbered pins 1 47 Level Min Max Input logic high voltage 2 2 V 5 3 V Input lo...

Страница 48: ...s compiled using version 8 00 of the Microsoft Optimizing C Compiler Table A 1 Maximum Average Transfer Rates for the PC DIO 24 Bus CPU CPU Speed Assembly C AT ISA16 486DX4 100 MHz 410 kbytes s 330 kb...

Страница 49: ...10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND...

Страница 50: ...the manufacturer data sheet for the OKI Semiconductor 82C55A CMOS programmable peripheral interface PPI This interface is used on the DAQCard DIO 24 Copyright OKI Semiconductor 1993 Reprinted with per...

Страница 51: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 2 National Instruments Corporation...

Страница 52: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 3 PC DIO 24 User Manual...

Страница 53: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 4 National Instruments Corporation...

Страница 54: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 5 PC DIO 24 User Manual...

Страница 55: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 6 National Instruments Corporation...

Страница 56: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 7 PC DIO 24 User Manual...

Страница 57: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 8 National Instruments Corporation...

Страница 58: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 9 PC DIO 24 User Manual...

Страница 59: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 10 National Instruments Corporation...

Страница 60: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 11 PC DIO 24 User Manual...

Страница 61: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 12 National Instruments Corporation...

Страница 62: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 13 PC DIO 24 User Manual...

Страница 63: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 14 National Instruments Corporation...

Страница 64: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 15 PC DIO 24 User Manual...

Страница 65: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 16 National Instruments Corporation...

Страница 66: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 17 PC DIO 24 User Manual...

Страница 67: ...rest 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...

Страница 68: ...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...

Страница 69: ...y Setting 5 _________________________________________________ Handshaking Mode mode 0 mode 1 mode 2 _________________________________________________ NI DAQ or LabWindows CVI Version _________________...

Страница 70: ...dition Date September 1995 Part Number 320288B 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...

Страница 71: ...A amperes AWG American Wire Gauge BCD binary coded decimal C Celsius DMA direct memory access hex hexadecimal Hz hertz in inches Iin input current Iout output current kbytes 1 024 bytes LSB least sign...

Страница 72: ...table 2 1 interrupt enable settings 2 4 interrupt level settings 2 4 to 2 5 parts locator diagram 2 2 control words control word formats figure 4 4 mode 1 strobed input figure 4 7 mode 1 strobed outp...

Страница 73: ...ector 3 2 pin description figure 2 6 B 1 J jumper and switch settings 2 1 to 2 5 base I O address settings 2 1 to 2 3 factory settings table 2 1 interrupt enable settings 2 4 interrupt handling 4 15 t...

Страница 74: ...NI DAQ driver software 1 3 register level programming 1 4 theory of operation 3 1 to 3 2 unpacking 1 6 physical specifications A 2 Port C pin assignments description 2 7 mode 1 input figure 4 8 mode...

Страница 75: ...OKI 82C55A Programmable Peripheral Interface 4 2 Port C set reset control words table 4 5 software programming choices 1 2 to 1 4 See also register level programming LabVIEW and LabWindows CVI applica...

Отзывы: