GENERAL PURPOSE I/O CONFIGURATION
MOTOROLA
PORT B
5 - 9
second instruction effectively produces an external 39-bit write each instruction cycle with
only one instruction cycle lost in setup time:
MOVE
DATA15,X:PORTB
MOVE
DATA15,X:PORTB
DATA24,Y:EXTERN
MOVE
DATA15,X:PORTB
DATA24,Y:EXTERN
:
:
MOVE
DATA15,X:PORTB
DATA24,Y:EXTERN
NOP
DATA24,Y:EXTERN
One application of this technique is to create an extended address for Port A by concate-
nating the Port A address bits (instead of data bits) to the Port B general-purpose output
bits. The Port B general-purpose I/O register would then work as a base address register,
allowing the address space to be extended from 64K words (16 bits) to two billion words
(16 bits +15 bits = 31 bits).
* * *
*
*
* *
*
* *
* *
*
BC
0
BD
0
BD
1
BD
2
BD
3
BD
4
BD
5
BD
6
BD
7
BD
8
BD
9
BD
10
BD
11
BD
12
BD
13
*
*
BD
14
PB
0
PB
1
PB
2
PB
3
PB
4
PB
5
PB
6
PB
7
PB
8
PB
9
PB
10
PB
11
PB
12
PB
13
*
PB
14
STEP 1. ACITIVATE PORT B FOR GENERAL - PURPOSE I/O:
SET BITS 0 AND 1 TO ZERO
X:$FFE0
15
0
PORT B
CONTROL REGISTER (PBC)
X:$FFE2
PORT B DATA DIRECTION
REGISTER (PBDDR)
15
0
STEP 2. SET INDIVIDUAL PINS TO INPUT OR OUTPUT:
BDxx = 0
INPUT
OR
BDxx = 1
OUTPUT
15
0
X:$FFE4
PORT B DATA
REGISTER (PBD)
*Reserved; write as zero.
STEP 3. WRITE OR READ DATA:
PBxx
INPUT IF BDxx = 0
OR
PBxx
OUTPUT IF BDxx = 1
Figure 5-7 I/O Port B Configuration
BC
1
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
.
..
Содержание DSP56002
Страница 380: ......
Страница 382: ......
Страница 390: ...Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc...