Network Card User Manual
Table Of Contents
- PC-DIO-24 User Manual
- Contents
- About This Manual
- Chapter 1 Introduction
- Chapter 2 Configuration and Installation
- Chapter 3 Theory of Operation
- Chapter 4 Register-Level Programming
- Appendix A Specifications
- Appendix B I/O Connector
- Appendix C OKI 82C55A Data Sheet*
- Appendix D Customer Communication
- Glossary
- Index
- Figures
- Figure 1-1. The Relationship between the Programming Environment, NI-DAQ, and Your Hardware
- Figure 2-1. PC-DIO-24 Parts Locator Diagram
- Figure 2-2. Example Base I/O Address Switch Settings
- Figure 2-3. Jumper Settings–PC6, PC4, PC2, and N/C
- Figure 2-4. Interrupt Jumper Setting for IRQ5 (Factory Setting)
- Figure 2-5. Digital I/O Connector Pin Assignments
- Figure 3-1. PC-DIO-24 Block Diagram
- Figure 4-1. Control-Word Formats
- Figure B-1. PC-DIO-24 I/O Connector
- Tables
- Table 2-1. PC-DIO-24 Factory-Set Jumper and Switch Settings
- Table 2-2. Port C Signal Assignments
- Table 4-1. PC-DIO-24 Address Map
- Table 4-2. Port C Set/Reset Control Words
- Table 4-3. Mode 0 I/O Configurations
- Table 4-4. Interrupt Enable Signals for All Mode Combinations
- Table A-1. Maximum Average Transfer Rates for the PC-DIO-24
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 interrupts from
82C55A. */
outp(cnfg,0x0C); /* Clear PC4 to enable interrupts. */
/* EXAMPLE 4–Set up interrupts for mode 1 output for port B. Select PC4 as
the interrupt enable bit. */
outp(cnfg,0x84); /* Port B is an output in mode 1. */
outp(cnfg,0x05); /* Set PC2 to enable interrupts from
82C55A. */
outp(cnfg,0x08); /* Clear PC4 to enable interrupts. */
/* EXAMPLE 5–Set up interrupts for mode 2 output transfers. Select PC2 as the
interrupt enable 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. Select PC2 as the
interrupt enable bit. */
outp(cnfg,0xD0); /* mode 2 input */
outp(cnfg,0x09); /* Set PC4 to enable interrupts from
82C55A. */
outp(cnfg,0x04); /* Clear PC2 to enable interrupts. */
}
Interrupt Handling
A jumper setting on the PC-DIO-24 selects the signal that is used for the interrupt enable signal.
If jumper W1 is set to N/C, interrupts are disabled. Jumper W1 can be used to select PC2, PC4,
or PC6 as the active low interrupt enable signal. For example, if PC2 is selected, interrupts are
enabled if PC2 is logic low. If PC2 is logic high, interrupts from the PC-DIO-24 are disabled.
The following table summarizes which signal should be used as the interrupt enable for all mode
combinations.