English
Language : 

MC68HC08AZ32A Datasheet, PDF (170/312 Pages) Motorola, Inc – HCMOS Microcontroller Unit
Input/Output (I/O) Ports
Address: $000F
Bit 7
6
5
4
3
2
1
Bit 0
Read: 0
0
0
0
0
0
DDRH1 DDRH0
Write:
Reset: 0
0
0
0
0
0
0
0
= Unimplemented
Figure 13-24. Data Direction Register H (DDRH)
DDRH[1:0] — Data Direction Register H Bits
These read/write bits control port H data direction. Reset clears DDRH[1:0], configuring all port H pins
as inputs.
1 = Corresponding port H pin configured as output
0 = Corresponding port H pin configured as input
NOTE
Avoid glitches on port H pins by writing to the port H data register before
changing data direction register H bits from 0 to 1.
Figure 13-25 shows the port H I/O logic.
READ DDRH ($000E)
WRITE DDRH ($000E)
RESET
WRITE PTH ($000A)
DDRHx
PTHx
PTGx
READ PTH ($000A)
Figure 13-25. Port H I/O Circuit
When bit DDRHx is a 1, reading address $000B reads the PTHx data latch. When bit DDRHx is a 0,
reading address $000B reads the voltage level on the pin. The data latch can always be written,
regardless of the state of its data. Table 13-8 summarizes the operation of the port H pins.
Table 13-8. Port H Pin Functions
DDRH
Bit
0
1
PTH
Bit
X(1)
X
I/O Pi
Mode
Input, Hi-Z(2)
Output
Accesses to DDRH
Read/Write
DDRH[1:0]
DDRH[1:0]
1. X = don’t care
2. Hi-Z = high impedance
3. Writing affects data register, but does not affect input.
Accesses to PTH
Read
Write
Pin
PTH[1:0](3)
PTH[1:0]
PTH[1:0]
MC68HC08AZ32A Data Sheet, Rev. 2
170
Freescale Semiconductor