
M44C588
TELEFUNKEN Semiconductors
Rev. A1, 11-Nov-97
Preliminary Information
20 (44)
There are four different types of bidirectional ports:
D Type 1 (Ports 0 and 1) – 4-bit wide bidirectional ports
with automatic full bus width direction switching.
D Type 2 (Port B) – 4-bit wide bitwise programmable
bidirectional port with static pull-ups/ -downs.
D Type 3 (Port 6) – 4-bit wide bitwise programmable
bidirectional port with static pull-ups/ -downs and
versatile interrupt control logic.
D Type 4 (Port 4) – 4-bit wide bitwise programmable
bidirectional port also provides the I/O interface for
Timer 0 and Timer 1.
2.2.1
Bidirectional Port 0 and Port 1
In this port type, the data direction register is not indepen-
dently software programmable, the direction of the
complete port being switched automatically when an I/O
instruction occurs (see figure 18). The port is switched to
output mode with an OUT instruction and to input with an
IN instruction. The data written to a port will be stored
into the output data latches and appears immediately at
the port pin following the OUT instruction. After RESET
all output latches are set to ’1’ and the ports are switched
to input mode. An IN instruction reads the condition of
the associated pins.
Note
Care must be taken when switching these bidirectional
ports from output to input. The capacitive pin loading at
this port in conjunction with the high resistance pull-up
may cause the CPU to read the contents of the output data
register rather than the external input state. To avoid this,
one should use either of the following programming tech-
niques:
D Use two IN instructions and DROP the first data
nibble. The first IN switches the port from output to
input and the DROP removes the first invalid nibble.
The second IN reads the valid pin state.
D Use an OUT instruction followed by an IN instruction.
With the OUT instruction the capacitive load is
charged or discharged depending on the optional
pull-up /pull-down configuration. Write a “1” for pins
with pull-up resistors and a “0” for pins with pull-
down resistors.
OUT
IN
Reset
I/O Bus
D
R
S
Q
NQ
R
Master reset
PxDATy
*) Mask options
(Data out)
(Direction)
Port 1 only
BPxy
V
DD
*
Pull-up
*
Pull-down
*
V
DD
*
96 11523
Figure 18. Bidirectional Ports 0 and 1