Datasheet
Registers
M68HC12B Family Data Sheet, Rev. 9.1
Freescale Semiconductor 87
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 are associated with addresses ADDR7–ADDR0 and DATA7–DATA0. When port B is not
used for external addresses and data 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: Unaffected by reset
Alternate functions:
Expanded wide and peripheral:
ADDR7
DATA7
ADDR6
DATA6
ADDR5
DATA5
ADDR4
DATA4
ADDR3
DATA3
ADDR2
DATA2
ADDR1
DATA1
ADDR0
DATA0
Expanded narrow: ADDR7 ADDR6 ADDR5 ADDR4 ADDR3 ADDR2 ADDR1 ADDR0
Figure 6-3. Port B Data Register (PORTB)
Address:
$0003
Bit 7654321Bit 0
Read:
DDB7 DDB6 DDB5 DDB4 DDB3 DDB2 DDB1 DDB0
Write:
Reset:00000000
Figure 6-4. Port B Data Direction Register (DDRB)
