Chapter 4
Programming
4-2
©
National Instruments Corporation
must configure the bus-related resources before attempting to execute a
register level program. Both the bus-related and data acquisition-related
PCI configurations are described in the PCI E Series User Manual.
PCI local bus boards can be used on any PCI bus system, however, this
manual only discusses IBM-compatible and Apple Macintosh systems. The
PCI E Series Register-Level Programmer Manual Companion Disk
contains different functions in C code for users to configure the
PCI E Series boards.
The following sections describe the outline of PCI initialization on the PC
and Macintosh. Detailed code and comments can be found on the
Companion Disk.
PCI Initialization for the IBM Compatible System
The PCI E Series boards use the MITE Application Specific Integrated
Circuit (ASIC) chip as the PCI bus interface. National Instruments
designed this ASIC specifically for data acquisition. In order for the board
to operate properly this chip must be configured. Ordinarily, NI-DAQ
performs this function, but if you are not using NI-DAQ, then you must
configure the MITE ASIC chip. The following sections explain how to
accomplish this.
The initialization is done by the
Setup_Mite()
function found on the
companion diskette.
Setup_Mite()
performs the following functions:
1.
It detects whether the PCI bus is present using the Is_PCI() function
while utilizing PCI BIOS calls
1
. This verifies that the PCI bus is
present.
2.
It scans the PCI bus for all National Instruments PCI E Series boards
using Find_NI_Devices() function. PCI BIOS calls are again used to
find PCI boards that contain the National Instruments Vendor ID
(0x1093) and a valid PCI E Series device ID (for example the device
ID of the PCI-MIO-16XE-50 is 0x0162). If a board is found matching
these requirements, its pertinent information is stored in a data
structure.
3.
It configures the device windows of the MITE and re-maps the board
under 1 MB in the memory map. See the companion diskette and the
Re-mapping the PCI E Series Board
section in this chapter for
further information
1
The PCI SIG provides further information on the PCI BIOS calls.