English
Language : 

MC68HC705P6A Datasheet, PDF (55/130 Pages) Motorola, Inc – HCMOS Microcontroller Unit
6.6 Port D
Input/Output Ports
Port D
Port D is a 2-bit port with one bidirectional pin (PD5) and one input-only
pin (PD7). Pin PD7 is shared with the 16-bit timer. The port D data
register is located at address $0003 and its data direction register (DDR)
is located at address $0007. The contents of the port D data register are
indeterminate at initial powerup and must be initialized by user software.
Reset does not affect the data registers, but clears the DDRs, thereby
setting PD5 to input mode. Writing a 1 to DDR bit 5 sets PD5 to output
mode (see Figure 6-4).
Port D may be used for general I/O applications regardless of the state
of the 16-bit timer. Since PD7 is an input-only line, its state can be read
from the port D data register at any time.
READ $0007
WRITE $0007
WRITE $0003
RESET
(RST)
READ $0003
DATA DIRECTION
REGISTER BIT
DATA
REGISTER BIT
I/O
OUTPUT
PIN
INTERNAL HC05
DATA BUS
Figure 6-4. Port D I/O Circuitry
MC68HC705P6A — Rev. 2.0
MOTOROLA
Input/Output Ports
Advance Information
55