English
Language : 

MC68HC908LJ12 Datasheet, PDF (351/413 Pages) Freescale Semiconductor, Inc – 8-bit microcontroller units
Input/Output (I/O) Ports
17.5.2 Data Direction Register C (DDRC)
Data direction register C determines whether each port C pin is an input
or an output. Writing a logic 1 to a DDRC bit enables the output buffer for
the corresponding port C pin; a logic 0 disables the output buffer.
Address: $0006
Bit 7
Read:
DDRC7
Write:
Reset: 0
6
DDRC6
0
5
DDRC5
0
4
DDRC4
0
3
DDRC3
0
2
DDRC2
0
1
DDRC1
0
Bit 0
DDRC0
0
Figure 17-10. Data Direction Register B (DDRB)
DDRC[7:0] — Data Direction Register C Bits
These read/write bits control port C data direction. Reset clears
DDRC[7:0], 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 17-11 shows
the port C I/O logic.
READ DDRC ($0006)
WRITE DDRC ($0006)
RESET
WRITE PTC ($0002)
DDRCx
PTCx
PTCx
READ PTC ($0002)
Figure 17-11. Port C I/O Circuit
Technical Data
352
Input/Output (I/O) Ports
MC68HC908LJ12 — Rev. 2.1
Freescale Semiconductor