English
Language : 

MC68HC705JJ7 Datasheet, PDF (60/164 Pages) Freescale Semiconductor, Inc – Microcontrollers
Parallel Input/Output
7.3.4 Port B Logic
All port B pins have the general I/O port logic similar to port A; but they also share this function with inputs
or outputs from other modules, which are also attached to the pin itself or override the general I/O
function. PB0, PB1, PB2, and PB3 simply share their inputs with another module. PB4, PB5, PB6, and
PB7 will have their operation altered by outputs or controls from other modules.
7.3.5 PB0, PBI, PB2, and PB3 Logic
The typical I/O logic shown in Figure 7-8 is used for PB0, PB1, PB2, and PB3 pins of port B. When these
port B pins are programmed as an output, reading the port bit actually reads the value of the data latch
and not the voltage on the pin itself. When these port B pins are programmed as an input, reading the port
bit reads the voltage level on the pin. The data latch can always be written, regardless of the state of its
DDRB bit. The operations of the PB0–PB3 pins are summarized in Table 7-2.
READ $0005
WRITE $0005
DATA DIRECTION
REGISTER B
R
BIT DDRBx
ANALOG SUBSYSTEM,
AND PROGRAMMABLE
TIMER INPUT CAPTURE
(PINS PB0, PB1, PB2, PB3)
WRITE $0001
PORT BDATA
REGISTER
PBx
BIT PBx
READ $0001
WRITE $0011
RESET
PULLDOWN
REGISTER B
R
BIT PDIBx
MASK OPTION REG. ($1FF1)
Figure 7-8. PB0–PB3 Pin I/O Circuit
PULLDOWN
DEVICE
The PB0–PB3 pins share their inputs with another module. When using the other attached module, these
conditions must be observed:
1. If the DDRB configures the pin as an output, then the port data register can provide an output which
may conflict with any external input source to the other module. The pulldown device will be
disabled in this case.
2. If the DDRB configures the pin as an input, then reading the port data register will return the state
of the input in terms of the digital threshold for that pin (analog inputs will default to logic states).
3. If DDRB configures the pin as an input and the pulldown device is activated for a pin, it will also
load the input to the other module.
4. If interaction between the port logic and the other module is not desired, the pin should be
configured as an input by clearing the appropriate DDRB bit. The input pulldown device is disabled
by clearing the appropriate PDRB bit (or by disabling programmable pulldowns with the SWPDI bit
in the MOR).
MC68HC705JJ7 • MC68HC705JP7 Advance Information Data Sheet, Rev. 4.1
60
Freescale Semiconductor