While every effort has been made to ensure the accuracy of all information in
this document, Motorola assumes no liability to any party for any loss or
damage caused by errors or omissions or by statements of any kind in this
document, its updates, supplements, or special editions, whether such errors are
omissions orstatementsresultingfromnegligence, accident, or any other cause.
M
O
C
I
Motorola further assumes no liability arising out of the application or use of any
information,product, or system described herein: nor any liability for incidental
or consequential damages arising from the use of this document. Motorola
disclaims all warranties regarding the information contained herein, whether
R
E
E
S
expressed, implied, or statutory, including implied warranties of
merchantability or fitness for a particular purpose. Motorola makes no
representation that the interconnection of products in the manner described
herein will not infringe on existing or future patent rights, nor do the
descriptions contained herein imply the granting or license to make, use or sell
H
C
equipment constructed in accordance with this description.
R
A
Trademarks
D
E
V
I
This document includes these trademarks:
Motorola and the Motorola logo are registered trademarks
of Motorola, Inc.
This user’s manual provides the necessary information for using the
M68HC12A4EVB evaluation board (EVB), an evaluation, debugging, and
code-generation tool for the MC68HC812A4 microcontroller units (MCU).
Reference items, such as schematic diagrams and parts lists, are shipped as part
of the EVB package.
E
E
R
F
M
ESE
N
O
C
I
1.3 General Description and Features
The EVB is an economical tool for designing and debugging code for and
evaluating the operation of the M68HC12 MCU Family. By providing the
essential MCU timing and input/output (I/O) circuitry, the EVB simplifies user
evaluation of prototype hardware and software.
The board consists of an 8-inch by 8-inch multi-layer printed circuit board
(PCB) that provides the platform for interface and power connections to the
MC68HC812A4 MCU chip, which is installed in a production socket.
Figure 1-1 shows the EVB’s layout and locations of the major components, as
viewed from the component side of the board.
The block diagram in Figure 1-2 depicts the logical relationships and
interconnections within the EVB and with external equipment.
Hardware features of the EVB include:
•Power, ground, and four signal planes
•Single-supply +3- to +5-Vdc power input (J6)
•Two RS-232C interfaces
•Two memory sockets populated with two 32-Kbyte x 8-bit EPROMs
•Two memory sockets populated with two 8-Kbyte x 8-bit SRAMs
E
V
I
H
C
A
R
•Support for up to 1 MByte of program space and 512 Kbytes of data
•16-MHz crystal-controlled clock oscillator (Y2) in a socket that can
•Headers for jumper selection of hardware options (for full details of the
.
C
N
I
,
R
O
T
C
U
D
N
O
C
I
M
ESE
L
A
C
S
E
E
B
Y
R
F
(U7 and U9A), containing the D-Bug12 monitor program
D
(U4 and U6A)
space using optional memory configurations
accommodate optional 8- or 14-pin oscillator chips (XY2)
PA [7:0]
PB [7:0]
PC [7:0]
PD [7:0]
PE [6:0]
PG [5:0]
PE2/RW
PE3/LSTRB
M68HC12A4EVB
RS-232C
TRANSCEIVER
C
U
D
N
S2 – PROGRAM ABORT
GLUE
LOGIC
Figure 1-2. System Block Diagram
,
R
O
T
CLOCK
EXTERNAL
ROM
AND
RAM
General Information
Performance Notes
J3
TERMINAL
.
J2
SPARE
C
N
I
J6
POWER
J5
BDM INTERFACE
Freescale Semiconductor, I
1.4 Performance Notes
The M68HC12A4EVB’s external RAM memory chips, U4 and U6A, were
chosen to emphasize the EVB’s low-voltage and low-power operational
capability over the range of +3.5 to +5.0 Vdc.
However, these parts are not fast enough to operate at the 16-MHz speed of the
factory-supplied clock oscillator. To use them at this external clock speed, the
D-Bug12 startup code programs the MCU’s RAM chip select to insert one wait
state into each access of external RAM. Thus, when programs are run from
external RAM, performance is approximately 40 percent slower than it would
be if the RAM chips were fast enough to run without wait states. Typical
software performance improvements of 80 to 95 percent can be realized with
faster external RAM.
For high-speed performance, the factory-supplied RAM devices may be
replaced with faster parts that allow programs to execute at the full external
clock speed. Two steps are required for this:
1.Replace the RAM devices, U4 and U6A, with faster parts.
2.Modify the RAM chip select to eliminate the wait state (E-clock stretch).
Detailed instructions for these procedures are found in 2.7 Using Fast External
RAM.
Programsthat execute exclusively from theMCU’s on-chip RAM and EEPROM
alwaysrun at the fullclock speed. No wait states are introduced when accessing
these areas.
Table 3-5. Factory-Configuration Memory Map, the default memory map,
E
V
I
depicts the addresses of the EVB’s different memory areas.
H
C
R
A
The EVB is factory-configured to execute D-Bug12, the EPROM-resident
monitor program, without further configuration by the user. It is ready for use
with an RS-232C terminal for writing and debugging user code. Follow the
setup instructions in Section 2. Configuration and Setup to prepare for
operation.
Optionally, the EVB can accommodate various types and configurations of
external memory to suit a particular application’s requirements. These custom
configurations are made by installing the appropriate memory chips in the
EVB’s memory sockets and by setting jumpers on the EVB to correctly
establish the MC68HC812A4’s memory-access operations. Table 1-1 lists the
allowable sizes and types of memory. For the correct jumper settings, refer to
The D-Bug12 operating instructions in this manual presume the factory-default
memory configuration. Other configurations require different
operating-software arrangements.
For More Information On This Product,
Go to: www.freescale.com
..
.
nc
NOTE:
A
Freescale Semiconductor, Inc.
The MC68HC812A4’s two serial communications interface (SCI) ports are
associated with separate RS-232C interfaces. D-Bug12 uses one of the SCIs for
communications with the user terminal (jumper-selectable, SCI0 by default).
The second SCI port is available for user applications. For information on the
ports and their connectors, refer to 2.5 EVB to Terminal Connection and 4.5
Terminal Interface.
If the MCU’s single-wire background debug mode (BDM) interface serves as
the user interface, both of the SCI ports become available for user applications.
This mode requires a background debug development tool, such as Motorola’s
serial debug interface (SDI), and a host computer with the appropriate interface
software. For more information, refer to Appendix F. SDI Configuration and
tothe Serial Debug Interface User’s Manual, Motoroladocument order number
SDIUM/D.
D-Bug12 does not use the BDM interface.
Two methods may be used to generate EVB user code:
E
•For small programs or subroutines, D-Bug12’s single-line
V
I
H
C
R
•For larger programs, the Motorola MCUez assembler may be used on
The EVB features a prototype area, which allows custom interfacing with the
MCU’s I/O and bus lines. These connections are broken out via headers J8 and
J9, which are immediately adjacent to the prototype area as shown in
Figure 1-1.
General Information
Functional Overview
.
C
N
I
,
R
O
T
C
U
D
N
O
C
I
M
ESE
L
A
C
S
E
E
R
F
Y
B
D
assembler/disassembler may be used to place object code directly into
the EVB’s memory.
a host computer to generate S-record object files, which then can be
loaded into the EVB’s memory using D-Bug12’s LOAD command.
An on-board push-button switch, S1, provides for resetting the EVB hardware
and restarting D-Bug12. Another on-board switch, S2, allows aborting the
execution of a user program, useful in regaining control of a runaway program.
Both of these switch functions are available for customized use in the prototype
area.
The EVB can begin operation in either of two jumper-selectable (W20) modes
at reset. In normal mode, D-Bug12 immediately issues its command prompt on
the terminal display and waits for a user entry. In the alternate mode, execution
For More Information On This Product,
Go to: www.freescale.com
General Information
Freescale Semiconductor, Inc.
begins directly with the user code in on-chip EEPROM. This hardware function
is also available for customized use in the prototype area.
D-Bug12 allows programming of the MC68HC812A4’s on-chip EEPROM
through commands that directly alter memory. For full details of all the
commands, refer to 3.6 D-Bug12 Command Set.
Because the MCU must manage the EVB hardware and execute D-Bug12 in
addition to serving as the user-application processor, there are a few restrictions
on its use. For more information, refer to 3.10 Operational Limitations.
1.6 External Equipment Requirements
..
.
nc
NOTE:
Freescale Semiconductor, I
In addition to the EVB, the following user-supplied external equipment is
required:
•Power supply — See Table 1-1 for voltage and current requirements.
Table 1-1 indicates that EVB operation at +3.0 Vdc requires the slower clock
speed of 8 MHz. This limitation applies to programs (including the operating
firmware, D-Bug12) that use external memory.
If an application program uses on-chip RAM and EEPROM exclusively — for
H
C
instance, if external memory is not used — the clock speed can remain at
–Host computer with RS-232C serial port — Allows off-board code
assembly that can be loaded into the EVB’s memory. Requires a
user-supplied communications program capable of emulating a
dumb terminal. Examples of acceptable communications programs
are given in Appendix B. Communications Program Examples.
F
R
E
E
S
C
A
ESE
L
M
.
C
N
I
,
R
O
T
C
U
D
N
O
C
I
•Power-supply and terminal interconnection cables as required
For full details of equipment setup, cabling, and special requirements, refer to
–Host computer using the MCU’s BDM (background debug mode)
interface — Frees both of the MCU’s SCI ports for user applications.
Requires a background debug development tool, such as the
Motorola serial debug interface (SDI), and the appropriate interface
software
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
1.7 EVB Specifications
Table 1-1 lists the EVB specifications.
General Information
EVB Specifications
Table 1-1. EVB Specifications
..
.
nc
CharacteristicSpecifications
MCUMC68HC812A4
SRAM maximum memory:
Wide mode
Narrow mode
ROM maximum memory:
EPROM:
Wide mode
Narrow mode
EEPROM:
Wide mode
Narrow mode
MCU I/O portsHCMOS compatible
Background debug mode interface2-row x 3-pin header
Communications portsTwo RS-232C DCE ports
Power requirements:
16-MHz clock source
8-MHz clock source
Prototype area:
Area
Holes
Board dimensions8 inches x 8 inches
A
R
C
H
E
V
I
16, 64, 256, or 1024 Kbytes
8, 32, 128, or 512 Kbytes
M
C
A
ESE
L
64, 128, 256, 512, or 1024 Kbytes
32, 64, 128, 256, or 512 Kbytes
S
E
E
64, 128, 256, or 512 Kbytes
R
F
32, 64, 128, or 256 Kbytes
Y
B
D
+3.5 to +5.0 Vdc @ 150 mA (max.), fuse-protected @ 1.5 A
+3.0 to +5.0 Vdc @ 150 mA (max.), fuse-protected @ 1.5 A
2 inches x 8 inches, approximately
79 wide x 20 high (0.1-inch centers)
Before beginning configuration and setup of the EVB:
Freescale Semiconductor, I
1.Verify that these items are present in the EVB package:
Section 2. Configuration and Setup
C
I
M
ESE
L
A
C
S
E
E
R
F
Y
B
D
E
•M68HC12A4EVB board assembly
O
N
D
U
C
T
O
R
,
.
C
N
I
M68HC12A4EVB Evaluation Board — Rev. 1User’s Manual
MOTOROLAConfiguration and Setup27
•Warranty and registration cards
•EVB schematic diagram and parts list
•M68HC12A4EVB User’s Manual
•MC68HC812A4 Technical Summary
•CPU12 Reference Manual
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Configuration and Setup
•MC68HC12 Family Brochure
•Using D-Bug12 Callable Routines
•Demo software
•Assembly language development toolset
..
.
nc
2.3 EVB Configuration
Freescale Semiconductor, I
2.Remove the EVB from its anti-static shipping bag.
3.Carefully remove the protective case and conductive foam that cover the
MCU and its socket during shipment.
C
U
C
O
N
D
4.Save all packing materials for storing and shipping the EVB.
5.Inspect the alignment of the MCU’s pins within its socket. If it appears
necessary to reseat the MCU:
ESE
L
E
S
C
A
a.Press down on two opposite sides of the MCU socket.
b.Gently press the MCU chip into place.
c.Release the MCU socket.
B
D
E
6.Verify that all other socketed parts are correctly seated.
V
I
H
C
R
A
Becausethe EVB has been factory-configuredto operate withD-Bug12, it is not
necessary to change any of the jumper settings to begin operating immediately.
Only one jumper (header W20) should be changed during the course of
factory-default EVB operation with D-Bug12:
•Pins 2 and 3 jumpered (default) — Normal execution mode. D-Bug12 is
executed from external EPROM upon reset. The D-Bug12 prompt
appears immediately on the terminal display.
Y
E
R
F
M
I
T
O
R
,
.
C
N
I
•Pins 1 and 2 jumpered — Alternate execution mode. User code is
Other jumper settings affect the hardware setup and/or MCU operational
modes. For an overview of all jumper-selectable functions, refer to 1.3 General
Description and Features. For details of the settings, see Table 4-1.
Jumper-Selectable Functions.
User’s ManualM68HC12A4EVB Evaluation Board — Rev. 1
28Configuration and SetupMOTOROLA
executedfrom on-chip EEPROMupon reset. For more information, refer
to 3.7 Alternate Execution from EEPROM.
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
2.4 EVB to Power Supply Connection
The EVB requires a user-provided external power supply. See Table 1-1. EVB
Specifications for the voltage and current specifications. For full details of the
EVB’s power-input circuitry, refer to 4.4 Power Input Circuitry.
Configuration and Setup
EVB to Power Supply Connection
..
.
nc
CAUTION:
A
Although fuse protection is built into the EVB, a power supply with
current-limiting capability is desirable. If this feature is available on the power
T
O
R
,
supply, set it to 200 mA.
N
D
U
C
Connect the external power supply to connector J6 on the EVB as shown in
Figure 2-1, using 20 AWG or smaller insulated wire. Strip each wire’s
insulation 1/4 inch from the end, lift the J6 contact lever to release tension on
the contact, insert the bare end of the wire into J6, and close the lever to secure
the wire. Observe the polarity carefully.
S
Do not use wire larger than 20 AWG in connector J6. Larger wire could
damage the connector.
E
V
I
H
C
R
D
Y
B
E
E
R
F
Figure 2-1. EVB Power Connector J6
C
A
ESE
L
M
O
C
I
.
C
N
I
Freescale Semiconductor, I
2.5 EVB to Terminal Connection
For factory-default operation, connect the terminal to J3 or J4 on the EVB, as
shown in Table 2-1. This setup uses the MCU’s SCI port 0 (SCI0) and its
associated RS-232C interface for communications with the terminal device.
To use SCI1 and the second RS-232C interface for the terminal, the EVB’s
hardware setup must be modified. For details, refer to 4.5 Terminal Interface.
M68HC12A4EVB Evaluation Board — Rev. 1User’s Manual
MOTOROLAConfiguration and Setup29
For More Information On This Product,
Go to: www.freescale.com
Configuration and Setup
..
.
nc
EVB Pins, Always DCE
(1)
J3
Receptacle
(1)
(2)
Freescale Semiconductor, I
(3)
(4)
(2)
/ J2
DB-9
22Receive data (RXD)2233
33Transmit data (TXD)3322
51Ground (GND)5757
Factory default. Terminal interface uses SCI0.
Optional. Terminal interface uses SCI1. Hardware modifications are required. For details, refer to 4.5 Terminal
Interface.
Normal (DCE-to-DTE) cable connections
Null modem (DCE-to-DCE) cable connections
(1)
J4
3-Pin
Header
A
/ J1
Freescale Semiconductor, Inc.
Standard, commercially available cables may be used in most cases. Note that
the EVB uses only three of the RS-232C signals. Table 2-1 lists these signals
and their pin assignments.
The EVB’s RS-232C connectors, J2 (default) and J3 (unpopulated footprint),
are wired as data circuit-terminating equipment (DCE) and employ 9-pin
subminiature D (DB-9) receptacles. The equivalent 3-pin headers, J1 and J4,
serve the same purposes and may be used for customized cabling.
,
R
U
C
T
O
Most terminal devices — whether dumb terminals or the serial ports on host
computers — are wired as data terminal equipment (DTE) and employ 9- or
25-pin subminiature D (DB-9 or DB-25) plugs. In these cases, normal
straight-through cabling is used between the EVB and the terminal. Adapters
M
I
C
O
N
D
.
C
N
I
are readily available for connecting 9-pin cables to 25-pin terminal connectors.
ESE
L
E
S
C
A
Terminal Pins
(3)
DTE
Plug
DB-9DB-25DB-9DB-25
DCE
Receptacle
(4)
If the terminal device is wired as DCE, the RXD and TXD lines must be
cross-connected, as shown in Table 2-1. Commercial null modem adapter
cables are available for this purpose.
B
D
Table 2-1. RS-232C Interface Cabling
E
V
I
H
C
R
(2)
DTE Signal
Y
E
R
F
Optionally, the MCU’s background debug mode (BDM) interface can serve as
the user interface. This setup makes both of the SCI ports available for user
applications. Additional hardware and software are required. For more
information, refer to the documentation for the background debug development
tool being used, such as Motorola’s serial debug interface.
NOTE:
User’s ManualM68HC12A4EVB Evaluation Board — Rev. 1
30Configuration and SetupMOTOROLA
D-Bug12 does not use the BDM interface.
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
2.6 Terminal Communications Setup
This section describes how to set up the terminal communications.
2.6.1 Communication Parameters
The EVB’s serial communications ports use the communication parameters
listedin Table 2-2. Of these, only thebaud rate canbe changed. For instructions
on changing it, refer to 2.6.4 Changing the Baud Rate.
..
.
nc
2.6.2 Dumb-Terminal Setup
2.6.3 Host-Computer Setup
Freescale Semiconductor, I
Configuring a dumb terminal for use with the EVB consists of setting its
V
I
H
parameters as shown in Table 2-2. Many terminals are configurable with
C
R
externally accessible switches, but the procedure differs between brands and
A
models. Consult the manufacturer’s instructions for the terminal being used.
One advantage of using a host computer as the EVB’s terminal is the ability to
generate code off-board, for subsequent loading into the EVB’s memory. It is
thus desirable for the host to be capable of runningprograms such as Motorola’s
MCUez assembler. For more information, see 3.8 Off-Board Code
Generation.
To serve as the EVB’s terminal, the host computer must have an RS-232C serial
port and an installed communications program capable of operating with the
parameters listed in Table 2-2.
E
D
B
Terminal Communications Setup
N
D
U
C
Table 2-2. Communication Parameters
M
O
C
I
Y
Baud Rate9600
Data Bits8
ESE
Stop Bits1
L
A
C
S
E
E
R
F
ParityNone
T
Configuration and Setup
.
C
N
I
,
R
O
Setting up the parameters is normally done within the communications
program, after it has been started on the host. Usually, the setup can be saved in
a configuration file so that it does not have to be repeated. Because procedures
vary between programs, consult the user’s guide for the specific program.
Appendix B. Communications Program Examples provides examples of
using some of the commonly available communications programs.
M68HC12A4EVB Evaluation Board — Rev. 1User’s Manual
MOTOROLAConfiguration and Setup31
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Configuration and Setup
2.6.4 Changing the Baud Rate
The EVB’s default baud rate for the RS-232C ports is 9600. This can be
changed in two ways:
•For temporary changes, use the D-Bug12 BAUD command. This change
remains in effect only until the next reset or power-up, when the baud
rate returns to 9600.
•For permanent changes, the D-Bug12 baud-rate initialization value
stored in EPROM must be modified. For instructions, refer to
..
.
Appendix D. D-Bug12 Customization Data and Appendix E.
Customizing the EPROMs.
nc
2.7 Using Fast External RAM
To replace the two factory-supplied SRAM chips with parts capable of
F
operation at the full 16-MHz external clock speed (8-MHz E-clock) with no
wait states, two operations are required:
H
C
R
A
2.7.1 Selecting and Replacing the RAM Chips
The replacement 8-Kbyte x 8-bit SRAM devices should have a chip-select
access time of less than 60 nanoseconds. An example of a device that has been
used successfully is the Integrated Device Technologies part number
Freescale Semiconductor, I
IDT7164L25P (8 Kbytes x 8 bits, 25 ns).
D
E
V
I
1.Replace the SRAM chips with suitably fast parts. See 2.7.1 Selecting
2.Reprogram the SRAM chip select,
Y
B
and Replacing the RAM Chips.
See 2.7.2 Reprogramming the RAM Chip Select.
R
E
E
S
C
A
ESE
L
M
.
C
N
I
,
R
O
T
C
U
D
N
O
C
I
CSD, for zero-wait-state operation.
When installing the replacement SRAM devices, make sure that their pins align
with the rightmost ends of sockets U4 and U6A, as viewed in Figure 1-1. EVB
Layout and Component Placement.
User’s ManualM68HC12A4EVB Evaluation Board — Rev. 1
32Configuration and SetupMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
2.7.2 Reprogramming the RAM Chip Select
Configuration and Setup
Using Fast External RAM
..
.
nc
NOTE:
A
NOTE:
Either of two methods may be used to reprogram the RAM chip select,
eliminate the wait state.
Before attempting either of the following methods, ensure that the EVB is
operating properly by following the startup instructions in 3.2 Startup.
Method A — Modifying the CSSTR0 register in memory (temporary)
This method may be used without altering the D-Bug12 startup code in
EPROM. However, it must be repeated each time the EVB is powered up or
M
O
C
I
reset.
Using D-Bug12’s MM (MEMORY MODIFY) command, change the value at
memory location $003E from $05 to $04.
S
E
Y
E
R
F
Method B — Modifying the D-Bug12 startup code in EPROM (permanent)
E
D
B
This method is accomplished by reprogramming a single byte in the
factory-supplied, one-time-programmable (OTP) EPROM, U7. An EPROM
V
I
H
programmer is required.
C
R
Method B does not work in reverse. If U7 has already been reprogrammed
using this technique, it cannot be restored to its original state.
If the EPROMs are to be customized in some other way — for example, to add
a user program or to modify another aspect of D-Bug12 — the change to
registerCSSTR0 can be made in the startupsource code. For more information,
refer to Appendix C. D-Bug12 Startup Code and Appendix E. Customizing
the EPROMs.
C
A
ESE
L
N
D
U
C
T
O
R
,
.
C
N
I
CSD, to
Freescale Semiconductor, I
M68HC12A4EVB Evaluation Board — Rev. 1User’s Manual
MOTOROLAConfiguration and Setup33
To permanently reprogram U7 for zero RAM wait states, follow these steps:
1.Remove power from the EVB.
2.Being careful not to bend any pins, remove U7 from its socket on the
3.Following the instructions and using the software for the EPROM
EVB and install it in the appropriate socket on the EPROM programmer.
programmer, perform the steps in procedure 1 or procedure 2, as
described here.
For More Information On This Product,
Go to: www.freescale.com
Configuration and Setup
Procedure 11.Select the Atmel Corporation’s device type AT27LV256R.
..
.
nc
A
Freescale Semiconductor, Inc.
Some EPROM programmers do not have an editable RAM buffer capable of
holding the entire contents of U7. Instead, they program EPROMs directly from
the contents of a disk file.
If the programmer being used has an editable RAM buffer large enough to hold
the contents of U7, use procedure 1. Otherwise, to reprogram U7 from a disk
file, use procedure 2.
2.Read the contents of U7 into the EPROM programmer’s editable RAM
3.Before modifying U7, save a copy of its contents to a disk file for backup
4.Change the contents of the programmer’s editable RAM buffer at
5.Reprogram U7 with the edited contents of the programmer’s RAM
E
V
I
H
6.Reinstall U7 in its socket on the EVB. Be sure that its pins align with the
C
R
7.Apply power to the EVB and press S1, the reset switch. The D-Bug12
8.Ensure that the modification was performed properly by using
.
C
N
I
,
R
O
T
C
U
D
buffer.
M
purposes.
S
E
Y
E
R
F
location $7ED6 from $05 to $04.
B
D
buffer.
rightmost end of its socket, as viewed in Figure 1-1. EVB Layout and
Component Placement.
prompt should appear on the terminal display.
D-Bug12’s MD command to examine the CSSTR0 register at memory
location $003E. It should contain the value $04.
C
A
ESE
L
N
O
C
I
Freescale Semiconductor, I
User’s ManualM68HC12A4EVB Evaluation Board — Rev. 1
34Configuration and SetupMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
..
.
nc
Freescale Semiconductor, Inc.
Procedure 21.Create a text file containing these two lines:
2.Select the Atmel Corporation’s device type AT27LV256R.
3.Before modifying U7, save a copy of its contents to a disk file for backup
4.Reprogram U7 with the contents of the text file created in step 1.
5.Reinstall U7 in its socket on the EVB. Be sure that its pins align with the
6.Apply power to the EVB and press S1, the reset switch. The D-Bug12
7.Ensure that the modification was performed properly by using
E
V
I
H
C
R
A
S1047E6D040C
S9030000FC
purposes.
T
C
U
C
O
N
D
rightmost end of its socket, as viewed in Figure 1-1. EVB Layout and
Component Placement.
ESE
S
C
A
L
prompt should appear on the terminal display.
E
E
B
Y
R
F
D-Bug12’s MD (MEMORY DISPLAY) command to examine the
CSSTR0 register at memory location $003E. It should contain the
D
value $04.
M
I
Configuration and Setup
Using Fast External RAM
.
C
N
I
,
R
O
Freescale Semiconductor, I
M68HC12A4EVB Evaluation Board — Rev. 1User’s Manual
MOTOROLAConfiguration and Setup35
For More Information On This Product,
Go to: www.freescale.com
Configuration and Setup
..
.
nc
A
R
Freescale Semiconductor, Inc.
E
V
I
H
C
D
O
C
I
M
ESE
L
A
C
S
E
E
R
F
Y
B
N
D
U
C
T
O
R
,
.
C
N
I
Freescale Semiconductor, I
User’s ManualM68HC12A4EVB Evaluation Board — Rev. 1
36Configuration and SetupMOTOROLA
The following startup procedure includes a checklist of configuration and setup
items from Section 2. Configuration and Setup. To begin operating the
M68HC12A4EVB, follow these steps:
E
V
1.Configure the EVB if required. See 2.3 EVB Configuration.
I
H
C
A
R
2.Determine whether execution should begin with the D-Bug12 monitor
3.Connect the EVB to the external power supply. See 2.4 EVB to Power
4.Connect the EVB to the terminal. See 2.5 EVB to Terminal
5.Configure the terminal communications interface. See 2.6 Terminal
.
C
N
I
,
R
O
T
C
U
D
N
O
C
I
M
ESE
L
A
C
S
E
E
R
F
Y
B
D
program (factory default) or with user code in on-chip EEPROM. Set the
jumper on header W20 accordingly. See 2.3 EVB Configuration and
3.7 Alternate Execution from EEPROM.
Supply Connection.
Connection.
Communications Setup.
6.Apply power to the EVB and to the terminal. If the terminal is a host
7.Reset the EVB by pressing and releasing the on-board reset switch (S1).
b.Start the communications program for terminal emulation. See
2.6.3 Host-Computer Setup and Appendix B. Communications
Program Examples.
For More Information On This Product,
Go to: www.freescale.com
..
.
nc
3.3 Reset
Freescale Semiconductor, Inc.
If the EVB is configured to execute D-Bug12 upon reset (factory default —
startup step 2), the D-Bug12 sign-on banner and prompt should appear on the
terminal’s display like this:
If the prompt does not appear, check all connections and verify that startup
steps 1 through 7 have been performed correctly.
When the prompt appears, D-Bug12 is ready to accept commands from the
terminal as described in 3.5 Using D-Bug12 Commands and 3.6 D-Bug12
Command Set.
If the EVB is configured to execute user code upon reset (startup step 2), the
codein on-chip EEPROMis executed immediately.For more information, refer
to 3.7 Alternate Execution from EEPROM.
E
V
I
Control can be returned to the D-Bug12 terminal prompt by doing one of these:
H
C
A
R
1.Terminating the user code with appropriate instructions; see
2.Activating the program-abort function; see 3.4 Program Abort
EVB operation can be restarted at any time by activating the hardware reset
function. Do this in one of two ways:
D-Bug12 v1.0.2
Copyright 1995 - 1996 Motorola Semiconductor
For Commands type “Help”
>
1.Press and release the on-board reset switch, S1 (always applicable).
2.If the hardware reset input has been customized in the prototype area,
Note that the EVB’s reset circuitry is associated with the low-voltage inhibit
(LVI) protection. For more information, refer to 4.10 Reset and
4.11 Low-Voltage Inhibit (LVI).
activate it in accordance with the custom circuitry.
For More Information On This Product,
Go to: www.freescale.com
Operation
3.4 Program Abort
Duringsoftware development, bugsin the codecan cause a program to get stuck
in an endless loop, thereby preventing proper response (for example, a crash).
In these situations, use the EVB’s program-abort function to return control of
execution to D-Bug12, which then displays the register contents at the point
where the user program was terminated.
Activating the program-abort function asserts the MCU’s
interrupt line. There are restrictions onits use under certain circumstances; refer
..
.
to 3.10 Operational Limitations.
Activate the program-abort function by doing one of these:
nc
•Press and release the on-board program-abort switch, S2.
•If the program-abort input has been customized in the prototype area,
NOTE:
3.5 Using D-Bug12 Commands
If the EVB is configured to begin execution from on-chip EEPROM, D-Bug12
jumps to the starting EEPROM address before performing all of its
V
I
H
initialization and is thus not operable. Do not activate the program-abort
C
R
A
function under these conditions. Instead, move the jumper on header W20 to
pins 2 and 3 and activate the reset function to return control to D-Bug12.
D-Bug12, the EVB’s firmware-resident monitor program, provides a
self-contained operating environment that allows writing, evaluation, and
debugging of user programs.
Freescale Semiconductor, Inc.
E
T
C
U
D
N
O
C
I
M
ESE
L
A
C
S
E
Y
E
R
F
activate it in accordance with the custom circuitry.
Commands are typed on the terminal’s D-Bug12 prompt line and executed
when the carriage-return (
the appropriate response to the command or an error indication.
ENTER) key is pressed. D-Bug12 then displays either
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
The D-Bug12 command-line prompt is the greater than sign (>). Type the
command and any other required or optional fields immediately after the
prompt, like this:
Operation
Using D-Bug12 Commands
..
.
nc
Freescale Semiconductor, I
Command-Line
Syntax:
A
R
<
command
Where:
<
command
<
parameter
ENTERis the terminal keyboard’s carriage-return or ENTER
•The command-line syntax is illustrated using the following special
charactersfor clarification. Do not type these characters on the command
line:
< >required syntactical element
[ ]optional field
D
E
V
I
C
H
...[ ]repeated optional fields
•Fields are separated by any number of space characters.
•All numeric fields, unless noted otherwise, are interpreted as
hexadecimal.
•Command-line entries are case-insensitive and may be typed using any
combination of upper- and lower-case letters.
•A maximum of 80 characters, including the terminating carriage return,
may be entered on the command line. After the 80th character, D-Bug12
automatically terminates the command-line entry and processes the
characters entered to that point.
B
Y
> [<
R
F
parameter
>is the command mnemonic.
> is an expression or address.
key.
L
A
C
S
E
E
ESE
>] ...[<
C
I
M
O
parameter
U
D
N
C
T
O
R
,
N
I
>]ENTER
.
C
•Before the
Table 3-1 summarizes the D-Bug12 commands. For detailed descriptions of
The assembler/disassembler is an interactive memory editor that allows
memory contents to be viewed and altered using assembly language
mnemonics. Each entered source line is translated into object code and placed
into memory at the time of entry. When displaying memory contents, each
instruction is disassembled into its source mnemonic form and displayed along
with the hexadecimal object code and any instruction operands.
Assembler mnemonics and operands may be entered in any mix of upper- and
F
lower-case letters. Any number of spaces may appear between the assembler
prompt and the instruction mnemonic or between the instruction mnemonic and
the operand. Numeric values appearing in the operand field are interpreted as
H
C
signed decimal numbers. Placing a $ in front of any number will cause the
R
A
number to be interpreted as a hexadecimal number.
When an instruction is disassembled and displayed, the D-Bug12 prompt is
displayed following the disassembled instruction. If a carriage return is the first
non-space character entered following the prompt, the next instruction in
memory is disassembled and displayed on the next line.
If a CPU12 instruction is entered following the prompt, the entered instruction
is assembled and placed into memory. The line containing the new entry is
erased and the new instruction is disassembled and displayed on the same line.
The next instruction location is then disassembled and displayed on the screen.
D
E
V
I
Y
B
Address
>is a 16-bit hexadecimal number.
E
E
R
S
C
A
>
ESE
L
M
,
R
O
T
C
U
D
N
O
C
I
.
C
N
I
The instruction mnemonics and operand formats accepted by the assembler
follows the syntax as described in the CPU12 Reference Manual, Motorola
document order number CPU12RM/AD.
A number of M68HC11 instruction mnemonics appear in the CPU12 Reference
Manual that do not have directly equivalent CPU12 instructions. These
mnemonics, listed in Table 3-2, are translated into functionally equivalent
.
C
N
I
Instruction
..
.
nc
CPU12 instructions. To aid the current M68HC11 users who may desire to
T
O
R
,
continue using the M68HC11 mnemonics, the disassembler portion of the
assembler/disassembler recognizes the functionally equivalent CPU12
instructions and disassembles those instructions into the equivalent M68HC11
mnemonics.
When entering branch instructions, the number placed in the operand field
should be the absolute destination address of the instruction. The assembler
calculates the two’s-complement offset of the branch and places the offset in
memory with the instruction.
The assembly/disassembly process may be terminated by entering a period (.)
as the first non-space character following the assembler prompt.
H
C
R
A
D
E
V
I
M68HC11
Mnemonic
CLCANCC # $FEINSLEAS 1, S
SECORCC # $01TSXTFR S, X
F
Y
B
Table 3-2. M68HC11 to CPU12 Instruction Translation
This section describes the operand format used by the assembler when
assembling CPU12 instructions. The operand format accepted by the assembler
is described separately in the CPU12 Reference Manual. Rather than describe
the numeric format accepted for each instruction, some general rules are used.
Exceptions and complicated operand formats are described separately.
In general, anywhere the assembler expects a numeric value in the operand
H
C
field, either a decimal or hexadecimal value may be entered. Decimal numbers
R
are entered as signed constants having a range of –32,768 to 65,535. A leading
minus sign (–) indicates negative numbers; the absence of a leading minus sign
indicates a positive number. A leading plus sign (+) is not allowed.
Hexadecimal numbers must be entered with a leading dollar sign ($) followed
by one to four hexadecimal digits. The default number base is decimal.
For all branching instructions (Bcc, LBcc, BRSET, BRCLR, DBEQ, DBNE,
IBEQ, IBNE, TBEQ, and TBNE), the number entered as the branch address
portion of the operand field is the absolute address of the branch destination.
The assembler calculates the two’s-complement offset to be placed in the
assembled object code.
The operand format used by the disassembler is described separately in the
CPU12 Reference Manual. Rather than describing the numeric format used for
each instruction, some general rules are applied. Exceptions and complicated
operand formats are described separately.
All numeric values disassembled as hexadecimal numbers are preceded by a
dollar sign ($) to avoid being confused with values disassembled as signed
decimal numbers.
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
D-Bug12 Command Set
Assemble Instructions (Continued)ASM
For all branching instructions (Bcc, LBcc, BRSET, BRCLR, DBEQ, DBNE,
IBEQ, IBNE, TBEQ, TBNE), the numeric value of the address portion of the
operand field is displayed as the hexadecimal absolute address of the branch
.
C
N
I
..
.
nc
destination.
,
C
T
O
R
All offsets used with indexed addressing modes are disassembled as signed
decimal numbers.
All addresses, whether direct or extended, are disassembled as 4-digit
hexadecimal numbers.
ESE
S
C
A
L
All 8-bit mask values (BRSET/BRCLR/ANDCC/ORCC) are disassembled as
2-digit hexadecimal numbers.
All 8-bit immediate values are disassembled as hexadecimal numbers.
E
All 16-bit immediate values are disassembled as hexadecimal numbers.
The BAUD command is used to change the communications rate of the SCI
used by D-Bug12 for the terminal interface.
Restrictions:Because the <
unsigned integer, baud rates greater than 65,535 baud cannot be set using this
command. The SCI baud rate divider value for the requested baud rate is
calculated using the M clock value supplied in the customization data area.
Because the SCI baud rate divider is a 13-bit counter, certain baud rates may not
be supported at particular M clock frequencies. If the value calculated for the
SCI’s baud rate divider is equal to 0 or greater than 8191, command execution
E
V
I
is terminated and the communications baud rate is not changed.
H
C
R
A
Example:>
Y
B
D
BAUD 50
Invalid BAUD Rate
>BAUD 38400
Change Terminal BR, Press Return
>
BAUDRate
>is an unsigned 16-bit decimal number.
BAUDRate
C
S
E
E
R
F
>
.
C
N
I
,
R
O
T
C
U
D
N
O
C
> parameter supplied on the command line is a 16-bit
The BR command is used to set a software breakpoint at a specified address or
to display any previously set breakpoints. The function of a breakpoint is to halt
user program execution when the program reaches the breakpoint address.
When a breakpoint address is encountered, D-Bug12 disassembles the
instruction at the breakpoint address, prints the CPU12’s register contents, and
waits for a D-Bug12 command to be entered by the user.
Breakpoints are set by typing the breakpoint command followed by one or more
breakpoint addresses. Entering the breakpoint command without any
B
V
E
D
breakpoint addresses will display all the currently set breakpoints.
I
H
Restrictions:D-Bug12 implements the breakpoint function by replacing the instruction
C
R
A
opcode at the breakpoint address in the user’s program with an SWI instruction.
For this reason, a breakpoint may not be set on a user SWI instruction.
Breakpoints may only be set at an opcode address, and breakpoints may only be
placed at memory addresses in modifiable memory.
Even though D-Bug12 supports a maximum of 10 user-defined breakpoints, a
maximum of nine breakpoints may be set on the command line at one time.This
restriction is due to the limitation of the command line processor, which allows
a maximum of 10 command line arguments including the command string.
The CALL command is used to execute a subroutine and return to the D-Bug12
monitor program when the final RTS of the subroutine is executed. When
control is returned to D–Bug12, the CPU register contents are displayed. All
CPU registers contain the values at the time the final RTS instruction was
executed, with the exception of the program counter (PC). The PC contains the
starting address of the subroutine. If a subroutine address is not supplied on the
command line, the current value of the PC is used as the starting address.
NOTE:
Restrictions:If the called subroutine modifies the value of the stack pointer during its
Example:
No user breakpoints are placed in memory before execution is transferred to
user code.
E
V
I
H
C
R
A
execution, it must restore the stack pointer’s original value before executing the
final RTS of the called subroutine. This restriction is required because a return
addressis placed on theuser’s stack that returns to D-Bug12 when the final RTS
of the subroutine is executed. Obviously, any subroutine must obey this
restriction to execute properly.
The G command is used to begin the execution of user code in real time. Before
beginning execution of user code, any breakpoints that were set with the BR
command are placed in memory. Execution of the user program continues until
a user breakpoint is encountered, a CPU exception occurs, or the EVB’s reset
or program-abort switch is pressed.
When user code halts for any of these reasons (except reset, which wipes the
slate clean) and control is returned to D-Bug12, a message is displayed
explaining the reason for user program termination. In addition, D-Bug12
disassembles the instruction at the current program counter (PC) address, prints
V
the CPU12’s register contents, and waits for the next D-Bug12 command to be
I
H
C
entered by the user.
R
A
If a starting address is not supplied in the command line parameter, program
execution will begin at the address defined by the current value of the PC.
The GT command is similar to the G command except that a temporary
breakpoint is placed at the address supplied on the command line. Any
breakpoints that were set by the use of the BR command are not placed in the
user code before program execution begins. Program execution begins at the
address defined by the current value of the program counter. When user code
reaches the temporary breakpoint and control is returned to D-Bug12, a
message is displayed explaining the reason for user program termination. In
addition,D-Bug12 disassembles the instruction at the current PC address, prints
the CPU12’s register contents, and waits for a command to be entered by the
user.
The HELP command is used to display a summary of the D-Bug12 command
.
C
N
I
..
.
nc
Freescale Semiconductor, I
set. Each command is shown along with its command line format and a brief
description of its function.
Restrictions:None
Example:
V
I
H
C
R
A
,
R
O
T
C
U
D
N
O
C
>HELP
ASM <Address> Single line assembler/disassembler
<CR> Disassemble next instruction
< . > Exit assembly/disassembly
BAUD <baudrate> Set communications rate for the terminal
BF <StartAddress> <EndAddress> [<data>]Fill memory with
data
F
BR [<Address>] Set/Display user breakpoints
Y
BULK Erase entire on-chip EEPROM contents
B
CALL [<Address>] Call user subroutine at <Address>
D
E
G [<Address>] Begin/continue execution of user code
GT <Address> Set temporary breakpoint at <Address> &
execute user code
HELP Display this D-Bug12 command summary
LOAD [<AddressOffset>] Load S-Records into memory
MD <StartAddress> [<EndAddress>] Memory Display Bytes
MDW <StartAddress> [<EndAddress>] Memory Display Words
MM <StartAddress> Modify Memory Bytes
< CR > Examine/Modify next location
< / > or < = > Examine/Modify same location
< ^ > or < – > Examine/Modify previous location
< . > Exit Modify Memory command
MMW <StartAddress>Modify Memory Words (same subcommands
as MM)
MOVE <StartAddress> <EndAddress> <DestAddress> Move a
block of memory
NOBR [<address>] Remove One/All Breakpoint(s)
RD Display all CPU registers
RM Modify CPU Register Contents
T [<count>] Trace <count> Instructions
UPLOAD <StartAddress> <EndAddress> S-Record Memory display
VERF [<AddressOffset>] Verify S-Records against memory
contents
<Register Name> <Register Value> Set register contents
Register Names: PC, SP, X, Y, A, B, D
CCR Status Bits: S, XM, H, IM, N, Z, V, C
>
The LOAD command is used to load S-record object files into memory from an
external device. The address offset, if supplied, is added to the load address of
each S record before its data bytes are placed in memory. Providing an address
V
E
D
offset other than 0 allows object code or data to be loaded into memory at a
location other than that for which it was assembled. During the loading process,
I
H
C
the S-record data is not echoed to the control console. However, for each
R
A
10 S records that are successfully loaded, an ASCII asterisk character (*) is sent
to the control console. When an S-record file has been loaded successfully,
control returns to the D-Bug12 prompt.
The LOAD command is terminated when D-Bug12 receives an S9 end of file
record. If the object file being loaded does not contain an S9 record, D-Bug12
does not return its prompt and continues to wait for the end of file record.
Pressing the reset switch returns D-Bug12 to its command line prompt.
B
Y
R
F
AddressOffset
}
> is an optional 16-bit hexadecimal number.
}is the host-computer communications program’s
utility for sending an ASCII (text) file. Refer to
Appendix B. Communications Program
Examples for examples.
The MDW command displays the contents of memory as hexadecimal words
and ASCII characters, 16-bytes on each line. The <
parameter must be supplied; the <
the <
EndAddress
The number supplied as the <
the next lower multiple of 16, while the number supplied as the
<
EndAddress
minus 1. This causes each line to display memory in the range of $xxx0 through
V
I
$xxxF. For example, if $205 is entered as the start address and $217 as the
H
C
ending address, the actual memory range displayed would be $200
The MEMORY MODIFY command allows the contents of memory to be
examined and/or modified as 8-bit hexadecimal data. If the 8-bit data parameter
is present on the command line, the byte at memory location <
replaced with <
the interactive memory modify mode. In the interactive mode, each byte is
displayed on a separate line following the data’s address. Once the MEMORY
MODIFY command has been entered, single-character subcommands are used
for the modification and verification of memory contents. These subcommands
have this format:
E
V
I
H
C
R
A
With the exception of the carriage return, the subcommand must be separated
from any entered data with at least one space character. If an invalid
subcommand character is entered, an appropriate error message is issued and
the contents of the current memory location are redisplayed.
D
[<
[<
[<
[<
Y
B
Data
Data
Data
Data
Address
>is a16-bit hexadecimal number.
>is an optional 8-bit hexadecimal number.
Data
E
R
F
>] <CR>Optionally, update current location and
>] </> or <=>Optionally, update current location and
>] <^> or <->Optionally, update current location and
>] <.>Optionally, update current location and
> [<
> and the command is terminated. If not, D-Bug12 enters
The MMW command allows the contents of memory to be examined and/or
modified as 16-bit hexadecimal data. If the 16-bit data parameter is present on
the command line, the word at memory location <
<
Data
memory modify mode. In the interactive mode, each word is displayed on a
separate line following the data’s address. Once the MMW command has been
entered, single-character subcommands are used for the modification and
verification of memory contents. These subcommands have this format:
D
E
[<
V
I
H
C
R
A
[<
[<
[<
With the exception of the carriage return, the subcommand must be separated
from any entered data with at least one space character. If an invalid
subcommand character is entered, an appropriate error message is issued and
the contents of the current memory location are redisplayed.
>is an optional 16-bit hexadecimal number.
> and the command is terminated. If not, D-Bug12 enters the interactive
F
Y
B
Data
Data
Data
Data
Address
>is a 16-bit hexadecimal number.
E
E
R
>] <CR>Optionally, update current location and
>] </> or <=>Optionally, update current location and
>] <^> or <->Optionally, update current location and
The NOBR command can be used to remove one or more previously entered
breakpoints. If the NOBR command is entered without any arguments, all user
breakpoints are removed from the breakpoint table.
The REGISTER MODIFY command is used to examine and/or modify the
.
C
N
I
..
.
nc
Freescale Semiconductor, I
contents of the CPU12’s registers in an interactive manner. As each register and
its contents is displayed, D-Bug12 allows the user to enter a new value for the
register in hexadecimal. If modification of the displayed register is not desired,
entering a carriage return will cause the next CPU12 register and its contents to
be displayed on the next line. When the last of the CPU12’s registers has been
examined and/or modified, the RM command displays the first register, giving
the user an opportunity to make additional modifications to the CPU12’s
register contents.
Typing a period (.) as the first non-space character on the line will exit the
interactive mode of the register modify command and return to the D-Bug12
prompt.
V
I
H
The registers are displayed in this order, one register per line: PC, SP, X, Y, A,
TheTRACE command is used to execute oneor more user programinstructions
beginning at the current program counter (PC) location. As each program
instructionis executed, the CPU12’s register contents aredisplayed and thenext
instruction to be executed is displayed. A single instruction may be executed by
entering the TRACE command immediately followed by a carriage return.
Restrictions:Because of the method used to execute a single instruction, branch instructions
(Bcc, LBcc, BRSET, BRCLR, DBEQ/NE, IBEQ/NE, and TBEQ/NE) that
contain an offset that branches back to the instruction opcode do not execute.
The terminal appears to become stuck at the branch instruction and does not
H
C
R
execute the instruction even if the condition for the branch instruction is
A
satisfied. This limitation can be overcome by using the GT (GO TILL)
command to set a temporary breakpoint at the instruction following the branch
instruction.
When the CPU12 is not operating in background debug mode, there is no
specialized hardware available to execute a single instruction. The TRACE
command makes use of temporary software breakpoints as a means to control
CPU execution. For this reason, only instructions that reside in alterable
memory may be executed with the TRACE command.
The UPLOAD command is used to display the contents of memory in Motorola
S-record format. In addition to displaying the specified range of memory, the
UPLOAD command also outputs an S9 end-of-file record. The output of this
command may be captured by the user’s terminal program and saved to a
disk file.
The VERF command is used to compare the data contained in an S-record
object file to the contents of EVB memory. The address offset, if supplied, is
added to the load address of each S record before an S record’s data bytes are
V
E
D
compared to the contents of memory. Providing an address offset other than 0
allows the S record’s object code or data to be compared against memory other
I
H
C
than that for which the S record was assembled.
R
A
During the verification process, an ASCII asterisk character (*) is sent to the
control console for each 10 S records that are successfully verified. When an
S-record file has been verified successfully, control returns to the D-Bug12
prompt.
If the contents of EVB memory do not match the corresponding data in the
received S records, an error message is displayed and the VERIFY command is
terminated. D-Bug12 then returns to its command-line prompt. If the host
computer continues to send S records to the EVB, D-Bug12 tries to interpret
each S record as a command and issues error message for each S record
received.
B
Y
R
F
AddressOffset
}
> is an optional 16-bit hexadecimal number.
}is the host-computer communications program’s
utility for sending an ASCII (text) file. Refer to
Appendix B. Communications Program
Examples.
ESE
L
A
C
S
E
E
M
>]
.
C
N
I
,
R
O
T
C
U
D
N
O
C
I
If the contents of EVB memory match the contents of the received S records,
the VERIFY command terminates when D-Bug12 receives an S9 end-of-file
record. If the object file being verified does not contain an S9 record, D-Bug12
continues to wait for an S9 record without returning to the command-line
prompt. Pressing the reset switch, S1, returns D-Bug12 to its command-line
prompt.
SSTOP enable0 or 1
HHalf carry0 or 1
NNegative flag0 or 1
ZZero flag0 or 1
VTwo’s complement overflow flag0 or 1
CCarry flag0 or 1
IMIRQ interrupt mask0 or 1
XMXIRQ interrupt mask
0 or 1
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Operation
D-Bug12 Command Set
Modify Register Value (Continued)<
This set of “commands” uses a CPU12 register name as the command name to
allow changing the register’s contents. Each register name or CCR bit name is
entered on the command line followed by a space, then followed by the new
register or bit contents. After successful alteration of a CPU register or CCR bit,
the entire CPU register set is displayed.
Restrictions:None
..
.
nc
Example:
A
R
C
H
>PC 700e
PC SP X Y D=A:B CCR=SXHI NZVC
700E 0A00 7315 7D62 47:44 1001 0000
>
X 1000
S
PC SP X Y D=A:B CCR=SXHI NZVC
700E 0A00 1000 7D62 47:44 1001 0000
>C 1
In this hardware-configured mode (pins 1 and 2 jumpered on header W20), the
EVB begins operation out of reset by executing the user program in on-chip
EEPROM starting at address $1000, as shown in Table 3-5.
..
.
nc
Freescale Semiconductor, I
NOTE:
A
This mode is effected using the MCU’s PAD0 line, which is broken out in J9
for possible custom use in the prototype area.
,
R
U
C
T
O
Control can be returned to D-Bug12 in two ways:
C
O
N
D
1.Move the jumper on W20 to pins 2 and 3 and reset the EVB. Do not
activate the program abort function.
If the EVB is configured to begin execution from on-chip EEPROM, D-Bug12
jumps to the starting EEPROM address before performing all of its
R
E
E
S
initialization and is thus not operable. Do not activate the program-abort
function under these conditions. Instead, move the jumper on header W20 to
pins 2 and 3 and activate the reset function to return control to D-Bug12.
H
C
R
To return to D-Bug12 after a user program has finished, include these lines as
the last instructions to be executed in the program:
D
E
V
I
2.Terminate the user program with code that returns to D-Bug12 after
execution has finished.
F
Y
B
STACKTOP: equ $0c00; stack at top of
; on-chip RAM
DEBUG12: equ $FD90 ;
lds #STACKTOP
jmp DEBUG12; jump to start of
; D-Bug12 code
To generate a user program on a host computer and load it into the EVB’s
memory, follow these steps:
Operation
Off-Board Code Generation
..
.
nc
3.9 Memory Usage
NOTE:
A
Forsteps 2 and 3,follow the instructions in the MCUez HC12 Assembler User’s
Manual, Motorola document order number MCUEZASM12/D.
1.Set up the EVB system with a host computer as the terminal. See section
2.6.3 Host-Computer Setup.
2.In the host computer’s native operating mode — for instance, before
M
O
C
I
starting the communications program that allows it to serve as the EVB’s
terminal — write and assemble the program using Motorola’s MCUez
assembler.
3.Using the MCUez assembler’s hex utility, generate a Motorola S-record
file from the object (.HEX) file. Appendix A. S-Record Format
contains detailed information about the S-record formats.
D
4.Start the EVB with D-Bug12 as the default operating mode, using the
E
V
I
H
C
R
The EVB’s memory usage and requirements are described here and
summarized in Table 3-5.
procedure in 3.2 Startup.
5.At the D-Bug12 prompt, issue D-Bug12’s LOAD command with any
parameters. Note that this requires interaction with the terminal
communications program’s “send file” utility. See
This memory mapping applies only to the factory-default memory
configuration.
The monitor program, D-Bug12, occupies 24 Kbytes in the two 32-Kbyte
EPROMs, U7 and U9A. The remaining 8 Kbytes are available for user
programs and utilities, but since this ROM area cannot be directly written,
special techniques are required to take advantage of it. For information on using
it, refer to Appendix E. Customizing the EPROMs.
Since the MCU must manage the execution of D-Bug12 and other EVB
functions, 512 bytes of on-chip RAM, from $0A00 to $0BFF, are required for
stack and variable storage. The remaining 512 bytes of on-chip RAM, from
$0800 to $09FF, are available for variable storage and stack space by user
programs.
D-Bug12 sets the default value of the user’s stack pointer to $0A00. This is not
a mistake. The M68HC12 Family’s stack pointer points to the last byte that was
pushed onto the stack, rather than to the next available byte on the stack, as the
M68HC11 Family does. The M68HC12 Family first decrements its stack
pointer, then stores data on the stack. The M68HC11 Family stores data on the
stack and then decrements its stack pointer.
The 16 Kbytes of external RAM, from $4000 to $7FFF, are available for user
code and data.
E
V
I
H
C
R
The information in Table 3-5 describes address ranges and locations.
Available for user programs*
D-Bug12 program
D-Bug12 startup code*
User-accessible functions
D-Bug12 customization data*
Available for user programs*
Reserved for interrupt and reset vectors
32-Kbyte external EPROM
(U7, U9A)
For More Information On This Product,
Go to: www.freescale.com
3.10 Operational Limitations
3.10.1 On-Chip RAM
..
.
nc
3.10.2 SCI Port Usage
C
3.10.3 Dedicated MCU Pins
A
R
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
D-Bug12 and other EVB functions require some of the MC68HC812A4’s
resources for management. For this reason, the EVB cannot provide true
emulation of a target system. These limitations are described in the following
subsections.
D-Bug12 requires 512 bytes of on-chip RAM for stack and variable storage.
This usage is shown in Table 3-5.
D-Bug12 requires one of the MCU’s serial communications interface (SCI)
ports for the terminal interface. The SCI port used for this purpose is
jumper-selectable (W14), but the one selected is unavailable for other uses.
E
V
I
H
As used on the EVB with D-Bug12, the following MCU lines perform specific
functions. If an application requires their use, the EVB hardware and/or
operating software must be custom-configured or special precautions must be
taken in the application code to avoid conflicts with the D-Bug12 usage.
Operational Limitations
.
C
N
I
,
R
O
T
C
U
D
N
O
C
I
M
ESE
L
A
C
S
E
E
R
F
Y
B
D
PE0/
XIRQ — Program-abort function (S2). Additionally, there are two
software limitations on the program-abort function:
•D-Bug12 enables the hardware
XM bit in the condition code register (see Table 3-4). If this
interrupt is subsequently disabled in software, for example with
the D-Bug12 RM command, it cannot be directly enabled again.
•If the user code replaces the D-Bug12 interrupt handler with one
of its own, the program-abort function is effectively disabled.
PAD0 — Selects normal or alternate execution mode (W20)
PAD1 — Selects the SCI port used for the terminal interface (W14)
For More Information On This Product,
Go to: www.freescale.com
Operation
Freescale Semiconductor, Inc.
PF4/CSD and PF5/CSP0 — Dedicated to chip-select usage. Not
available for I/O in the default configuration
Ports A, B, C, D, and G — Dedicated to address/data bus usage. Not
available as I/O ports in the default configuration
3.10.4 Terminal Communications
..
.
nc
C
R
A
.
C
N
I
,
C
T
O
R
High baud rates occasionally result in dropped characters on the terminal
display. This is not the result of a baud rate mismatch, but is due to the host
processor being too busy or too slow to process incoming data at the selected
baud rate. The D-Bug12 MD, MDW, T, and HELP commands may be affected
by this problem. Sometimes the problem can be ignored without harm.
ESE
L
E
S
C
A
If it requires correcting, try:
Y
E
R
F
•Using a slower baud rate
•A different communications program
•Closing unnecessary applications or exiting Windows. In multitasking
V
I
H
•Displaying fewer address locations or tracingfewer instructions at a time
B
D
E
environments such as Windows
problem can occur when several applications are running at once.
The EVB printed circuit board (PCB) is an 8-inch by 8-inch board with six
layers — one power, one ground, and four signal layers. The signal layers
containingcut-trace headerfootprints, describedin 4.3Configuration Headers
and Jumper Settings, comprise the top and bottom layers for accessibility.
Most of the connection points on the EVB are headers on 1/10-inch centers,
with three exceptions:
•Subminiature D connectors for the SCI RS-232C interfaces
..
.
nc
4.3 Configuration Headers and Jumper Settings
R
A
Freescale Semiconductor, I
•Loop-style hardware connections for test points
•External power-supply connections
L
A
C
S
E
E
B
Y
R
F
The EVB is designed for maximum flexibility. There are 45 PCB footprints
available for configuration headers. These are of two types:
I
H
C
D
E
•Factory-installed headers are those most likely to be used for
V
configuration without major alteration of the EVB’s hardware operation.
These headers are populated, and the factory-installed jumpers on them
are preset for the default EVB hardware and firmware (D-Bug12)
configurations. Table 4-1 lists these headers by function and describes
their default and optional jumper settings.
•Cut-trace header footprints offer EVB hardware options that are less
likely to be changed. These footprints are not populated. The default
connection between pins is a trace on the PCB. To change a cut-trace
footprint, the PCB trace must be cut. To return to the original
configuration, a header and a jumper must be installed to re-establish the
shunt.
Use of the cut-trace header footprints requires a thorough understanding of the
MCU and of the EVB hardware. Refer to the MC68HC812A4 Technical
Summary, Motorola document order number MC68HC812A4TS/D, and to the
EVB schematic diagram for design information.
When cutting a PCB trace to customize a header footprint, be careful not to cut
adjacent traces. Do not damage the underlying PCB layers by cutting too
deeply.
For More Information On This Product,
Go to: www.freescale.com
..
.
nc
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
Key to Table 4-1:
1–2
Table 4-1. Jumper-Selectable Functions (Sheet 1 of 4)
DiagramSettingDescription
E
W1 Low-Voltage Inhibit (LVI)
R
1
2
W3 RAM Write-Protection
21
3
W10 TXD1 — RS-232C Transmit Data (TXD) Enable, SCI Port 1
21
3
(1)
W12 and W13 together select the type of RAM installed.
(2)
W22, W24, W29, W32, W33, and W36 together select the type of ROM installed.
(3)
W30, W34, and W42 together determine the MCU’s mode of operation.
A
H
C
1–2
Off
1–2
2– 3
1–2
2–3
V
I
2-pin header with no jumper installed
2-pin header with jumper installed
3-pin header with no jumper installed
3-pin header with jumper installed on left 2 pins
bold pin numbers indicate factory-default settings
S
E
E
R
F
Y
B
D
Low-voltage inhibit is enabled.
Low-voltage inhibit is disabled.
RAM write-protection is disabled.
RAM write-protection is enabled.
TXD on SCI port 1 is enabled.
TXD on SCI port 1 is disabled.
RAM Pin Assignment — Pin 30 of 32-pin packageor pin 28 of 28-pin package
42
6
31
5
RAM Pin Assignment — Pin 28 of 32-pin packageor pin 26 of 28-pin package
42
6
31
5
Freescale Semiconductor, Inc.
Table 4-1. Jumper-Selectable Functions (Sheet 2 of 4)
T
O
R
,
A
R
1–2
2–3
1–2
3–4
C
5–6
1–2
3–4
5–6
1–2
2–3
H
Connects an MCU chip select to the devices installed in the ROM sockets
Connects an MCU chip select to the devices installed in the RAM sockets
Default: CSP0 is the ROM chip select.
CSD is the RAM chip select.
ESE
L
A
C
S
E
E
R
F
Y
B
D
E
Pin is connected to MCU address line A17 for narrow modes.
V
I
Pin is connected to MCU address line A18 for wide modes.
Pin is connected to VDD for 28-pin devices.
Pin is connected to MCU address line A13 for narrow modes.
Pin is connected to MCU address line A14 for wide modes.
Pin is connected to VDD for the device’s chip enable (CE2).
SCI port 0 serves as the D-Bug12 terminal interface.
SCI port 1 serves as the D-Bug12 terminal interface.
M
O
C
I
N
D
U
C
.
C
N
I
(1)
W12 and W13 together select the type of RAM installed.
(2)
W22, W24, W29, W32, W33, and W36 together select the type of ROM installed.
(3)
W30, W34, and W42 together determine the MCU’s mode of operation.
Table 4-1. Jumper-Selectable Functions (Sheet 3 of 4)
DiagramSettingDescription
W20 D-Bug12 (normal) or EEPROM (alternate) Execution Mode
Hardware Reference
..
.
nc
Freescale Semiconductor, I
1
2
3
W21 TXD0 — RS-232C Transmit Data (TXD) Enable, SCI Port 0
3
21
(2)
W22
W24
W29
W30
ROM Pin Assignment — Pin 31 of 32-pin package
42
6
31
5
(2)
ROM Pin Assignment — Pin 30 of 32-pin packageor pin 28 of 28-pin package
42
6
31
5
(2)
ROM Pin Assignment — Pin 29 of 32-pin packageor pin 27 of 28-pin package
42
6
31
5
(3)
MCU Background Mode Select
3
21
(1)
W12 and W13 together select the type of RAM installed.
(2)
W22, W24, W29, W32, W33, and W36 together select the type of ROM installed.
(3)
W30, W34, and W42 together determine the MCU’s mode of operation.
A
R
1–2
2–3
1–2
2–3
1–2
3–4
5–6
C
1–2
3–4
5–6
1–2
3–4
5–6
1–2
2–3
H
Code in on-chip EEPROM is executed out of reset.
D-Bug12 is executed out of reset.
TXD on SCI port 0 is enabled.
TXD on SCI port 0 is disabled.
I
M
ESE
L
A
E
E
S
C
Pin is connected to MCU address line A18 for narrow modes.
Pin is connected to MCU address line A19 for wide modes.
B
Y
R
F
Pin is connected to VDD to disable the device’s write enable (WE).
D
E
V
I
Pin is connected to MCU address line A17 for narrow modes.
Pin is connected to MCU address line A18 for wide modes.
Pin is connected to VDD for 28-pin devices.
Pin is connected to MCU address line A14 for narrow modes.
Pin is connected to MCU address line A15 for wide modes.
Pin is connected to VDD to disable the device’s write enable (WE).
MCU’s BKGD pin is connected to VSS.
MCU’s BKGD pin is connected to VDD.
ROM Pin Assignment — Pin 28 of 32-pin packageor pin 26 of 28-pin package
42
6
31
5
(2)
ROM Pin Assignment — Pin 3 of 32-pin packageor pin 1 of 28-pin package
42
6
nc
31
5
(3)
W34
W36
W42
Freescale Semiconductor, I
MCU MODB Select
3
21
(2)
ROM Pin Assignment — Pin 2 of 32-pin package
42
6
31
5
(3)
MCU MODA Select
3
21
(1)
W12 and W13 together select the type of RAM installed.
(2)
W22, W24, W29, W32, W33, and W36 together select the type of ROM installed.
(3)
W30, W34, and W42 together determine the MCU’s mode of operation.
Freescale Semiconductor, Inc.
Table 4-1. Jumper-Selectable Functions (Sheet 4 of 4)
A
R
1–2
3–4
5–6
1–2
3–4
5–6
1–2
2–3
C
1–2
3–4
5–6
1–2
2–3
H
I
Pin is connected to MCU address line A13 for narrow modes.
Pin is connected to MCU address line A14 for wide modes.
Pin is connected to VDD to enable the device’s chip enable (CE2).
,
R
O
T
C
U
D
Pin is connected to MCU address line A15 for narrow modes.
Pin is connected to MCU address line A16 for wide modes.
Pin is connected to VDD for ROM program voltage (VPP).
L
A
C
S
E
Y
E
R
F
MCU’s PE6/MODB pin is connected to VSS.
MCU’s PE6/MODB pin is connected to VDD.
B
D
E
V
Pin is connected to MCU address line A16 — for narrow modes.
Pin is connected to MCU address line A17 — for wide modes.
Pin is connected to VDD.
MCU’s PE5/MODA pin is connected to VSS.
MCU’s PE5/MODA pin is connected to VDD.
Theinput power connector onthe EVB is a 2-pin, lever-actuated connector(J6),
illustrated in Figure 2-1. EVB Power Connector J6. Fuse F1 (1.5 amp), Zener
diode VR1, and diode CR1 provide over-voltage and reverse-polarity
protection. Decoupling capacitors filter ripple and noise from the supply
voltage. A red LED (DS1) serves as the power-on indicator.
Cut-trace header footprints (see 4.3 Configuration Headers and Jumper
Settings) on the EVB allow isolating the V
circuits for different functional areas. These individually filtered circuits can
then be connected to separate power sources. This can be helpful for purposes
such as power-usage analysis.
These power circuits can be isolated:
•V
•V
E
V
I
•V
H
C
R
•V
Refer to the EVB schematic diagrams (4.16 Schematics) to locate the cut-trace
header footprint that isolates these circuits.
An RS-232C transceiver (U5B) links the MCU’s two serial communications
interfaces (SCI0 and SCI1) with separate RS-232C ports on the EVB. One of
these ports (SCI0 by default) serves as the terminal interface for D-Bug12
operation.The other port is availablefor userapplications. The communications
parameters for these ports are described in 2.6 Terminal Communications
Setup.
O
C
I
M
ESE
L
A
C
S
/ V
SSI
Y
SSEX0
B
separate circuits for MCU I/O pins
D
SSPLL
SSA/VDDA,VRL/VRH
E
— MCU core usage
DDI
E
R
F
/ V
DDEX0,VSSEX1
/ V
DDPLL
— Phase-locked loop (PLL)
/ V
DDEX1,VSSEX2
— A/D converter power and reference voltages
Hardware Reference
Power Input Circuitry
.
C
N
I
,
R
O
T
(ground) and VDD(+Vdc) power
SS
C
U
D
N
/ V
DDEX2
— Three
Two possible connectors are possible for each port:
•A right-angle DB-9 receptacle wired as DCE for standard RS-232C
•A functionally equivalent 3-pin header for customized cabling
SCI0 uses connectors J3 or J4; SCI1 uses connectors J1 or J2. The pin
assignments for these connectors are listed in Table 2-1. RS-232C Interface
Cabling. Note that the EVB’s serial ports use only three of the RS-232C
signals: receive data (RXD), transmit data (TXD), and ground (GND).
To change the D-Bug12 terminal port from SCI0 (the factory default) to SCI1,
move the jumper on header W14 to pins 2-3, as shown in Table 4-1. Header J1
then can be used for the terminal port connection without further hardware
modification. If a standard RS-232C cable connection is needed for this port,
install a right-angle DB-9 receptacle in the footprint for J2 (not populated at the
factory).
The EVB’s RS-232C output signals (transmit data) can be disabled by setting
the jumpers on headers W10 and W21, as shown in Table 4-1.
The MC68HC812A4 is the first of a family of next generation M68HC11
E
V
I
microcontrollers with on-chip memory and peripheral functions. The CPU12 is
H
C
a high-speed, 16-bit processing unit. The programming model and stack frame
R
A
are identical to those of the standard M68HC11 CPU. The CPU12 instruction
set is a proper superset of the M68HC11 instruction set. All M68HC11
instruction mnemonics are accepted by CPU12 assemblers with no changes.
The EVB-resident MC68HC812A4 (U8) has seven modes of operation. These
modes are determined at reset by the state of three mode pins — BKGD,
MODB, and MODA — as shown in Table 4-2.
The EVB is factory-configured for MCU operation in the normal expanded
wide (x16) mode. In this mode of operation, the expanded bus is present with a
16-bit data bus. Port D is the low byte data bus and port C is the high byte data
bus. Table 3-5 lists the MCU resource usage in this default configuration.
D
.
C
N
I
,
R
O
T
C
U
D
N
O
C
I
M
ESE
L
A
C
S
E
E
R
F
Y
B
In the normal expanded narrow (x8) mode of operation, the expanded bus is
present with an 8-bit data bus. Port C functions as the data bus in this mode.
Port D is available for general-purpose I/O.
In the normal single-chip mode of operation, no external bus is available. All
program and data fetches are from on-chip memory or peripheral registers.
Ports A, B, C, and D are available for general-purpose I/O.
The special peripheral mode of operation is a test mode. The CPU is not active.
On-chipperipherals may be accesseddirectly by an externalbus master. It is not
possible to change from or to this mode without going through reset.
The special expanded wide, special expanded narrow, and special single-chip
modes provide basically the same functionality as the respective normal modes.
These special modes are primarily for testing and provide access to several key
features, including:
,
R
U
C
T
O
•Special expanded narrow — To view 16-bit accesses without changing
the instruction cycle times, port D may be used to view the upper eight
bits of the data bus.
I
•Special single chip — Background debug mode is immediately active
out of reset. Execution begins from the background debug ROM.
Commands are sent to the CPU through the background debug interface
pin. A background debug interface is required, as described in 4.13
Background Debug Mode (BDM) Interface.
Y
B
For more information on the CPU, refer to the CPU12 Reference Manual,
Motorola document order number CPU12RM/AD.
H
C
R
A
D
E
V
I
E
E
R
F
S
C
A
L
M
ESE
C
O
N
D
.
C
N
I
Table 4-2. CPU Mode Selection
BKGD
Header W30
(2)
0
(2)
0
(2)
0
(2)
0
(1)
1
(1)
1
MODB
Header W34
(2)
0
(2)
0
(1)
1
(1)
1
(2)
0
(2)
0
MODA
Header W42
(2)
0
(1)
1
(2)
0
(1)
1
(2)
0
(1)
1
Mode Description
Special single chip
Special expanded narrow
Special peripheral
Special expanded wide
Normal single chip
Normal expanded narrow
The EVB has footprints for two SRAM sockets (U4 and U6A) and two ROM
sockets (U7 and U9A). The ROM sockets hold memory for D-Bug12, the EVB
operating firmware, or for user programs. The SRAM sockets hold memory for
user data or programs. The 8-bit memory arrangement allows MCU operation
in both single-byte and double-byte modes. The RAM and ROM footprints
support different memory device types (SRAM, EPROM, and EEPROM) and
sizes (28- and 32-pin, 8 to 512 Kbytes, 300- or 600-mil spacing). Figure 4-1
shows how the external memory sockets are used.
S
E
Y
E
R
F
Table 3-5. Factory-Configuration Memory Map depicts the EVB’s default
memory usage. Note that the map is valid only for the factory-supplied memory
configuration.
V
I
H
The user-available area in factory-supplied EPROM requires that the ROM
C
R
chips be reprogrammed with the custom code. For more information, refer to
Because the EVB is factory-configured for the MCU’s normal expanded wide
mode,the two RAMand the twoROM sockets arepopulated with 8-bitmemory
devices. Only the 600-mil footprints are populated with sockets. Two RAM and
six ROM jumper headers allow configuration of the memory sockets for use
with various types and sizes of memory. These headers are preset for the
factory-supplied memories. The default and optional settings are described in
Table 4-1. Table 4-3 provides information about the supplied memories.
Part numberAT27LV256R-20PCDS2064
Size256 Kbits (32 K x 8)64 Kbits (8 K x 8 bits)
Package width600 mil600 mil
Pin count28 pin28 pin
Power supply+3.0 to +5.5 Vdc+2.7 to +5.5 Vdc
Access times200 ns150 ns @ 5 V, 300 ns @ 3 V
Wait states required
(E-clock stretches)
S
E
E
R
F
Y
B
V
E
D
Header W11 connects an MCU chip select signal to memory devices in the
ROM (U7, U9A, U9B) and RAM (U4, U6A, U6B) sockets. Pins in columns 1
I
H
C
and 2 determine the chip select used for memory devices in ROM sockets. Pins
R
A
in columns 2 and 3 determine the chip select used for memory devices in RAM
sockets.
Figure 4-2 shows the W11 jumper settings for the factory-default memory
configuration. The illustration demonstrates the correct settings for
serve as the ROM chip select and
Glue logic is required for the MCU to operate with 8-bit memory devices in
wide expanded modes. It is not needed in narrow expanded modes. The EVB
allows either an OR gate (U3, factory-supplied) or a PAL array (U2, optional,
not populated) to serve as the glue logic. Figure 4-3. RAM/ROM Logic
Diagram shows the circuitry for the ROM and RAM logic.
The EVB comes with a 16-MHz crystal oscillator installed in a 14-pin DIP
socket (XY2). The socket wiring allows the use of various types of oscillator
packages. Additionally, there is ancillary circuitry that includes a footprint for
a discrete crystal (Y1). This flexible arrangement facilitates the construction of
custom oscillators. When designing a custom oscillator, refer to the EVB
schematic diagram to locate the applicable components and the headers that
must be changed.
..
.
nc
An external clock input can be supplied to the MCU’s EXTAL by installing a
right-angle BNC connector in footprint J7.Refer to the EVB schematic diagram
to locate the headers that must be changed.
4.9 Phase-Locked Loop (PLL)
The PLL can be used to run the MCU on a timebase that differs from the clock
frequency. To alter the timebase, capacitors must be installed between the
MCU’s XFC pin and the PLL’s ground reference, V
H
C
R
E4, E5, E6, E7, E8, and E9 provide space for these capacitors. Header footprint
A
W37 connects the XFC pin to the capacitors.
For more information, refer to the EVB schematic diagram. More detailed
information on the operation of the PLL is found in the MC68HC812A4Technical Summary, Motorola document order number MC68HC812A4TS/D.
The reset circuit includes a pullup resistor, debounce capacitor, and optional
connectionto an installed undervoltagesensing device (U1, asdescribed in 4.11
Low-Voltage Inhibit (LVI)). The reset circuit drives the MCU’s
directly.
RESET pin
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
4.11 Low-Voltage Inhibit (LVI)
Low-voltage inhibit (LVI) uses a Motorola undervoltage sensing device (U1) to
automatically drive the MCU’s
limits (2.8 Vdc typical). This prevents the accidental corruption of EEPROM
data if the power-supply voltage should drop below the allowable level. Header
W1 allows for the disconnection of the LVI circuit.
4.12 Analog-to-Digital (A/D) Converter
..
.
nc
NOTE:
The MCU’s A/D converter is fully documented in the MC68HC812A4
Technical Summary, Motorola document order number MC68HC812A4TS/D.
Two of the A/D bus lines, PAD0 and PAD1, are used by the EVB and D-Bug12
for configuration purposes. These lines are not available for A/D usage in the
factory-default configuration.
B
V
E
D
The accuracy of the A/D converter can be increased by supplying the MCU’s
A/D circuitry with the same supply voltages used by the target hardware. These
I
H
C
supply lines (V
R
A
and VRL) can be isolated from the EVB’s power bus with cut-trace footprints
W15, W16, W17, and W18. Refer to the EVB schematic diagram for details.
Y
F
DDA
R
E
S
E
and V
C
A
4.13 Background Debug Mode (BDM) Interface
The MCU’s serial BDM interface can be accessed through J5, a 2-row x 3-pin
header. The pin assignments are shown in Table 4-4.
Freescale Semiconductor, I
NOTE:
The BDM interface requires a development tool such as Motorola’s serial
debug interface. For more information, refer to Appendix F. SDI
Configuration and to the Serial Debug Interface User’s Manual, Motorola
The EVB’s prototype area allows construction of custom I/O circuitry that can
be connected to the MCU’s I/O lines through connectors J8 and J9. This 2-inch
by 8-inch area is a grid of holes (79 by 20) on 1/10-inch centers. This spacing
accommodates most sockets, headers, and device packages.
I
H
Figure 4-4 shows the component side viewof the prototype area. Ground (V
C
R
A
connections are provided along the three outboard peripheries, with three
loop-style test points for connecting clips or probes. Vdc (V
provided along the inboard periphery.
Two 2-row x 30-pin header connectors, J8 and J9, provide access to the MCU’s
I/0 and bus lines. These connectors are located adjacent to the prototype area for
use as described in 4.14 Prototype Area. They also provide connection points
for instrumentation probes and interfaces to target hardware. Figure 4-5 and
Figure 4-6 depict the pin assignments for J8 and J9. Table 4-5 and Table 4-6
provide descriptions of the signals.
TheEXTAL, XFC, andXTAL signals arenot directly connected to these headers
due to impedance considerations. Header footprints W37, W38, and W39 can
PORT J, bits 0–7 — General-purpose I/O
or key wakeup
V
SSX/VDDX
N
connections
O
C
I
M
PORT G, bits 0–5 — General-purpose I/O
or memory expansion lines
V
SSI/VDDI
connections for the MCU
BACKGROUND — An I/O line dedicated
to the background debug function. If it is a
0 out of reset then the MCU is in special
mode. This pin can be used for
bidirectional communications with the
MCU.
PORT C, bits 0–7 — General-purpose I/O
or data bus
connections
PORT S, bits 0–7 — General-purpose I/O
or multiple serial interface (MSI) lines.The
MSI lines consist of serial peripheral and
serial communication interfaces. The
signal functions are serial clock, slave
select, master in/slave out, master
out/slave in, receiver data input, and
N
transmitter data out.
O
C
I
M
PORT T, bits 0–7 — General-purpose I/O
or timer lines
VSS/VDD— EVB system return (VSS) and
power (VDD)
— External VSS and V
I
,
R
O
T
C
U
D
N
C
.
The schematics for the M68HC12A4EVB are provided here for your reference.