Appendix B
Register-Level Programming — Programming
©
National Instruments Corporation
B-15
PCI-DIO-96/PXI-6508/PCI-6503 User Manual
Table B-3 contains common terms used in the programming examples.
PCI Initialization
To program at the register level without NI-DAQmx or Traditional NI-DAQ (Legacy), you
must know the PCI-DIO-96 or PXI-6508 base memory address and, if using interrupts, install
an interrupt handler. This manual does not discuss writing an interrupt handler. In order for
the board to operate properly, you must configure the PCI MITE ASIC. NI-DAQmx or
Traditional NI-DAQ (Legacy) usually performs this function, but if you are not using
NI-DAQ, then you must configure the PCI MITE ASIC.
The following sections explain how to configure the PCI MITE ASIC. You must implement
the references made to PCI BIOS
1
calls.
To configure the PCI MITE chip, you must first write an algorithm that finds and stores all
configuration information about the board. To do this, use PCI BIOS calls to search PCI
configuration space for the National Instruments vendor ID (0x1093) and PCI-DIO-96 device
ID (0x0160), PXI-6508 device ID (0x13c0), or PCI-6503 device ID (0x17d0). If a board is
found, the algorithm can store all the board’s configuration information into a data structure.
Table B-3.
Common Programming Example Terms
Term
Definition
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
1
To obtain more information on PCI BIOS calls from the PCI SIG, go to
www.pcisig.com
.