Manual 104-AIO16A and 104-AIO16E
20
Base A 14
(read/write)
Port A DIO (8255)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
a7 a6 a5 a4 a3 a2 a1 a0
a7-a0 -> Port A data
Reading from this address will return the digital data on Port A. Writing to this address will output the
digital data on Port A. Readback is supported while in the output mode. Be sure to refer to Base Address
+ 17 for controlling Port A’s input/output direction.
Base A 15
(read/write)
Port B DIO (8255)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
b7 b6 b5 b4 b3 b2 b1 b0
b7-b0 -> Port B data
Reading from this address will return the digital data on Port B. Writing to this address will output the
digital data on Port B. Readback is supported while in the output mode. Be sure to refer to Base Address
+ 17 for controlling Port B’s input/output direction.
Base A 16
Unused
Base A 17
(write)
DIO Configuration (8255)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
modeSetFlag
X
X PortADir X
X portBDir X
Writing to this address configures the input/output direction for Ports A and B. A ‘1’ must always be
written to bit 7 when configuring. Below are the Port direction bits:
modeSetFlag
Æ
‘0’ = configuration not enabled ‘1’ = configuration enabled
portADir
Æ
‘0’ = Port A is output
‘1’ = Port A is input (default)
portBDir
Æ
‘0’ = Port B is output
‘1’ = Port B is input (default)
Base A 18
(read/write)
EEPROM access
Base A 18 read
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
data
X X X X X X X
Base A 18 write
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
data
X X X X X X
SClk
The EEPROM is intended to hold calibration data for the A/D Gain and Offset correction, and the Gain
Correction data for both DACs. Calibration is only needed for GNL/GNH and BIP/UNI jumper selected
ranges, so a total of 4 A/D Input calibration data pairs are used. Consult the provided calibration program
or sample code for information on the locations in the EEPROM used to store the calibration data.
Although the EEPROM is intended to contain calibration data, it is unlikely your program will need to keep
calibration data for the ranges you are not going to use. In this case you can use those locations in the
EEPROM for your own purposes.