English
Language : 

MC68HC705P6A Datasheet, PDF (56/130 Pages) Motorola, Inc – HCMOS Microcontroller Unit
Input/Output Ports
6.7 I/O Port Programming
Each pin on port A through port D (except pin 7 of port D) can be
programmed as an input or an output under software control as shown
in Table 6-1, Table 6-2, Table 6-3, and Table 6-4. The direction of a pin
is determined by the state of its corresponding bit in the associated port
data direction register (DDR). A pin is configured as an output if its
corresponding DDR bit is set to a logic 1. A pin is configured as an input
if its corresponding DDR bit is cleared to a logic 0.
Table 6-1. Port A I/O Functions
DDRA I/O Pin Mode
Accesses to
DDRA @ $0004
Read/Write
0
IN, Hi-Z
DDRA0–DDRA7
1
OUT
DDRA0–DDRA7
Note: Does not affect input, but stored to data register
Accesses to Data
Register @ $0000
Read
Write
I/O Pin
See Note
PA0–PA7 PA0–PA7
Table 6-2. Port B I/O Functions
DDRB I/O Pin Mode
Accesses to
DDRB @ $0005
Read/Write
0
IN, Hi-Z
DDRB5–DDRB7
1
OUT
DDRB5–DDRB7
Note: Does not affect input, but stored to data register
Accesses to Data
Register @ $0001
Read
Write
I/O Pin
See Note
PB5–PB7 PB5–PB7
Advance Information
56
Table 6-3. Port C I/O Functions
DDRC I/O Pin Mode
Accesses to
DDRC @ $0006
Read/Write
0
IN, Hi-Z
DDRC0–DDRC7
1
OUT
DDRC0–DDRC7
Note: Does not affect input, but stored to data register
Accesses to Data
Register @ $0002
Read
Write
I/O Pin
See Note
PC0–PC7 PC0–PC7
Input/Output Ports
MC68HC705P6A — Rev. 2.0
MOTOROLA