Appendix B
Register-Level Programming — Port C Status-Word Bit Definitions for Bidirectional Data Path (Port A Only)
PCI-DIO-96/PXI-6508/PCI-6503 User Manual
B-30
ni.com
Mode 1 Strobed Output Programming Example
The following example shows how to set up interrupts for mode 1 output for port A.
Write(8255Cnfg, 0xA0)
Set mode 1—port A is an output
Write(8255Cnfg, 0x0D)
Set PC6 to enable interrupts from 82C55A
Write(IREG2, 0x04)
Set INTEN bit
Write(IREG1, 0x01)
Set AIRQ0 to enable PPI A,
port A interrupts
Mode 2 Bidirectional Bus Programming Example
The following example shows how to set up interrupts for mode 2 output transfers.
Write (8255Cnfg, 0xC0)
Set mode 2—port A is bidirectional
Write (8255Cnfg, 0x0D)
Set PC6 to enable interrupt from 82C55A
Write (IREG2, 0x04)
Set INTEN bit
Write (IREG1, 0x01)
Set AIRQ0 to enable PPI A,
port A interrupts
The following example shows how to set up interrupts for mode 2 input transfers.
Write (8255Cnfg, 0xC0)
Set mode 2—port A is bidirectional
Write (8255Cnfg, 0x09)
Set PC4 to enable interrupt from 82C55A
Write (IREG2, 0x04)
Set INTEN bit
Write (IREG1, 0x01)
Set AIRQ0 to enable PPI A,
port A interrupts
Programming Considerations for the 82C53
The PCI-DIO-96 and PXI-6508 contain an 82C53 programmable interval timer. The
following section contains a general overview and configuration information for the 82C53.
General Information
The 82C53 contains three counter/timers, each of which can operate in one of six different
modes. However, only counter 0 and counter 1 are configured for operation; counter 2 is not
connected, nor is it available on the external I/O connector. In addition, the counter gates are
wired in such a way (tied to logic high) that modes 1 and 5 are unusable; the recommended
counter mode is mode 2.
The source for counter 0 is a 2 MHz clock. If you use counter 0 to interrupt the computer,
configure the counter for rate generation, or mode 2. If you use counter 1 to interrupt the
computer, counter 0 is a frequency scale that feeds the source input for counter 1. In this case,
configure both counters for rate generation, or mode 2.