English
Language : 

MC68HC705JJ7 Datasheet, PDF (59/164 Pages) Freescale Semiconductor, Inc – Microcontrollers
Port B
PB0-PB7 — Port B Data Bits
These read/write bits are software programmable. Data direction of each bit is under the control of the
corresponding bit in data direction register B. Reset has no effect on port B data.
7.3.2 Data Direction Register B
The contents of the port B data direction register (DDRB) determine whether each port B pin is an input
or an output. Writing a logic 1 to a DDRB bit enables the output buffer for the associated port B pin. A
DDRB bit set to a logic 1 also disables the pulldown device for that pin. Writing a logic 0 to a DDRB bit
disables the output buffer for the associated port B pin. A reset initializes all DDRB bits to logic 0s,
configuring all port B pins as inputs.
Address: $0005
Bit 7
6
5
4
3
2
1
Read:
Write:
Reset:
DDRB7
0
DDRB6
0
DDRB5
0
DDRB4
0
DDRB3
0
DDRB2
0
DDRB1
0
Figure 7-6. Data Direction Register B (DDRB)
Bit 0
DDRB0
0
DDRB7–DDRB0 — Port B Data Direction Bits
These read/write bits control port B data direction. Reset clears the bits DDRB7–DDRB0.
1 = Corresponding port B pin configured as output and pulldown device disabled
0 = Corresponding port B pin configured as input
7.3.3 Pulldown Register B
All port B pins can have software programmable pulldown devices enabled or disabled globally by the
SWPDI bit in the MOR. These pulldown devices are individually controlled by the write-only pulldown
register B (PDRB) shown in Figure 7-7. Clearing the PDIB7–PDIB0 bits in the PDRB turns on the pulldown
devices if the port B pin is an input. Reading the PDRB returns undefined results since it is a write-only
register. Reset clears the PDIB7–PDIB0 bits, which turns on all the port B pulldown devices.
Address: $0011
Bit 7
6
5
4
3
2
1
Bit 0
Read:
Write: PDIB7 PDIB6 PDIB5 PDIB4 PDIB3 PDIB2 PDIB1
DIB0
Reset:
0
0
0
0
0
0
0
0
= Unimplemented
Figure 7-7. Pulldown Register B (PDRB)
PDIB7–PDIB0 — Port B Pulldown Inhibit Bits
Writing to these write-only bits controls the port B pulldown devices. Reading these pulldown register
B bits returns undefined data. Reset clears bits PDIB7–PDIB0.
1 = Corresponding port B pin pulldown device turned off
0 = Corresponding port B pin pulldown device turned on if pin has been programmed by the DDRB
to be an input
MC68HC705JJ7 • MC68HC705JP7 Advance Information Data Sheet, Rev. 4.1
Freescale Semiconductor
59