EasyManuals Logo
Home>National Instruments>Computer Hardware>PCI-6035E

National Instruments PCI-6035E Programmer's Manual

National Instruments PCI-6035E
162 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #70 background imageLoading...
Page #70 background image
Chapter 4 Programming
©
National Instruments Corporation 4-7 PCI E Series RLPM
Digital I/O
Chapter 7 of the DAQ-STC Technical Reference Manual describes the DIO
module of the DAQ-STC and illustrates an example (C language) in
Windowed mode to toggle the DIO lines. Example 1 verifies that the
Windowed addressing scheme works. Example 2 illustrates digital I/O.
Example 1
This example illustrates the use of Windowed registers by toggling the
digital lines.
First configure all the digital lines as outputs. Write 0x0 through 0xFF
to the DIO output register and make sure the digital lines toggle.
(This example is also presented in Chapter 7 of the DAQ-STC Technical
Reference Manual.)
1. Set up the PCI board resources. Use the function
Setup_Mite
provided on the Companion Disk.
2. Configure all the digital lines as outputs.
DIO_Control_Register = 0xFF;
3. Output the digital patterns.
for (i=0;i<=255;i++)
{
DIO_Output_Register = i;
}
Example 2
This example shows how to perform digital I/O.
Configure digital lines 0, 2, 4, and 6 as outputs and the remaining lines as
inputs. Wrap back the output lines to the input lines. Write patterns 0b0000
and 0b1111 to the output lines. Read back the input pins to verify the data.
Also check some intermediate patterns.
1. Set up the PCI board resources. Use the function
Setup_Mite
provided on the Companion Disk.
2. Configure lines 0, 2, 4, and 6 as outputs and 1, 3, 5, and 7 as inputs.
DIO_Control_Register = 0x55;
3. Write the digital pattern.
DIO_Output_Register = 0x00;

Table of Contents

Other manuals for National Instruments PCI-6035E

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the National Instruments PCI-6035E and is the answer not in the manual?

National Instruments PCI-6035E Specifications

General IconGeneral
BrandNational Instruments
ModelPCI-6035E
CategoryComputer Hardware
LanguageEnglish

Related product manuals