Appendix C Register-Level Programmingt
© National Instruments Corporation C-3 PC-OPDIO-16 User Manual
Port B Register
Reading the Port B Register returns the logic state of the eight optically isolated digital input
lines VIN0 through VIN7.
Address: Base address + 01 (hex)
Type: Read-only
Word Size: 8-bit
Bit Map:
76543210
D7 D6 D5 D4 D3 D2 D1 D0
Bit Name Description
7–0 D<7..0> Data—These are 8-bit port B data.
Digital Control Register
The Digital Control Register configures port A for output and port B for input.
Address: Base address + 03 (hex)
Type: Write-only
Word Size: 8-bit
Bit Map:
76543210
CW7 CW CW CW CW3 CW2 CW1 CW0
Bit Name Description
7 CW7 Control word 7—Write 1 to this bit.
6–4 CW<6..4> Control word 6 through 4—Write 0 to these bits.
3 CW3, 0 Control word 3 and 0—Don’t care bits.
2 CW2 Control word 2—Write 0 to this bit.
1 CW1 Control word 1—Write 1 to this bit.
0 CW0 Control word 0—Don’t care bits.