Chapter 6
Programming
PCI-DIO-96 User Manual
6-2
©
National Instruments Corporation
Before you can implement any of the examples into a real application,
you must know the base memory address for your board. To generate
and process any interrupts, you must write and install an applicable
interrupt service routine.
Note:
In this chapter all numbers preceded by 0x are hexadecimal
Common terms that you will see used in the programming examples are
listed below:
Port A
Address of PPI A Port A Register
(Base A 0x00)
Port B
Address of PPI A Port B Register
(Base A 0x01)
Port C
Address of PPI A Port C Register
(Base A 0x02)
8255Cnfg
Address of PPI A Configuration
Register
(Base A 0x03)
Ctr0
Address of 82C53 Counter 0 Register
(Base A 0x10)
Ctr1
Address of 82C53 Counter 1 Register
(Base A 0x11)
CntrCnfg
Address of 82C53 Configuration
Register (Base A 0x13)
IREG1
Address of Interrupt Control Register 1
(Base A 0x14)
IREG2
Address of Interrupt Control Register 2
(Base A 0x15)
Write (address, data)
Generic function call for a memory
space Write of data to address
Read (address)
Generic function call for a memory
space Read from address
CWrite (offset, data)
PCI configuration space write of data to
PCI configuration space offset