GENERAL PURPOSE I/O CONFIGURATION
5 - 6
PORT B
MOTOROLA
transfer and uses a temporary holding register. The MOVEP instruction is specifically
designed for I/O data transfer as shown in Figure 5-6. Although the MOVEP instruc-
tion may take twice as long to execute as a MOVE instruction, only one MOVEP is
required for a memory-to-memory data transfer, and MOVEP does not use a tempo-
rary register. Using the MOVEP instruction allows a fast interrupt to move data to/from
a peripheral to memory and execute one other instruction or move the data to an abso-
lute address. MOVEP is the only memory-to-memory move instruction; however, one
of the operands must be in the top 64 locations of either X: or Y: memory.
The bit-oriented instructions that use I/O short addressing (BCHG, BCLR, BSET, BTST,
JCLR, JSCLR, JSET, and JSSET) can also be used to address individual bits for faster
I/O processing. The digital signal processor (DSP) does not have a hardware data strobe
to strobe data out of the GPIO port. If a strobe is needed, it can be implemented using
software to toggle one of the GPIO pins.
PORT
REGISTERS
HI INPUT DATA BIT
HI DATA DIRECTION BIT
HI OUTPUT DATA BIT
PORT INPUT DATA BIT
Port Control
Register Bit
Data Direction
Register Bit
Pin Function
0
0
Port Input Pin
PIN
PORT B DATA (PBD)
REGISTER BIT
DATA DIRECTION
REGISTER (PBDDR) BIT
PORT B CONTROL
REGISTER (PBC) BIT
(GPIO
POSITION)
(INPUT
POSITION)
PERIPHERAL
LOGIC
Figure 5-4 Port B I/O Pin Control Logic
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..