
Application Note
M68HC12 Operating Modes
AN2104
9
These examples deal with the levels on the BKGD, MODA, and MODB
pinsduringaresettodeterminewhichmodethepartwillcomeupin.The
user can also change the mode of operation by writing to the mode
register after the part is powered up. See
Figure 5
.
The MODE register can be read at any time. However, writing to this
register presents some restrictions. First, if the part comes up in the
normal mode, it can be changed only to another normal mode. This
change can be done only once.
The special mode does not have this limitation, since the values of the
MODA and MODB pins can be changed as many times as desired as
long as the part remains in special mode.
Next, coming up in the special mode, the part can change to the normal
mode, but must write to the SMODN bit in this register two times, as the
first write is ignored.
Table 4. Mode Selection
BKGD
MODB
MODA
Mode
Port A
Port B
0
0
0
Special single chip
General-
purpose I/O
General-
purpose I/O
0
0
1
Special expanded narrow
ADDR[15:8]
DATA[7:0]
ADDR[7:0]
0
1
0
Special peripheral
ADDR
DATA
ADDR
DATA
0
1
1
Special expanded wide
ADDR
DATA
ADDR
DATA
1
0
0
Normal single chip
General-
purpose I/O
General-
purpose I/O
1
0
1
Normal expanded narrow
ADDR[15:8]
DATA[7:0]
ADDR[7:0]
1
1
0
Reserved
(forced to peripheral)
—
—
1
1
1
Normal expanded wide
ADDR
DATA
ADDR
DATA
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.