English
Language : 

MC68HC908LB8_05 Datasheet, PDF (139/234 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Port C
Address:
Read:
Write:
Reset:
$0006
Bit 7
6
5
4
3
2
1
0
0
0
0
0
0
DDRC1
0
0
0
0
0
0
0
= Unimplemented
Figure 14-10. Data Direction Register C (DDRC)
Bit 0
DDRC0
0
DDRC1–DDRC0 — Data Direction Register C Bits
These read/write bits control port C data direction. Reset clears DDRC1–DDRC0, configuring all port
C pins as inputs.
1 = Corresponding port C pin configured as output
0 = Corresponding port C pin configured as input
NOTE
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.
Figure 14-11 shows the port C I/O logic.
READ DDRC ($0006)
WRITE DDRC ($0006)
RESET
WRITE PTC ($0002)
VDD
DDRCx
PTCx
PTCPUEx
READ PTC ($0002)
INTERNAL
PULLUP
DEVICE
PTCx
Figure 14-11. Port C I/O Circuit
NOTE
Figure 14-11 does not apply to PTC2.
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. Table 14-3 summarizes the operation of the port C pins.
MC68HC908LB8 Data Sheet, Rev. 1
Freescale Semiconductor
139