English
Language : 

MC68HC705C8A Datasheet, PDF (85/222 Pages) Motorola, Inc – HCMOS Microcontroller Unit
7.5.3 Port C Logic
Figure 7-9 shows port C I/O logic.
READ $0006
WRITE $0006
RESET
WRITE $0002
DATA DIRECTION
REGISTER C
BIT DDRCx
PORT C DATA
REGISTER
BIT PCx
READ $0002
Parallel Input/Output (I/O)
Port C
PCx
Figure 7-9. Port C I/O Logic
When a port C pin is programmed as an output, reading the port bit
reads the value of the data latch and not the voltage on the pin. When a
port C pin is programmed as an input, reading the port bit reads the
voltage level on the pin. The data latch can always be written, regardless
of the state of its DDRC bit. Table 7-3 summarizes the operation of the
port C pins.
Table 7-3. Port C Pin Functions
DDRC Bit I/O Pin Mode
Accesses to DDRC
Read/Write
0
Input, Hi-Z(1)
DDRC7–DDRC0
1
Output
DDRC7–DDRC0
1. Hi-Z = high impedance
2. Writing affects data register but does not affect input.
Accesses to PORTC
Read
Write
Pin
PC7–PC0(2)
PC7–PC0 PC7–PC0
NOTE:
To avoid excessive current draw, tie all unused input pins to VDD or VSS
or change I/O pins to outputs by writing to DDRC in user code as early
as possible.
MC68HC705C8A — Rev. 2.0
MOTOROLA
Parallel Input/Output (I/O)
Technical Data
85