Datasheet

Registers
MC68HC812A4 Data Sheet, Rev. 7
Freescale Semiconductor 65
6.3.3 Port B Data Register
Read: Anytime, if register is in the map
Write: Anytime, if register is in the map
Bits PB7–PB0 correspond to address lines ADDR7–ADDR0. When this port is not used for external
addresses such as in single-chip mode, these pins can be used as general-purpose I/O. DDRB
determines the primary direction of each pin. This register is not in the on-chip map in expanded and
peripheral modes.
6.3.4 Port B Data Direction Register
Read: Anytime, if register is in the map
Write: Anytime, if register is in the map
This register determines the primary direction for each port B pin when functioning as a general-purpose
I/O port. DDRB is not in the on-chip map in expanded and peripheral modes.
1 = Associated pin is an output.
0 = Associated pin is a high-impedance input.
Address: $0001
Bit 7654321Bit 0
Read:
PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0
Write:
Reset:00000000
Expanded and peripheral: ADDR7 ADDR6 ADDR5 ADDR4 ADDR3 ADDR2 ADDR1 ADDR0
Figure 6-3. Port B Data Register (PORTB)
Address: $0003
Bit 7654321Bit 0
Read:
DDRB7 DDRB6 DDRB5 DDRB4 DDRB3 DDRB2 DDRB1 DDRB0
Write:
Reset:00000000
Figure 6-4. Port B Data Direction Register (DDRB)