National Instruments PC-DIO-24 User Manual - Chapter 1

Manual is about: Digital I/O Board for the IBM PC/XT/AT

Summary of PC-DIO-24

  • Page 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.

  • Page 2

    National instruments corporate headquarters 6504 bridge point parkway austin, tx 78730-5039 (512) 794-0100 technical support fax: (800) 328-2203 (512) 794-5678 branch offices: australia 03 9 879 9422, austria 0662 45 79 90 0, belgium 02 757 00 20, canada (ontario) 519 622 9310, canada (québec) 514 6...

  • Page 3

    Limited warranty the pc-dio-24 is warranted against defects in materials and workmanship for a period of one year from the date of shipment, as evidenced by receipts or other documentation. National instruments will, at its option, repair or replace equipment that proves to be defective during the w...

  • Page 4

    Warning regarding medical and clinical use of national instruments products national instruments products are not designed with components and testing intended to ensure a level of reliability suitable for use in treatment and diagnosis of humans. Applications of national instruments products involv...

  • Page 5

    Fcc/doc radio frequency interference compliance this equipment generates and uses radio frequency energy and, if not installed and used in strict accordance with the instructions in this manual, may cause interference to radio and television reception. This equipment has been tested and found to com...

  • Page 6: Contents

    © national instruments corporation vii pc-dio-24 user manual contents about this manual ............................................................................................................. Xi organization of this manual ..........................................................................

  • Page 7

    Contents pc-dio-24 user manual viii © national instruments corporation chapter 4 register-level programming ......................................................................................... 4-1 introduction ........................................................................................

  • Page 8

    Contents © national instruments corporation ix pc-dio-24 user manual figures figure 1-1. The relationship between the programming environment, ni-daq, and your hardware................................................................................................... 1-3 figure 2-1. Pc-dio-24 parts ...

  • Page 9: About This Manual

    © national instruments corporation xi pc-dio-24 user manual about this manual this manual describes the mechanical and electrical aspects of the pc-dio-24 and contains information concerning its operation and programming. The pc-dio-24 is a 24-bit parallel, digital i/o interface designed around an 8...

  • Page 10

    About this manual pc-dio-24 user manual xii © national instruments corporation • the index alphabetically lists the topics in this manual, including the page where you can find each one. Conventions used in this manual the following conventions are used in this manual. Bold bold text denotes menus, ...

  • Page 11: Related Documentation

    About this manual © national instruments corporation xiii pc-dio-24 user manual • your scxi hardware user manuals—if you are using scxi, read these manuals next for detailed information about signal connections and module configuration. They also explain in greater detail how the module works and co...

  • Page 12: Chapter 1

    © national instruments corporation 1-1 pc-dio-24 user manual chapter 1 introduction this chapter describes the pc-dio-24, lists what you need to get started, describes software programming choices, optional equipment, and custom cables, and explains how to unpack the pc-dio-24. About the pc-dio-24 t...

  • Page 13: What You Need to Get Started

    Introduction chapter 1 pc-dio-24 user manual 1-2 © national instruments corporation with the pc-dio-24, the pc can serve as a digital i/o system controller for laboratory testing, production testing, and industrial process monitoring and control. Detailed specifications of the pc-dio-24 are in appen...

  • Page 14

    Chapter 1 introduction © national instruments corporation 1-3 pc-dio-24 user manual ni-daq driver software the ni-daq driver software is included at no charge with all national instruments daq hardware. Ni-daq is not packaged with scxi or accessory products, except for the scxi-1200. Ni-daq has an e...

  • Page 15: Optional Equipment

    Introduction chapter 1 pc-dio-24 user manual 1-4 © national instruments corporation register-level programming the final option for programming any national instruments daq hardware is to write register- level software. Writing register-level programming software can be very time-consuming and ineff...

  • Page 16

    Chapter 1 introduction © national instruments corporation 1-5 pc-dio-24 user manual • electronic products division/3m (part number 3425-7650) • t&b/ansley corporation (part number 609-5041ce) the standard ribbon cable (50-conductor, 28 awg, stranded) that can be used with these connectors is as foll...

  • Page 17: Unpacking

    Introduction chapter 1 pc-dio-24 user manual 1-6 © national instruments corporation unpacking your pc-dio-24 board is shipped in an antistatic package to prevent electrostatic damage to the board. Electrostatic discharge can damage several components on the board. To avoid such damage in handling th...

  • Page 18: Chapter 2

    © national instruments corporation 2-1 pc-dio-24 user manual chapter 2 configuration and installation this chapter describes how to configure and install the pc-dio-24, including i/o connector signal descriptions, handshake timing diagrams, and cabling instructions. Board configuration the pc-dio-24...

  • Page 19

    Configuration and installation chapter 2 pc-dio-24 user manual 2-2 © national instruments corporation 4 3 2 1 national instruments 1 u2 2 w1 3 f1 4 w2 figure 2-1. Pc-dio-24 parts locator diagram base i/o address settings the base i/o address for the pc-dio-24 is determined by the switches at positio...

  • Page 20

    Chapter 2 configuration and installation © national instruments corporation 2-3 pc-dio-24 user manual u2 dip switches, press the side marked off to select a binary value of 1 for the corresponding address bit. Press the other side of the switch to select a binary value of 0 for the corresponding add...

  • Page 21

    Configuration and installation chapter 2 pc-dio-24 user manual 2-4 © national instruments corporation interrupt selection there are two sets of jumpers for interrupt selection on the pc-dio-24 board. W1 is used for selecting the interrupt enable line. W2 is for selecting the interrupt level. The loc...

  • Page 22: Installation

    Chapter 2 configuration and installation © national instruments corporation 2-5 pc-dio-24 user manual the pc-dio-24 can share interrupt lines with other devices by using a tristate driver to drive its selected interrupt lines. Installation the pc-dio-24 can be installed in any unused 8-bit or 16-bit...

  • Page 23: Signal Connections

    Configuration and installation chapter 2 pc-dio-24 user manual 2-6 © national instruments corporation signal connections i/o connector pin description figure 2-5 shows the pin assignments for the pc-dio-24 digital i/o connector. Warning: connections that exceed any of the maximum ratings of input or...

  • Page 24

    Chapter 2 configuration and installation © national instruments corporation 2-7 pc-dio-24 user manual signal connection descriptions pin signal name description 1, 3, 5, 7, 9, 11, 13, 15 pc port c—bidirectional data lines for port c. Pc7 is the msb, pc0 the lsb. 17, 19, 21, 23, 25, 27, 29, 31 pb por...

  • Page 25

    Configuration and installation chapter 2 pc-dio-24 user manual 2-8 © national instruments corporation timing specifications this section lists the timing specifications for handshaking with the pc-dio-24. The handshaking lines stb* and ibf synchronize input transfers. The handshaking lines obf* and ...

  • Page 26

    Chapter 2 configuration and installation © national instruments corporation 2-9 pc-dio-24 user manual mode 1 input timing the following figure 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* p...

  • Page 27

    Configuration and installation chapter 2 pc-dio-24 user manual 2-10 © national instruments corporation mode 1 output timing the following 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* =...

  • Page 28

    Chapter 2 configuration and installation © national instruments corporation 2-11 pc-dio-24 user manual mode 2 bidirectional timing the following figure illustrates the timing specifications for bidirectional transfers in mode 2. T2 t1 wr* obf* intr ack* data t6 t7 t3 t4 t10 stb* t9 t8 t5 ibf rd* nam...

  • Page 29: Chapter 3

    © national instruments corporation 3-1 pc-dio-24 user manual chapter 3 theory of operation this chapter contains a functional overview of the pc-dio-24 board and explains the operation of each functional unit making up the pc-dio-24. The block diagram in figure 3-1 illustrates the key functional com...

  • Page 30: Address Decoder

    Theory of operation chapter 3 pc-dio-24 user manual 3-2 © national instruments corporation address decoder the base address used by the board is determined by an onboard switch setting. The address on the pc i/o channel bus is monitored by the address decoder. If the address on the bus matches the s...

  • Page 31: Chapter 4

    © national instruments corporation 4-1 pc-dio-24 user manual chapter 4 register-level programming this chapter describes in detail the address and function of each of the pc-dio-24 control and status registers. This chapter also includes important information related to register-level programming th...

  • Page 32

    Register-level programming chapter 4 pc-dio-24 user manual 4-2 © national instruments corporation mode 0 this mode can be used for simple input and output operations for each of the ports. No handshaking is required; data is simply written to or read from a selected port. Mode 0 has the following fe...

  • Page 33: Register Map

    Chapter 4 register-level programming © national instruments corporation 4-3 pc-dio-24 user manual register map the following table lists the address map for the pc-dio-24. The registers porta, portb, portc, and cnfg are 8-bit registers in the 82c55a. Table 4-1. Pc-dio-24 address map register offset ...

  • Page 34

    Register-level programming chapter 4 pc-dio-24 user manual 4-4 © national instruments corporation d2 d1 d0 d5 d4 d3 d7 d6 (high nibble) 1 = input 0 = output control word flag 1 = mode set 00 = mode 0 01 = mode 1 1x = mode 2 mode selection 1 = input 0 = output port a port c (low nibble) 1 = input 0 =...

  • Page 35: Programming Considerations

    Chapter 4 register-level programming © national instruments corporation 4-5 pc-dio-24 user manual table 4-2. Port c set/reset control words number bit set bit reset bit set or control word control word reset in port c 0 0xxx0001 0xxx0000 xxxxxxxn 1 0xxx0011 0xxx0010 xxxxxxnx 2 0xxx0101 0xxx0100 xxxx...

  • Page 36

    Register-level programming chapter 4 pc-dio-24 user manual 4-6 © national instruments corporation table 4-3. Mode 0 i/o configurations control word group a group b number bit port a port c 1 port b port c 2 76543210 0 10000000 output output output output 1 10000001 output output output input 2 10000...

  • Page 37

    Chapter 4 register-level programming © national instruments corporation 4-7 pc-dio-24 user manual /* example 1*/ outp(cnfg,0x80); /* ports a, b, and c are outputs. */ outp(porta,0x12); /* write data to port a. */ outp(portb,0x34); /* write data to port b. */ outp(portc,0x56); /* write data to port c...

  • Page 38

    Register-level programming chapter 4 pc-dio-24 user manual 4-8 © national instruments corporation during a mode 1 data read transfer, the status of the handshaking lines and interrupt signals can be obtained by reading port c. The port c status-word bit definitions for an input transfer are shown as...

  • Page 39

    Chapter 4 register-level programming © national instruments corporation 4-9 pc-dio-24 user manual mode 1 input programming example main() { #define base_address 0x210 /* board located at address 210. */ #define portaoffset 0x00 /* offset for port a */ #define portboffset 0x01 /* offset for port b */...

  • Page 40

    Register-level programming chapter 4 pc-dio-24 user manual 4-10 © national instruments corporation the control word written to the cnfg register to configure port b for output in mode 1 is shown as follows. Notice that port b does not have extra input or output lines from port c. 1 x x x x 1 0 x 7 6...

  • Page 41

    Chapter 4 register-level programming © national instruments corporation 4-11 pc-dio-24 user manual at the digital i/o connector, port c has the following pin assignments when in mode 1 output. Notice that the status of acka* and ackb* is not included when port c is read. Pc7 pc6 pc5 pc4 pc3 pc2 pc1 ...

  • Page 42

    Register-level programming chapter 4 pc-dio-24 user manual 4-12 © national instruments corporation mode 2–bidirectional bus mode 2 has an 8-bit bus that can transfer both input and output without changing the configuration. The data transfers are synchronized with handshaking lines in port c. This m...

  • Page 43

    Chapter 4 register-level programming © national instruments corporation 4-13 pc-dio-24 user manual bit name description (continued) 4 inte2 interrupt enable bit for input—if this bit is set, interrupts are enabled from the 82c55a for ibfa. Controlled by bit set/reset of pc4. 3 intra interrupt reques...

  • Page 44

    Register-level programming chapter 4 pc-dio-24 user manual 4-14 © national instruments corporation /* example 1*/ outp(cnfg,0xc0); /* port a is in mode 2. */ while (!(inp(portc) & 0x80)); /* wait until obfa* is set, indicating that the data last written to port a has been read.*/ outp(porta,0x67); /...

  • Page 45: Interrupt Handling

    Chapter 4 register-level programming © national instruments corporation 4-15 pc-dio-24 user manual /* example 3–set up interrupts for mode 1 output for port a. Select pc4 as the interrupt enable bit. */ outp(cnfg,0xa0); /* port a is an output in mode 1. */ outp(cnfg,0x0d); /* set pc6 to enable inter...

  • Page 46

    Register-level programming chapter 4 pc-dio-24 user manual 4-16 © national instruments corporation table 4-4. Interrupt enable signals for all mode combinations port a port a port b port b port a port a port b port a interrupt mode 2 mode 2 mode 1 mode 1 mode 1 mode 1 mode 0 mode 0 enable output inp...

  • Page 47: Appendix A

    © national instruments corporation a-1 pc-dio-24 user manual appendix a specifications this appendix lists the specifications for the pc-dio-24 board. These specifications are typical at 25 ° c, unless otherwise stated. The operating temperature range is 0 ° to 70 ° c. Digital i/o number of channels...

  • Page 48

    Specifications appendix a pc-dio-24 user manual a-2 © national instruments corporation physical dimensions .................................................................. 17.5 by 9.9 cm (6.9 in. By 3.9 in.) i/o connector............................................................... 50-pin male r...

  • Page 49: Appendix B

    © national instruments corporation b-1 pc-dio-24 user manual appendix b i/o connector this appendix describes the pinout and signal names for the i/o connector on the pc-dio-24. Figure b-1 shows the pc-dio-24 digital i/o connector. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26...

  • Page 50: Oki 82C55A Data Sheet

    © national instruments corporation c-1 pc-dio-24 user manual appendix c oki 82c55a data sheet * this appendix contains 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 semiconduc...

  • Page 51

    Appendix c oki 82c55a data sheet pc-dio-24 user manual c-2 © national instruments corporation.

  • Page 52

    Appendix c oki 82c55a data sheet © national instruments corporation c-3 pc-dio-24 user manual.

  • Page 53

    Appendix c oki 82c55a data sheet pc-dio-24 user manual c-4 © national instruments corporation.

  • Page 54

    Appendix c oki 82c55a data sheet © national instruments corporation c-5 pc-dio-24 user manual.

  • Page 55

    Appendix c oki 82c55a data sheet pc-dio-24 user manual c-6 © national instruments corporation.

  • Page 56

    Appendix c oki 82c55a data sheet © national instruments corporation c-7 pc-dio-24 user manual.

  • Page 57

    Appendix c oki 82c55a data sheet pc-dio-24 user manual c-8 © national instruments corporation.

  • Page 58

    Appendix c oki 82c55a data sheet © national instruments corporation c-9 pc-dio-24 user manual.

  • Page 59

    Appendix c oki 82c55a data sheet pc-dio-24 user manual c-10 © national instruments corporation.

  • Page 60

    Appendix c oki 82c55a data sheet © national instruments corporation c-11 pc-dio-24 user manual.

  • Page 61

    Appendix c oki 82c55a data sheet pc-dio-24 user manual c-12 © national instruments corporation.

  • Page 62

    Appendix c oki 82c55a data sheet © national instruments corporation c-13 pc-dio-24 user manual.

  • Page 63

    Appendix c oki 82c55a data sheet pc-dio-24 user manual c-14 © national instruments corporation.

  • Page 64

    Appendix c oki 82c55a data sheet © national instruments corporation c-15 pc-dio-24 user manual.

  • Page 65

    Appendix c oki 82c55a data sheet pc-dio-24 user manual c-16 © national instruments corporation.

  • Page 66

    Appendix c oki 82c55a data sheet © national instruments corporation c-17 pc-dio-24 user manual.

  • Page 67: Appendix D

    © national instruments corporation d-1 pc-dio-24 user manual appendix d customer communication ___________________________________________________ for your convenience, this appendix contains forms to help you gather the information necessary to help us solve technical problems you might have as wel...

  • Page 68: Technical Support Form

    Technical support form ___________________________________________________ photocopy this form and update it each time you make changes to your software or hardware, and use the completed copy of this form as a reference for your current configuration. Completing this form accurately before contacti...

  • Page 69: Configuration Form

    Pc-dio-24 hardware and software configuration form ___________________________________________________ record the settings and revisions of your hardware and software on the line to the right of each item. Complete a new copy of this form each time you revise your software or hardware configuration,...

  • Page 70: Documentation Comment Form

    Documentation comment form ___________________________________________________ national instruments encourages you to comment on the documentation supplied with our products. This information helps us provide quality products to meet your needs. Title: pc-dio-24 user manual edition date: september 1...

  • Page 71: Glossary

    © national instruments corporation glossary-1 pc-dio-24 user manual glossary ___________________________________________________ prefix meaning value µ - micro- 10-6 m- milli- 10-3 k- kilo- 10 3 m- mega- 10 6 ° degrees Ω ohms % percent a amperes awg american wire gauge bcd binary-coded decimal c cel...

  • Page 72: Index

    © national instruments corporation index-1 pc-dio-24 user manual index special characters +5 v signal (table), 2-7 82c55a programmable peripheral interface. See oki 82c55a programmable peripheral interface. A ack* signal description (table), 2-8 mode 1 output timing, 2-10 mode 2 bidirectional timing...

  • Page 73

    Index pc-dio-24 user manual index-2 © national instruments corporation i ibf signal description (table), 2-8 mode 1 input timing, 2-9 mode 2 bidirectional timing, 2-11 ibfa bit, port c, 4-8, 4-12 ibfb bit, port c, 4-8 installation. See also configuration. Procedure for, 2-5 unpacking the pc-dio-24, ...

  • Page 74

    Index © national instruments corporation index-3 pc-dio-24 user manual n ni-daq driver software, 1-3 o obf* signal description (table), 2-8 mode 1 output timing, 2-10 mode 2 bidirectional timing, 2-11 obfa* bit, port c, 4-10 obfb* bit, port c, 4-10, 4-12 oki 82c55a programmable peripheral interface ...

  • Page 75

    Index pc-dio-24 user manual index-4 © national instruments corporation mode 1 strobed output, 4-9 to 4-11 control words written to cnfg register (figure), 4-9 to 4-10 port c pin assignments (figure), 4-11 port c status-word bit definitions, 4-10 programming example, 4-11 mode 2 bidirectional bus, 4-...