s908ey8ad4cfjer Freescale Semiconductor, Inc, s908ey8ad4cfjer Datasheet - Page 120

no-image

s908ey8ad4cfjer

Manufacturer Part Number
s908ey8ad4cfjer
Description
M68hc08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Input/Output (I/O) Ports (PORTS)
DDRC[4:0] — Data Direction Register C Bits
Figure 12-9
When bit DDRCx is a 1, reading address $0002 reads the PTCx data latch. When bit DDRCx is a 0,
reading address $0002 reads the voltage level on the pin. The data latch can always be written,
regardless of the state of its data direction bit.
12.5 Port D
Port D is a 2-bit special function port that shares its pins with the timer interface module (TIMA).
12.5.1 Port D Data Register
The port D data register contains a data latch for each of the two port D pins.
120
These read/write bits control port C data direction. Reset clears DDRC[4:0] and MCLKEN, configuring
all port C pins as inputs.
1 = Corresponding port C pin configured as output
0 = Corresponding port C pin configured as input
shows the port C I/O logic.
X = don’t care
Hi-Z = high impedance
1. Writing affects data register, but does not affect input.
DDRC
Bit
Avoid glitches on port C pins by writing to the port C data register before
changing data direction register C bits from 0 to 1.
0
1
0
1
READ DDRC ($0006)
WRITE DDRC ($0006)
WRITE PTC ($0002)
READ PTC ($0002)
PTC
Bit
X
X
2
2
MC68HC908EY16 • MC68HC908EY8 Data Sheet, Rev. 10
Input, Hi-Z
Input, Hi-Z
I/O Pin
Output
Output
Mode
Table 12-3. Port C Pin Functions
RESET
Figure 12-9. Port C I/O Circuit
Accesses to DDRC
Table 12-3
NOTE
Read/Write
DDRCx
DDRC[4:0]
DDRC[4:0]
PTCx
DDRC[7]
DDRC[7]
summarizes the operation of the port C pins.
PTC[4:0]
Read
Pin
Pin
0
Accesses to PTC
PTC[4:0]
PTC[4:0]
Freescale Semiconductor
Write
PTC2
PTCx
(1)

Related parts for s908ey8ad4cfjer