Elektra CPU User Manual V1.00
Page 70
17. DIGITAL I/O OPERATION
ELEKTRA contains 24 digital I/O lines organized as three 8-bit I/O ports, A, B, and C. The
direction for each port is programmable, and port C is further divided into two 4-bit halves, each
with independent direction. The ports are accessed at registers Base + 8 through Base + 10
respectively, and the direction register is at Base + 11.
Base
+
7 6 5 4 3 2 1 0
8 PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0
9 PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0
10 PC7 PC6
PC5
PC4 PC3 PC2
PC1 PC0
11
DIOCTR
DIRA
DIRCH DIRB
DIRCL
The digital I/O lines are located at pins 1 through 24 on the I/O header J14 (see page 18). They
are 3.3V and 5V logic compatible. Each output is capable of supplying –8mA in logic 1 state and
+12mA in logic 0 state. See the specifications on page 78 for more detail.
DIRA, DIRB, DIRCH, and DIRCL control the direction of ports A, B, C4-7, and C0-3. A 0 means
output and a 1 means input. All ports power up to input mode and the output registers are cleared
to zero. When a port direction is changed to output, its output register is cleared to zero. When a
port is in output mode, its value can be read back.
DIOCTR is used to control the function of lines C7-C4 on the I/O connector. When DIOCTR=1,
the lines are C7-C4. When DIOCTR=0, these lines are counter/timer lines:
Pin No.
DIOCTR = 1
DIOCTR = 0
Pin direction for DIOCTR = 0
21
C4
Gate
0
Input
22
C5
Gate
1
Input
23
C6
Clk
1
Input
24
C7
Out
0
Output