
Hercules III User Manual Rev A.2
www.diamondsystems.com
Page
56
Digital I/O Port E: Base+20 (Read/Write)
Bit:
7
6
5
4
3
2
1
0
Name:
DIOE7-0
DIOE7-0 Port E DIO data. Port E shares device pins with 4 counter/timer signals and 4 PWM outputs.
The function of these two groups of four pins is controlled with register bits DIOCTR1 and
DIOCTR0.
DIOCTR1:
0 = digital I/O lines DIOE7-4 appear on DIOE7-4 pins of I/O connectors.
1 = counter signals appear on DIOE7-4 pins of I/O connectors.
DIOCTR0:
0 = digital I/O lines DIOE3-0 appear on DIOE3-0 pins of I/O connectors.
1 = PWM signals appear on DIOE3-0 pins of I/O connectors.
(See register Base+12, Configuration Register, for details).
Digital I/O Configuration / Bit Programming: Base+22 (Write)
Bit:
7
6
5
4
3
2
1
0
Name:
MODE
P2-P0
B2-B0
D
-
-
DIRE-A
MODE
Indicates port direction or bit programming mode:
0 = port direction; used to configure the direction of the digital I/O ports.
1 = bit programming; provides a quick way to program individual digital I/O bits.
P2-P0
(MODE = 0)
Port number:
0 = A
1 = B
2 = C
3 = D
B2-B0
(MODE = 0)
Bit number, 0-7.
D
(MODE = 0)
Bit value, 0 or 1.
DIRE-A (MODE = 1)
Direction for ports A
– E. On power-up or system reset, all ports are set to input mode and
the contents of the output registers are set to 0.
0 = input
1 = output