English
Language : 

MC68HC08XL36 Datasheet, PDF (279/362 Pages) Freescale Semiconductor, Inc – HCMOS Microcontroller Unit
Freescale Semiconductor, Inc.
Input/Output Ports
Port C
DDRC7–DDRC0 — Data Direction Register C Bits
These read/write bits control port C data direction. Reset clears
DDRC7–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 10 shows the port C I/O logic.
READ DDRC ($0006)
WRITE DDRC ($0006)
RESET
DDRCx
WRITE PORTC ($0002)
PCx
PCx
READ PORTC ($0002)
Figure 10. Port C I/O Circuit
When bit DDRCx is a logic 1, reading address $0002 reads the PCx data
latch. When bit DDRCx is a logic 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 4 summarizes the operation of
the port C pins.
Table 4. Port C Pin Operation
Data Direction Bit
I/O Pin Mode
0
Input, high-impedance
1
Output
1. Writing affects data register, but does not affect input.
Access to Data Bit
Read
Pin
Write
Latch(1)
Latch
Latch
9-ports_a
MOTOROLA
Input/Output Ports
For More Information On This Product,
Go to: www.freescale.com
MC68HC08XL36
279