National Instruments PCI E Series Programmer's Manual page 69

Register-level programmer manual, multifunction i/o boards for pci bus computers, register-level
Hide thumbs Also See for PCI E Series:
Table of Contents

Advertisement

Chapter 4
Programming
Note
For simplicity these examples do not include software copies of the registers. If
you wish to write your own examples, or modify these examples, we strongly
recommend adding software copies of the write-only registers. Please refer to
Chapter 2, Register and Bitfield Programming Considerations, in the DAQ-STC
Technical Reference Manual for further information.
PCI E Series RLPM
The support files for the PC include
,
lowio.c
pci.c, pc_rw.c
level routines for memory read and write. essrrlp.h declares the
external function prototypes and the register addresses;
the
function, which searches for the PCI board and reassigns
Setup_Mite
the board address. pc_rw.c contains the functions which read and
write from Windows and board discrete registers:
DAQ_STC_Windowed_Mode_Write
,
Board_Write
Board_Write_8bit
The support files for the Macintosh include
. NI-DAQ Library has the routines for memory read and write.
mac_ini.c
declares the external function prototypes and the register
essrrlp.h
addresses;
mac_ini.c
for the PCI-MIO board and saves the board address.
the functions which read and write from Windows and board discrete
registers:
DAQ_STC_Windowed_Mode_Write
DAQ_STC_Windowed_Mode_Read
and
. In addition, Macintosh users should include the NI-DAQ
Board_Read
library since the NI-DAQ library has the low-level routines for reading
the configuration.
Before beginning register-level programming of the analog input and
analog output sections, you should test the Windowed addressing scheme.
To test the Windowed addressing scheme, use a simple example to operate
on the DIO lines. When this example works, try to write code for the other
sections.
As mentioned in Chapter 2 of the DAQ-STC Technical Reference Manual,
several write-only registers on the DAQ-STC contain bitfields that control
a number of functionally independent parts of the chip. To update bitfields,
you must set or clear bits without changing the status of the remaining bits
in the register. Since you cannot read these registers to determine which bits
are set, you should maintain a software copy of the write-only registers.
lowio.h
, and
pc_ini.c. lowio.c
,
DAQ_STC_Windowed_Mode_Read
, and
Board_Read
includes the
Setup_Mite
,
Board_Write
4-6
,
,
pci.h
eserrlp.h
has the low
pc_ini.c
.
,
eserrlp.h
mac_rw.c
function which searches
contains
mac_rw.c
,
,
Board_Write_8bit
© National Instruments Corporation
,
includes
,
and

Advertisement

Table of Contents
loading

Table of Contents