Chapter 4 Programming©National Instruments Corporation4-7PCI E Series RLPMDigital I/OChapter 7 of the DAQ-STC Technical Reference Manual describes the DIOmodule of the DAQ-STC and illustrates an example (C language) inWindowed mode to toggle the DIO lines. Example 1 verifies that theWindowed addressing scheme works. Example 2 illustrates digital I/O.Example 1This example illustrates the use of Windowed registers by toggling thedigital lines.First configure all the digital lines as outputs. Write 0x0 through 0xFFto the DIO output register and make sure the digital lines toggle.(This example is also presented in Chapter 7 of the DAQ-STC TechnicalReference Manual.)1. Set up the PCI board resources. Use the function Setup_Miteprovided 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 2This example shows how to perform digital I/O.Configure digital lines 0, 2, 4, and 6 as outputs and the remaining lines asinputs. Wrap back the output lines to the input lines. Write patterns 0b0000and 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_Miteprovided 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;