Motorola reserves the right to make changes without further notice to any products
herein. Motorola makes no warranty, representation or guarantee regarding the
suitability of its products for any particular purpose, nor does Motorola assume any
liability arising out of the application or use of any product or circuit, and specifically
disclaims any and all liability, including without limitation consequential or incidental
damages. "Typical" parameters which may be provided in Motorola data sheets and/or
specifications can and do vary in different applications and actual performance may
vary over time. All operating parameters, including "Typicals" must be validated for
each customer application by customer's technical experts. Motorola does not convey
any license under its patent rights nor the rights of others. Motorola products are not
designed, intended, or authorized for use as components in systems intended for
surgical implant into the body, or other applications intended to support or sustain life,
or for any other application in which the failure of the Motorola product could create a
situation where personal injury or death may occur. Should Buyer purchase or use
Motorola products for any such unintended or unauthorized application, Buyer shall
indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and
distributors harmless against all claims, costs, damages, and expenses, and
reasonable attorney fees arising out of, directly or indirectly, any claim of personal
injury or death associated with such unintended or unauthorized use, even if such claim
alleges that Motorola was negligent regarding the design or manufacture of the part.
Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.
The MC68HC912D60A microcontroller unit (MCU) is a 16-bit device
available in two package options, 80-pin QFP and 112-pin TQFP. Onchip peripherals include a 16-bit central processing unit (CPU12), 60K
bytes of flash EEPROM, 2K bytes of RAM, 1K bytes of EEPROM, two
asynchronous serial communication interfaces (SCI), a serial peripheral
interface (SPI), an enhanced capture timer (ECT), two (one on 80QFP)
8-channel,10-bit analog-to-digital converters (ATD), a four-channel
pulse-width modulator (PWM), and a CAN 2.0 A, B software compatible
module (MSCAN12). System resource mapping, clock generation,
interrupt control and bus interfacing are managed by the lite integration
module (LIM). The MC68HC912D60A has full 16-bit data paths
throughout, however, the external bus can operate in an 8-bit narrow
mode so single 8-bit wide memory can be interfaced for lower cost
systems. The inclusion of a PLL circuit allows power consumption and
performance to be adjusted to suit operational requirements. In addition
to the I/O ports available in each module, 16 (2 on 80QFP) I/O port pins
are available with Key-Wake-Up capability from STOP or WAIT mode.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAGeneral Description23
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
General Description
1.3 Devices Covered in this Document
The MC68HC912D60C and MC68HC912D60P are devices similar to
the MC68HC912D60A, but with different oscillator configurations. Refer
to Section 12. Oscillator for more details.
The generic term MC68HC912D60A is used throughout this document
to mean all derivatives mentioned above, except in Section 12.
Oscillator, where it refers only to the MC68HC912D60A device.
1.4 Features
nc...
I
cale Semiconductor,
Frees
•16-bit CPU12
–Upward compatible with M68HC11 instruction set
–Interrupt stacking and programmer’s model identical to
M68HC11
–20-bit ALU
–Instruction queue
–Enhanced indexed addressing
•Multiplexed bus
–Single chip or expanded
–16 address/16 data wide or 16 address/8 data narrow mode
•Two 8-bit ports with key wake-up interrupt (2 pins only are
available on 80QFP) and one I2C start bit detector (112TQFP
only)
•Memory
–60K byte flash EEPROM, made of a 28K module and a 32K
module with 8K bytes protected BOOT section in each module
(MC68HC912D60A)
–1K byte EEPROM
–2K byte RAM
Technical DataMC68HC912D60A — Rev 3.0
24General DescriptionMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
•Analog-to-digital converters
•1M bit per second, CAN 2.0 A, B software compatible module
nc...
I
General Description
Features
–2 x 8-channels, 10-bit resolution in 112TQFP
–1 x 8-channels, 8-bit resolution in 80QFP
–Two receive and three transmit buffers
–Flexible identifier filter programmable as 2 x 32 bit, 4 x 16 bit or
8x8bit
–Four separate interrupt channels for Rx, Tx, error and wake-up
–Low-pass filter wake-up function
–In 80QFP, only TxCAN and RxCAN pins are available
cale Semiconductor,
Frees
–Loop-back for self test operation
–Programmable link to a timer input capture channel, for time-
stamping and network synchronization.
•Enhanced capture timer (ECT)
–16-bit main counter with 7-bit prescaler
–8 programmable input capture or output compare channels; 4
of the 8 input captures with buffer
–Input capture filters and buffers, three successive captures on
four channels, or two captures on four channels with a
capture/compare selectable on the remaining four
–Four 8-bit or two 16-bit pulse accumulators
–16-bit modulus down-counter with 4-bit prescaler
–Four user-selectable delay counters for signal filtering
•4 PWM channels with programmable period and duty cycle
–8-bit 4-channel or 16-bit 2-channel
–Separate control for each pulse width and duty cycle
–Center- or left-aligned outputs
–Programmable clock select logic with a wide range of
frequencies
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAGeneral Description25
For More Information On This Product,
Go to: www.freescale.com
General Description
nc...
I
Freescale Semiconductor, Inc.
•Serial interfaces
•LIM (light integration module)
–Two asynchronous serial communications interfaces (SCI)
–MI-Bus implemented on final devices
–Synchronous serial peripheral interface (SPI)
–WCR (windowed COP watchdog, real time interrupt, clock
monitor)
–ROC (reset and clocks)
–MEBI (multiplexed external bus interface)
–MBI (internal bus interface and map)
cale Semiconductor,
Frees
–INT (interrupt control)
•Clock generation
–Phase-locked loop clock frequency multiplier
–Limp home mode in absence of external clock
–Slow mode divider
–Low power 0.5 to 16 MHz crystal oscillator reference clock
–Option of a Pierce or Colpitts oscillator
•112-Pin TQFP package or 80-pin QFP package
–Up to 68 general-purpose I/O lines, plus up to 18 input-only
lines in 112TQFP
or
Up to 48 general-purpose I/O lines, plus up to 10 input-only
lines in 80QFP
•8MHz operation at 5V
•Development support
–Single-wire background debug™ mode (BDM)
–On-chip hardware breakpoints
Technical DataMC68HC912D60A — Rev 3.0
26General DescriptionMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
1.5 Ordering Information
General Description
Ordering Information
Table 1-1. Device Ordering Information
Package
112-Pin TQFP
Single Tray
60 Pcs
80-Pin TQFP
nc...
I
cale Semiconductor,
Single Tray
84 Pcs
112-Pin TQFP
Single Tray
60 Pcs
80-Pin TQFP
Single Tray
84 Pcs
112-Pin TQFP
Single Tray
60 Pcs
80-Pin TQFP
Single Tray
84 Pcs
Ambient Temperature
Order Number
RangeDesignator
–40 to +85°CCMC912D60ACPV8
–40 to +105°CVMC912D60AVPV8
–40 to +125°CM*MC912D60AMPV8
–40 to +85°CCMC912D60ACFU8
–40 to +105°CVMC912D60AVFU8
–40 to +125°CM*MC912D60AMFU8
–40 to +85°CCMC912D60CCPV8
–40 to +105°CVMC912D60CVPV8
–40 to +125°CM*MC912D60CMPV8
–40 to +85°CCMC912D60CCFU8
–40 to +105°CVMC912D60CVFU8
–40 to +125°CM*MC912D60CMFU8
–40 to +85°CCMC912D60PCPV8
–40 to +105°CVMC912D60PVPV8
–40 to +125°CM*MC912D60PMPV8
–40 to +85°CCMC912D60PCFU8
–40 to +105°CVMC912D60PVFU8
–40 to +125°CM*MC912D60PMFU8
Frees
* Important: M temperature operation is available only for single chip
modes
Several I/O on ports G, H and CAN are unavailable externally on the 80-pin QFP package. These internal pins should either be defined as outputs or have their pull-ups/downs enabled.
The CPU12 is a high-speed, 16-bit processing unit. It has full 16-bit data
paths and wider internal registers (up to 20 bits) for high-speed extended
math instructions. The instruction set is a proper superset of the
M68HC11instruction set. The CPU12 allows instructions with odd byte
counts, including many single-byte instructions. This provides efficient
use of ROM space. An instruction queue buffers program information so
the CPU always has immediate access to at least three bytes of machine
code at the start of every instruction. The CPU12 also offers an
extensive set of indexed addressing capabilities.
2.3 Programming Model
CPU12 registers are an integral part of the CPU and are not addressed
as if they were memory locations.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLACentral Processing Unit31
For More Information On This Product,
Go to: www.freescale.com
D
Freescale Semiconductor, Inc.
Central Processing Unit
7
15
15
15
15
nc...
I
15
AB
D
IX
IY
SP
PC
70
NSXH IZVC
8-BIT ACCUMULATORS A & B
0
OR
16-BIT DOUBLE ACCUMULATOR
0
0
INDEX REGISTER X
0
INDEX REGISTER Y
0
STACK POINTER
0
PROGRAM COUNTER
CONDITION CODE REGISTER
Figure 2-1. Programming Model
Accumulators A and B are general-purpose 8-bit accumulators used to
hold operands and results of arithmetic calculations or data
manipulations. Some instructions treat the combination of these two 8bit accumulators as a 16-bit double accumulator (accumulator D).
Index registers X and Y are used for indexed addressing mode. In the
cale Semiconductor,
indexed addressing mode, the contents of a 16-bit index register are
added to 5-bit, 9-bit, or 16-bit constants or the content of an accumulator
to form the effective address of the operand to be used in the instruction.
Frees
Stack pointer (SP) points to the last stack location used. The CPU12
supports an automatic program stack that is used to save system
context during subroutine calls and interrupts, and can also be used for
temporary storage of data. The stack pointer can also be used in all
indexed addressing modes.
Program counter is a 16-bit register that holds the address of the next
instruction to be executed. The program counter can be used in all
indexed addressing modes except autoincrement/decrement.
Technical DataMC68HC912D60A — Rev 3.0
32Central Processing UnitMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
nc...
I
2.4 Data Types
Freescale Semiconductor, Inc.
Condition Code Register (CCR) contains five status indicators, two
interrupt masking bits, and a STOP disable bit. The five flags are half
carry (H), negative (N), zero (Z), overflow (V), and carry/borrow (C). The
half-carry flag is used only for BCD arithmetic operations. The N, Z, V,
and C status bits allow for branching based on the results of a previous
operation.
After a reset, the CPU fetches a vector from the appropriate address and
begins executing instructions. The X and I interrupt mask bits are set to
mask any interrupt requests. The S bit is also set to inhibit the STOP
instruction.
Central Processing Unit
Data Types
cale Semiconductor,
2.5 Addressing Modes
Frees
The CPU12 supports the following data types:
•Bit data
•8-bit and 16-bit signed and unsigned integers
•16-bit unsigned fractions
•16-bit addresses
A byte is eight bits wide and can be accessed at any byte location. A
word is composed of two consecutive bytes with the most significant
byte at the lower value address. There are no special requirements for
alignment of instructions or operands.
Addressing modes determine how the CPU accesses memory locations
to be operated upon. The CPU12 includes all of the addressing modes
of the M68HC11 CPU as well as several new forms of indexed
addressing. Table 2-1 is a summary of the available addressing modes.
INST oprx3,–xysIDXAuto pre-decrement x, y, or sp by 1 ~ 8
INST oprx3,+xysIDXAuto pre-increment x, y, or sp by 1 ~ 8
INST oprx3,xys–IDXAuto post-decrement x, y, or sp by 1 ~ 8
INST oprx3,xys+IDXAuto post-increment x, y, or sp by 1 ~ 8
INST abd,xyspIDX
INST oprx9,xyspIDX1
IMM
REL
Operand is included in instruction stream
8- or 16-bit size implied by context
Operand is the lower 8-bits of an address in
the range $0000 – $00FF
An 8-bit or 16-bit relative offset from the
current pc is supplied in the instruction
5-bit signed constant offset from x, y, sp, or
pc
Indexed with 8-bit (A or B) or 16-bit (D)
accumulator offset from x, y, sp, or pc
9-bit signed constant offset from x, y, sp, or
pc
(lower 8-bits of offset in one extension byte)
Indexed
(16-bit offset)
Indexed-Indirect
(16-bit offset)
Indexed-Indirect
(D accumulator offset)
Technical DataMC68HC912D60A — Rev 3.0
34Central Processing UnitMOTOROLA
INST oprx16,xyspIDX2
INST [oprx16,xysp][IDX2]
INST [D,xysp][D,IDX]
For More Information On This Product,
Go to: www.freescale.com
16-bit constant offset from x, y, sp, or pc
(16-bit offset in two extension bytes)
Pointer to operand is found at...
16-bit constant offset from x, y, sp, or pc
(16-bit offset in two extension bytes)
Pointer to operand is found at...
x, y, sp, or pc plus the value in D
Freescale Semiconductor, Inc.
2.6 Indexed Addressing Modes
The CPU12 indexed modes reduce execution time and eliminate code
size penalties for using the Y index register. CPU12 indexed addressing
uses a postbyte plus zero, one, or two extension bytes after the
instruction opcode. The postbyte and extensions do the following tasks:
•Specify which index register is used.
•Determine whether a value in an accumulator is used as an offset.
•Enable automatic pre- or post-increment or decrement
•Specify use of 5-bit, 9-bit, or 16-bit signed offsets.
nc...
I
Central Processing Unit
Indexed Addressing Modes
cale Semiconductor,
Frees
Postbyte
Code (xb)
rr0nnnnn
111rr0zs
111rr011[n,r]
rr1pnnnn
111rr1aa
Source
Syntax
,r
n,r
–n,r
n,r
–n,r
n,–r n,+r
n,r– n,r+
A,r
B,r
D,r
Table 2-2. Summary of Indexed Operations
Code
5-bit constant offset n = –16 to +15
rr can specify X, Y, SP, or PC
Constant offset (9- or 16-bit signed)
z-0 = 9-bit with sign in LSB of postbyte(s)
1 = 16-bit
if z = s = 1, 16-bit offset indexed-indirect (see below)
rr can specify X, Y, SP, or PC
16-bit offset indexed-indirect
rr can specify X, Y, SP, or PC
Auto pre-decrement/increment or Auto post-
decrement/increment;
p = pre-(0) or post-(1), n = –8 to –1, +1 to +8
rr can specify X, Y, or SP (PC not a valid choice)
Accumulator offset (unsigned 8-bit or 16-bit)
aa-00 = A
01 = B
10 = D (16-bit)
11 = see accumulator D offset indexed-indirect
rr can specify X, Y, SP, or PC
Comments
111rr111[D,r]
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLACentral Processing Unit35
For More Information On This Product,
Accumulator D offset indexed-indirect
rr can specify X, Y, SP, or PC
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Central Processing Unit
2.7 Opcodes and Operands
The CPU12 uses 8-bit opcodes. Each opcode identifies a particular
instruction and associated addressing mode to the CPU. Several
opcodes are required to provide each instruction with a range of
addressing capabilities.
Only 256 opcodes would be available if the range of values were
restricted to the number that can be represented by 8-bit binary
numbers. To expand the number of opcodes, a second page is added to
the opcode map. Opcodes on the second page are preceded by an
additional byte with the value $18.
nc...
I
cale Semiconductor,
Frees
To provide additional addressing flexibility, opcodes can also be
followed by a postbyte or extension bytes. Postbytes implement certain
forms of indexed addressing, transfers, exchanges, and loop primitives.
Extension bytes contain additional program information such as
addresses, offsets, and immediate data.
This pin is used for factory test purposes. It is recommended that this pin is not connected in the
application, but it may be bonded to 5.5 V max without issue.
Never apply voltage higher than 5.5 V to this pin.
Figure 3-1. Pin Assignments in 112-pin TQFP for MC68HC912D60A
Technical DataMC68HC912D60A — Rev 3.0
38Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
MC68HC912D60A Pin Assignments in 112-pin QFP
Pinout and Signal Descriptions
nc...
I
cale Semiconductor,
Frees
PIN 1
IDENT
C
4X
11285
1
L
2857
2956
C2
C1
VIEW Y
S1
0.050
VIEW AB
A1
T
L-M0.20N
4X 28 TIPS
N
A
S
2θ
3
θ
θ
R
R2
R1
R
(K)
E
(Y)
(Z)
L-M0.20NT
84
V
B
M
B1
V1
VIEW AB
T
SEATING
PLANE
112X
0.10
T
0.25
GAGE PLANE
1θ
J1
J1
C
L
J
0.13NT
SECTION J1-J1
ROTATED 90 COUNTERCLOCKWISE
NOTES:
1. DIMENSIONING AND TOLERANCING PER
ASME Y14.5M, 1994.
2. DIMENSIONS IN MILLIMETERS.
3. DATUMS L, M AND N TO BE DETERMINED AT
SEATING PLANE, DATUM T.
4. DIMENSIONS S AND V TO BE DETERMINED AT
SEATING PLANE, DATUM T.
5. DIMENSIONS A AND B DO NOT INCLUDE
MOLD PROTRUSION. ALLOWABLE
PROTRUSION IS 0.25 PER SIDE. DIMENSIONS
A AND B INCLUDE MOLD MISMATCH.
6. DIMENSION D DOES NOT INCLUDE DAMBAR
PROTRUSION. ALLOWABLE DAMBAR
PROTRUSION SHALL NOT CAUSE THE D
DIMENSION TO EXCEED 0.46.
This pin is used for factory test purposes. It is recommended that this pin is not connected in the
application, but it may be bonded to 5.5 V max without issue.
Never apply voltage higher than 5.5 V to this pin.
Figure 3-3. Pin Assignments in 80-pin QFP for MC68HC912D60A
Technical DataMC68HC912D60A — Rev 3.0
40Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
MC68HC912D60A Pin Assignments in 80-pin QFP
L
Pinout and Signal Descriptions
nc...
I
cale Semiconductor,
Frees
60
61
-A-
L
DETAIL A
80
120
M
0.20D
0.05
A-B
M
0.20D
E
CDATUM
-C-
SEATING
PLANE
DATUM
PLANE
H
G
-H-
W
X
DETAIL C
-D-
A
S
A-B
H
S
A-B
C
K
S
S
S
U
T
R
Q
41
40
-B-
21
M
M
NOTES:
1. DIMENSIONING AND TOLERANCING PER
ANSI Y14.5M, 1982.
2. CONTROLLING DIMENSION: MILLIMETER.
3. DATUM PLANE -H- IS LOCATED AT BOTTOM OF
LEAD AND IS COINCIDENT WITH THE
LEAD WHERE THE LEAD EXITS THE PLASTIC
BODY AT THE BOTTOM OF THE PARTING LINE.
4. DATUMS -A-, -B- AND -D- TO BE
DETERMINED AT DATUM PLANE -H-.
5. DIMENSIONS S AND V TO BE DETERMINED
AT SEATING PLANE -C-.
6. DIMENSIONS A AND B DO NOT INCLUDE
MOLD PROTRUSION. ALLOWABLE
PROTRUSION IS 0.25 PER SIDE. DIMENSIONS
A AND B DO INCLUDE MOLD MISMATCH
AND ARE DETERMINED AT DATUM PLANE -H-.
7. DIMENSION D DOES NOT INCLUDE DAMBAR
PROTRUSION. ALLOWABLE DAMBAR
PROTRUSION SHALL BE 0.08 TOTAL IN
S
S
A-B
B
H
M
0.20D
DETAIL C
-H-
PLANE
0.10
S
S
A-B
V
C
D
M
0.20D
0.05
B
B
DETAIL A
F
J
D
M
0.20D
SECTION B-B
VIEW ROTATED 90
MILLIMETERS
DIM MINMAX
A 13.90 14.10
B 13.90 14.10
C2.152.45
D0.220.38
E2.002.40
F0.220.33
G0.65 BSC
H---0.25
J0.130.23
K0.650.95
L12.35 REF
M5 10
N0.130.17
P0.325 BSC
Q0 7
R0.130.30
S 16.95 17.45
T0.13---
U0 ---
V 16.95 17.45
W0.350.45
X1.6 REF
MC68HC912D60A power and ground pins are described below and
summarized in Table 3-1.
All power supply pins must be connected to appropriate supplies.
On no account must any pins be left floating.
3.4.1 Internal Power (VDD) and Ground (VSS)
Power is supplied to the MCU through VDD and VSS. Because fast signal
transitions place high, short-duration current demands on the power
nc...
I
supply, use bypass capacitors with high-frequency characteristics and
place them as close to the MCU as possible. Bypass requirements
depend on how heavily the MCU pins are loaded.
3.4.2 External Power (V
External power and ground for I/O drivers. Because fast signal
and Ground (V
DDX)
transitions place high, short-duration current demands on the power
supply, use bypass capacitors with high-frequency characteristics and
place them as close to the MCU as possible. Bypass requirements
depend on how heavily the MCU pins are loaded.
cale Semiconductor,
3.4.3 V
DDA
, V
SSA
Provides operating voltage and ground for the analog-to-digital
converter. This allows the supply voltage to the ATD to be bypassed
Frees
independently. Connecting V
used will not result in an increase of power consumption.
3.4.4 Analog to Digital Reference Voltages (V
V
V
RH0
RH1
, V
, V
: reference voltage high and low for ATD converter 0.
RL0
: reference voltage high and low for ATD converter 1.
RL1
SSX
)
RH
to VDD if the ATD modules are not
DDA
, VRL)
If the ATD modules are not used, leaving V
connected to VDD will not
RH
result in an increase of power consumption.
Technical DataMC68HC912D60A — Rev 3.0
42Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Pinout and Signal Descriptions
Power Supply Pins
nc...
I
cale Semiconductor,
Frees
3.4.5 V
DDPLL
3.4.6 XFC
, V
SSPLL
Provides operating voltage and ground for the Phased-Locked Loop.
This allows the supply voltage to the PLL to be bypassed independently.
NOTE:The VSSPLL pin should always be grounded even if the PLL is not used.
The VDDPLL pin should not be left floating. It is recommended to
connect the VDDPLL pin to ground if the PLL is not used.
PLL loop filter. Please see Appendix: CGM Practical Aspects for
information on how to calculate PLL loop filter elements. Any current
leakage on this pin must be avoided.
VDDPLL
C
0
MCU
XFC
R
0
Figure 3-5. PLL Loop FIlter Connections
If VDDPLL is connected to VSS (this is normal case), then the XFC pin
should either be left floating or connected to VSS (never to VDD). If
VDDPLL is tied to VDD but the PLL is switched off (PLLON bit cleared),
then the XFC pin should be connected preferably to VDDPLL (i.e. ready
for VCO minimum frequency).
C
a
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAPinout and Signal Descriptions43
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Pinout and Signal Descriptions
Table 3-1. MC68HC912D60A Power and Ground Connection Summary
Pin Number
Mnemonic
80-pin
QFP
112-pin
QFP
Description
V
DD
V
SS
V
DDX
V
SSX
nc...
I
3.5 Signal Descriptions
cale Semiconductor,
V
DDA
V
V
V
V
V
V
DDPLL
V
SSPLL
SSA
RH1
RL1
RH0
RL0
9, 4912, 65
10, 5014, 66
30, 7542, 107
29, 7440, 106
6185
6288
—86
—87
5167
5268
3143
3345
Internal power and ground.
External power and ground, supply to pin drivers.
Operating voltage and ground for the analog-to-digital
converter, allows the supply voltage to the A/D to be
bypassed independently.
Reference voltages for the analog-to-digital converter 1
Reference voltages for the analog-to-digital converter 0.
Provides operating voltage and ground for the Phased-Locked
Loop. This allows the supply voltage to the PLL to be
bypassed independently.
3.5.1 Crystal Driver and External Clock Input (XTAL, EXTAL)
Frees
These pins provide the interface for either a crystal or a CMOS
compatible clock to control the internal clock generator circuitry. Out of
reset the frequency applied to EXTAL is twice the desired E–clock rate.
All the device clocks are derived from the EXTAL input frequency.
3.5.1.1 Crystal Connections
Refer to Section 12. Oscillator for details of crystal connections.
Technical DataMC68HC912D60A — Rev 3.0
44Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
NOTE:When selecting a crystal, it is recommended to use one with the lowest
possible frequency in order to minimise EMC emissions.
3.5.1.2 External Oscillator Connections
XTAL is the crystal output. The XTAL pin must be left unterminated when
an external CMOS compatible clock input is connected to the EXTAL
pin. The XTAL output is normally intended to drive only a crystal. The
XTAL output can be buffered with a high-impedance buffer to drive the
EXTAL input of another device.
Pinout and Signal Descriptions
Signal Descriptions
nc...
I
3.5.2 E-Clock Output (ECLK)
cale Semiconductor,
Frees
2 x E
CMOS-COMPATIBLE
MCU
EXTAL
XTAL
EXTERNAL OSCILLATOR
NC
Figure 3-6. External Oscillator Connections
ECLK is the output connection for the internal bus clock and is used to
demultiplex the address and data and is used as a timing reference.
ECLK frequency is equal to 1/2 the crystal frequency out of reset. The
ECLK output is turned off in single chip user mode to reduce the effects
of RFI. It can be turned on if necessary. In single-chip special mode, the
ECLK is turned ON at reset and can be turned OFF. In special peripheral
mode the ECLK is an input to the MCU. All clocks, including the ECLK,
are halted when the MCU is in STOP mode. It is possible to configure
the MCU to interface to slow external memory. ECLK can be stretched
for such accesses.
3.5.3 Reset (RESET)
An active low bidirectional control signal, RESET, acts as an input to
initialize the MCU to a known start-up state. It also acts as an open-drain
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAPinout and Signal Descriptions45
For More Information On This Product,
Go to: www.freescale.com
Pinout and Signal Descriptions
output to indicate that an internal failure has been detected in either the
clock monitor or COP watchdog circuit. The MCU goes into reset
asynchronously and comes out of reset synchronously. This allows the
part to reach a proper reset state even if the clocks have failed, while
allowing synchronized operation when starting out of reset.
It is important to use an external low-voltage reset circuit (such as
MC34064 or MC34164) to prevent corruption of RAM or EEPROM due
to power transitions.
The reset sequence is initiated by any of the following events:
nc...
I
Freescale Semiconductor, Inc.
•Power-on-reset (POR)
•COP watchdog enabled and watchdog timer times out
cale Semiconductor,
Frees
•Clock monitor enabled and Clock monitor detects slow or stopped
clock
•User applies a low level to the reset pin
External circuitry connected to the reset pin should not include a large
capacitance that would interfere with the ability of this signal to rise to a
valid logic one within nine bus cycles after the low drive is released.
Upon detection of any reset, an internal circuit drives the reset pin low
and a clocked reset sequence controls when the MCU can begin normal
processing. In the case of POR or a clock monitor error, a 4096 cycle
oscillator startup delay is imposed before the reset recovery sequence
starts (reset is driven low throughout this 4096 cycle delay). The internal
reset recovery sequence then drives reset low for 16 to 17 cycles and
releases the drive to allow reset to rise. Nine cycles later this circuit
samples the reset pin to see if it has risen to a logic one level. If reset is
low at this point, the reset is assumed to be coming from an external
request and the internally latched states of the COP timeout and clock
monitor failure are cleared so the normal reset vector ($FFFE:FFFF) is
taken when reset is finally released. If reset is high after this nine cycle
delay, the reset source is tentatively assumed to be either a COP failure
or a clock monitor fail. If the internally latched state of the clock monitor
fail circuit is true, processing begins by fetching the clock monitor vector
($FFFC:FFFD). If no clock monitor failure is indicated, and the latched
state of the COP timeout is true, processing begins by fetching the COP
Technical DataMC68HC912D60A — Rev 3.0
46Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
vector ($FFFA:FFFB). If neither clock monitor fail nor COP timeout are
pending, processing begins by fetching the normal reset vector
($FFFE:FFFF).
3.5.4 Maskable Interrupt Request (IRQ)
The IRQ input provides a means of applying asynchronous interrupt
requests to the MCU. Either falling edge-sensitive triggering or levelsensitive triggering is program selectable (INTCR register). IRQ is
always enabled and configured to level-sensitive triggering at reset. It
can be disabled by clearing the IRQEN bit (INTCR register). When the
nc...
I
MCU is reset the IRQ function is masked in the condition code register.
This pin is always an input and can always be read. There is an active
pull-up on this pin while in reset and immediately out of reset. The pullup can be turned off by clearing PUPE in the PUCR register.
Pinout and Signal Descriptions
Signal Descriptions
3.5.5 Nonmaskable Interrupt (XIRQ)
The XIRQ input provides a means of requesting a nonmaskable interrupt
after reset initialization. During reset, the X bit in the condition code
register (CCR) is set and any interrupt is masked until MCU software
enables it. Because the XIRQ input is level sensitive, it can be connected
to a multiple-source wired-OR network. This pin is always an input and
can always be read. There is an active pull-up on this pin while in reset
cale Semiconductor,
Frees
and immediately out of reset. The pull-up can be turned off by clearing
PUPE in the PUCR register. XIRQ
interrupt.
Whenever XIRQ
must be configured for level-sensitive operation if there is more than one
source of IRQ interrupt), each source must drive the interrupt input with
an open-drain type of driver to avoid contention between outputs. There
must also be an interlock mechanism at each interrupt source so that the
source holds the interrupt line low until the MCU recognizes and
acknowledges the interrupt request. If the interrupt line is held low, the
MCU will recognize another interrupt as soon as the interrupt mask bit in
the MCU is cleared (normally upon return from an interrupt).
is often used as a power loss detect
or IRQ are used with multiple interrupt sources (IRQ
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAPinout and Signal Descriptions47
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Pinout and Signal Descriptions
3.5.6 Mode Select (SMODN, MODA, and MODB)
The state of these pins during reset determine the MCU operating mode.
After reset, MODA and MODB can be configured as instruction queue
tracking signals IPIPE0 and IPIPE1. MODA and MODB have active pulldowns during reset.
The SMODN pin has an active pull-up when configured as input. This pin
can be used as BKGD or TAGHI after reset.
3.5.7 Single-Wire Background Mode Pin (BKGD)
nc...
I
3.5.8 External Address and Data Buses (ADDR[15:0] and DATA[15:0])
The BKGD pin receives and transmits serial background debugging
commands. A special self-timing protocol is used. The BKGD pin has an
active pull-up when configured as input; BKGD has no pull-up control.
Refer to Development Support.
External bus pins share function with general-purpose I/O ports A and B.
In single-chip operating modes, the pins can be used for I/O; in
expanded modes, the pins are used for the external buses.
In expanded wide mode, ports A and B are used for multiplexed 16-bit
data and address buses. PA[7:0] correspond to
ADDR[15:8]/DATA[15:8]; PB[7:0] correspond to ADDR[7:0]/DATA[7:0].
cale Semiconductor,
In expanded narrow mode, ports A and B are used for the16-bit address
bus, and an 8-bit data bus is multiplexed with the most significant half of
Frees
the address bus on port A. In this mode, 16-bit data is handled as two
back-to-back bus cycles, one for the high byte followed by one for the
low byte. PA[7:0] correspond to ADDR[15:8] and to DATA[15:8] or
DATA[7:0], depending on the bus cycle. The state of the address pin
should be latched at the rising edge of E. To allow for maximum address
setup time at external devices, a transparent latch should be used.
Technical DataMC68HC912D60A — Rev 3.0
48Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
3.5.9 Read/Write (R/W)
3.5.10 Low-Byte Strobe (LSTRB)
nc...
I
Freescale Semiconductor, Inc.
In all modes this pin can be used as general-purpose I/O and is an input
with an active pull-up out of reset. If the read/write function is required it
should be enabled by setting the RDWE bit in the PEAR register.
External writes will not be possible until enabled.
In all modes this pin can be used as general-purpose I/O and is an input
with an active pull-up out of reset. If the strobe function is required, it
should be enabled by setting the LSTRE bit in the PEAR register. This
signal is used in write operations and so external low byte writes will not
be possible until this function is enabled. This pin is also used as TAGLO
in Special Expanded modes and is multiplexed with the LSTRB function.
Pinout and Signal Descriptions
Signal Descriptions
3.5.11 Instruction Queue Tracking Signals (IPIPE1 and IPIPE0)
These signals are used to track the state of the internal instruction
execution queue. Execution state is time-multiplexed on the two signals.
Refer to Development Support.
3.5.12 Data Bus Enable (DBE)
cale Semiconductor,
Frees
The DBE
ECLK high time. DBE
multiplexed address and the input of data. When an external address is
stretched, DBE
of the last ECLK cycle of stretch. In expanded modes this pin is used to
enable the drive control of external buses during external reads. Use of
the DBE is controlled by the NDBE bit in the PEAR register.DBE is
enabled out of reset in expanded modes. This pin has an active pull-up
during and after reset in single chip modes.
pin (PE7) is an active low signal that will be asserted low during
provides separation between output of a
is asserted during what would be the last quarter cycle
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAPinout and Signal Descriptions49
For More Information On This Product,
Go to: www.freescale.com
Pinout and Signal Descriptions
3.5.13 Inverted ECLK (ECLK)
The ECLK pin (PE7) can be used to latch the address for demultiplexing. It has the same behavior as the ECLK, except is inverted.
In expanded modes this pin is used to enable the drive control of external
buses during external reads. Use of the ECLK is controlled by the NDBE
and DBENE bits in the PEAR register.
3.5.14 Calibration reference (CAL)
The CAL pin (PE7) is the output of the Slow Mode programmable clock
divider, SLWCLK, and is used as a calibration reference. The SLWCLK
nc...
I
frequency is equal to the crystal frequency out of reset and always has
a 50% duty. If the DBE function is enabled it will override the enabled
CAL output. The CAL pin output is disabled by clearing CALE bit in the
PEAR register.
Freescale Semiconductor, Inc.
3.5.15 Clock generation module test (CGMTST)
The CGMTST pin (PE6) is the output of the clocks tested when CGMTE
bit is set in PEAR register. The PIPOE bit must be cleared for the clocks
to be tested.
3.5.16 TEST
cale Semiconductor,
This pin is used for factory test purposes. It is recommended that this
pin is not connected in the application, but it may be bonded to 5.5 V max
without issue. Never apply voltage higher than 5.5 V to this pin.
Frees
Table 3-2. MC68HC912D60A Signal Description Summary
Pin Name
EXTAL3547
XTAL3648
RESET
Pin Number
80-pin112-pin
3446
Crystal driver and external clock input pins.
An active low bidirectional control signal, RESET
initialize the MCU to a known start-up state, and an output when COP or
clock monitor causes a reset.
Description
acts as an input to
Technical DataMC68HC912D60A — Rev 3.0
50Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Pinout and Signal Descriptions
Table 3-2. MC68HC912D60A Signal Description Summary
Signal Descriptions
nc...
I
cale Semiconductor,
Frees
Pin Name
ADDR[7:0]
DATA[7:0]
ADDR[15:8]
DATA[15:8]
DBE
ECLK
CAL2536
CGMTST2637Clock generation module test output.
MODB/
IPIPE1,
MODA/
IPIPE0
ECLK2839
LSTRB
TAG L O
/
R/W
IRQ
XIRQ
Pin Number
80-pin112-pin
23–1631–24
48–4164–57
2536
2536Inverted ECLK used to latch the address.
26, 2737, 38
3753
3854
3955
4056
External bus pins share function with general-purpose I/O ports A and B.
In single chip modes, the pins can be used for I/O. In expanded modes,
the pins are used for the external buses.
Data bus control and, in expanded mode, enables the drive control of
external buses during external reads.
CAL is the output of the Slow Mode programmable clock divider, SLWCLK,
and is used as a calibration reference for functions such as time of day. It
is overridden when DBE function is enabled. It always has a 50% duty
cycle.
State of mode select pins during reset determine the initial operating mode
of the MCU. After reset, MODB and MODA can be configured as
instruction queue tracking signals IPIPE1 and IPIPE0 or as generalpurpose I/O pins.
E Clock is the output connection for the external bus clock. ECLK is used
as a timing reference and for address demultiplexing.
Low byte strobe (0 = low byte valid), in all modes this pin can be used as
I/O. The low strobe function is the exclusive-NOR of A0 and the internal
SZ8
signal. (The SZ8 internal signal indicates the size 16/8 access.) Pin
function TAGLO
Indicates direction of data on expansion bus. Shares function with
general-purpose I/O. Read/write in expanded modes.
Maskable interrupt request input provides a means of applying
asynchronous interrupt requests to the MCU. Either falling edgesensitive triggering or level-sensitive triggering is program selectable
(INTCR register).
Provides a means of requesting asynchronous nonmaskable interrupt
requests after reset initialization
used in instruction tagging. See Development Support.
Description
Single-wire background interface pin is dedicated to the background
debug function. During reset, this pin determines special or normal
operating mode. Pin function TAGHI
Development Support.
Slave select output for SPI master mode, input for slave mode or master
mode.
used in instruction tagging. See
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Pinout and Signal Descriptions
Table 3-2. MC68HC912D60A Signal Description Summary
Pin Name
SDO/MOSI6894Master out/slave in pin for serial peripheral interface
SDI/MISO6793Master in/slave out pin for serial peripheral interface
TxD16692SCI1 transmit pin
RxD16591SCI1 receive pin
TxD06490SCI0 transmit pin
RxD06389SCI0 receive pin
IOC[7:0]
nc...
I
cale Semiconductor,
AN1[7:0]N/A
AN0[7:0]60–53
TEST7197
TxCAN72104MSCAN transmit pin. Leave unconnected if MSCAN is not used.
RxCAN73105
KWG[6:0]
PGUPD
KWH[7:0]
PHUPD
Pin Number
80-pin112-pin
14–11,
7–4
8 (KWG4
only)
(1)
24 (KWH4
only)
(2)
18–15, 7–4
84/82/80/78/
76/74/72/70
83/81/79/77/
75/73/71/69
9–11, 19–22
32–35,
49–52
Description
Pins used for input capture and output compare in the timer and pulse
accumulator subsystem.
Analog inputs for the analog-to-digital conversion module 1
Analog inputs for the analog-to-digital conversion module 0
Used for factory test purposes. Do not connect in the application; may be
bonded to 5.5 V max.
MSCAN receive pin. Pin has internal pull-up; where msCAN module is not
used, do not tie to VSS.
Key wake-up and general purpose I/O; can cause an interrupt when an
input transitions from high to low. On 80-pin QFP all 8 I/O should be
initialised.
13Defines if I/O port resistive load is a pull-up or a pull-down, when enabled.
Key wake-up and general purpose I/O; can cause an interrupt when an
input transitions from high to low. On 80-pin QFP all 8 I/O should be
initialised.
41Defines if I/O port resistive load is a pull-up or a pull-down, when enabled.
Frees
1. In the 80-pin version PGUPD is connected internally to VDD
2. In the 80-pin version PHUPD is connected internally to VSS
3.6 Port Signals
The MC68HC912D60A incorporates eight ports which are used to
control and access the various device subsystems. When not used for
these purposes, port pins may be used for general-purpose I/O. In
addition to the pins described below, each port consists of a data register
Technical DataMC68HC912D60A — Rev 3.0
52Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
3.6.1 Port A
Freescale Semiconductor, Inc.
which can be read and written at any time, and, with the exception of port
AD0, port AD1 (available only in 112TQFP), PE[1:0], RxCAN and
TxCAN, a data direction register which controls the direction of each pin.
After reset all general purpose I/O pins are configured as input.
Port A pins are used for address and data in expanded modes. In single
chip modes, the pins can be used as I/O. The port data register is not in
the address map during expanded and peripheral mode operation.
When it is in the map, port A can be read or written at anytime.
Pinout and Signal Descriptions
Port Signals
nc...
I
cale Semiconductor,
3.6.2 Port B
Frees
Register DDRA determines whether each port A pin is an input or output.
DDRA is not in the address map during expanded and peripheral mode
operation. Setting a bit in DDRA makes the corresponding bit in port A
an output; clearing a bit in DDRA makes the corresponding bit in port A
an input. The default reset state of DDRA is all zeros.
When the PUPA bit in the PUCR register is set, all port A input pins are
pulled-up internally by an active pull-up device. This bit has no effect if
the port is being used in expanded modes as the pull-ups are inactive.
Setting the RDPA bit in register RDRIV causes all port A outputs to have
reduced drive level. RDRIV can be written once after reset. RDRIV is not
in the address map in peripheral mode. Refer to Bus Control and
Input/Output.
Port B pins are used for address and data in expanded modes. In single
chip modes, the pins can be used as I/O. The port data register is not in
the address map during expanded and peripheral mode operation.
When it is in the map, port B can be read or written at anytime.
Register DDRB determines whether each port B pin is an input or output.
DDRB is not in the address map during expanded and peripheral mode
operation. Setting a bit in DDRB makes the corresponding bit in port B
an output; clearing a bit in DDRB makes the corresponding bit in port B
an input. The default reset state of DDRB is all zeros.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAPinout and Signal Descriptions53
For More Information On This Product,
Go to: www.freescale.com
Pinout and Signal Descriptions
When the PUPB bit in the PUCR register is set, all port B input pins are
pulled-up internally by an active pull-up device. This bit has no effect if
the port is being used in expanded modes as the pull-ups are inactive.
Setting the RDPB bit in register RDRIV causes all port B outputs to have
reduced drive level. RDRIV can be written once after reset. RDRIV is not
in the address map in peripheral mode. Refer to Bus Control and
Input/Output.
3.6.3 Port E
Port E pins operate differently from port A and B pins. Port E pins are
nc...
I
used for bus control signals and interrupt service request signals. When
a pin is not used for one of these specific functions, it can be used as
general-purpose I/O. However, two of the pins (PE[1:0]) can only be
used for input, and the states of these pins can be read in the port data
register even when they are used for IRQ and XIRQ.
Freescale Semiconductor, Inc.
cale Semiconductor,
Frees
The PEAR register determines pin function, and register DDRE
determines whether each pin is an input or output when it is used for
general-purpose I/O. PEAR settings override DDRE settings. Because
PE[1:0] are input-only pins, only DDRE[7:2] have effect. Setting a bit in
the DDRE register makes the corresponding bit in port E an output;
clearing a bit in the DDRE register makes the corresponding bit in port E
an input. The default reset state of DDRE is all zeros.
When the PUPE bit in the PUCR register is set, PE7 and PE[3:0] are
pulled up by active devices.
Neither port E nor DDRE is in the map in peripheral mode; neither is in
the internal map in expanded modes with EME set.
Setting the RDPE bit in register RDRIV causes all port E outputs to have
reduced drive level. RDRIV can be written once after reset. RDRIV is not
in the address map in peripheral mode. Refer to Bus Control and
Input/Output.
Technical DataMC68HC912D60A — Rev 3.0
54Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
3.6.4 Port G
nc...
I
Freescale Semiconductor, Inc.
Port G pins are used for key wake-ups that can be used with the pins
configured as inputs or outputs. The key wake-ups are triggered with a
falling edge signal (KWPG). An interrupt is generated if the
corresponding bit is enabled (KWIEG). If any of the interrupts is not
enabled, the corresponding pin can be used as a general purpose I/O
pin. Refer to I/O Ports with Key Wake-up.
Register DDRG determines pin direction of port G when used for
general-purpose I/O. When DDRG bits are set, the corresponding pin is
configured for output. On reset the DDRG bits are cleared and the
corresponding pin is configured for input.
Port PGUPD determines what type of resistive load is used for port G
input pins when PUPG bit is set in the PUCR register. When PGUPD pin
is low, it loads a pull-down in all port G input pins. When PGUPD pin is
high, it loads a pull-up in all port G input pins.
Pinout and Signal Descriptions
Port Signals
cale Semiconductor,
3.6.5 Port H
Frees
In 80-pin version, the PGUPD is connected internally to VDD. The PG4
will have a pull-up. All port G pins should either be defined as outputs or
have their pull-ups enabled.
Setting the RDPG bit in register RDRIV causes all port G outputs to have
reduced drive level. RDRIV can be written once after reset. RDRIV is not
in the address map in peripheral mode. Refer to Bus Control and
Input/Output.
Port H pins are used for key wake-ups that can be used with the pins
configured as inputs or outputs. The key wake-ups are triggered with a
falling edge signal (KWPH). An interrupt is generated if the
corresponding bit is enabled (KWIEH). If any of the interrupts is not
enabled, the corresponding pin can be used as a general purpose I/O
pin. Refer to I/O Ports with Key Wake-up.
Register DDRH determines pin direction of Port H when used for
general-purpose I/O. When DDRH bits are set, the corresponding pin is
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAPinout and Signal Descriptions55
For More Information On This Product,
Go to: www.freescale.com
Pinout and Signal Descriptions
configured for output. On reset the DDRH bits are cleared and the
corresponding pin is configured for input.
Port PHUPD determines what type of resistive load is used for Port H
input pins when PUPH bit is set in the PUCR register. When PHUPD pin
is low, it loads a pull-down in all Port H input pins. When PHUPD pin is
high, it loads a pull-up in all Port H input pins.
In 80-pin version, the PHUPD is connected internally to VSS. The PH4
will have a pull-down. All port H pins should either be defined as outputs
or have their pull-downs enabled.
Setting the RDPH bit in register RDRIV causes all Port H outputs to have
nc...
I
reduced drive level. RDRIV can be written once after reset. RDRIV is not
in the address map in peripheral mode. Refer to Bus Control and
Input/Output.
Freescale Semiconductor, Inc.
3.6.6 Port CAN
cale Semiconductor,
Frees
3.6.7 Port AD1
The MSCAN12 uses two external pins, one input (RxCAN) and one
output (TxCAN). The TxCAN output pin represents the logic level on the
CAN: ‘0’ is for a dominant state, and ‘1’ is for a recessive state. If the
MSCAN is not used, TxCAN should be left unconnected and, due to an
internal pull-up, the RxCAN pin should not be tied to VSS.
RxCAN is on bit 0 of Port CAN, TxCAN is on bit 1. The remaining six pins
of Port CAN, available only in the 112-pin package, are controlled by
registers in the MSCAN12 address space.
In 80QFP all PortCAN[2:7] pins should either be defined as outputs or
have their pull-ups enabled.
Input to the analog-to-digital subsystem and general-purpose input.
When analog-to-digital functions are not enabled, the port has eight
general-purpose input pins, PAD1[7:0]. The ADPU bit in the ATD1CTL2
register enables the A/D function.
Technical DataMC68HC912D60A — Rev 3.0
56Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
3.6.8 Port AD0
nc...
I
Freescale Semiconductor, Inc.
Port AD1 pins are inputs; no data direction register is associated with this
port. The port has no resistive input loads and no reduced drive controls.
Refer to Analog-to-Digital Converter.
Port AD1 is not available in the 80-pin package.
Input to the analog-to-digital subsystem and general-purpose input.
When analog-to-digital functions are not enabled, the port has eight
general-purpose input pins, PAD0[7:0]. The ADPU bit in the ATD0CTL2
register enables the A/D function.
Port AD0 pins are inputs; no data direction register is associated with this
port. The port has no resistive input loads and no reduced drive controls.
Refer to Analog-to-Digital Converter.
Pinout and Signal Descriptions
Port Signals
3.6.9 Port P
cale Semiconductor,
Frees
The four pulse-width modulation channel outputs share general-purpose
port P pins. The PWM function is enabled with the PWEN register.
Enabling PWM pins takes precedence over the general-purpose port.
When pulse-width modulation is not in use, the port pins may be used for
general-purpose I/O.
Register DDRP determines pin direction of port P when used for
general-purpose I/O. When DDRP bits are set, the corresponding pin is
configured for output. On reset the DDRP bits are cleared and the
corresponding pin is configured for input.
When the PUPP bit in the PWCTL register is set, all input pins are pulled
up internally by an active pull-up device. Pull-ups are disabled after
reset.
Setting the RDPP bit in the PWCTL register configures all port P outputs
to have reduced drive levels. Levels are at normal drive capability after
reset. The PWCTL register can be read or written anytime after reset.
Refer to Pulse Width Modulator.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAPinout and Signal Descriptions57
For More Information On This Product,
Go to: www.freescale.com
Pinout and Signal Descriptions
3.6.10 Port S
Port S is the 8-bit interface to the standard serial interface consisting of
the two serial communications interfaces (SCI1 and SCI0) and the serial
peripheral interface (SPI) subsystems. Port S pins are available for
general-purpose parallel I/O when standard serial functions are not
enabled.
Port S pins serve several functions depending on the various internal
control registers. If WOMS bit in the SC0CR1register is set, the Pchannel drivers of the output buffers are disabled for bits 0 through 1 for
the SCSI1 (2 through 3 for the SCI0). If SWOM bit in the SP0CR1
nc...
I
3.6.11 Port T
cale Semiconductor,
register is set, the P-channel drivers of the output buffers are disabled
for bits 4 through 7 (wire-ORed mode). The open drain control effects to
both the serial and the general-purpose outputs. If the RDPSx bits in the
PURDS register are set, the appropriate Port S pin drive capabilities are
reduced. If PUPSx bits in the PURDS register are set, the appropriate
pull-up device is connected to each port S pin which is programmed as
a general-purpose input. If the pin is programmed as a general-purpose
output, the pull-up is disconnected from the pin regardless of the state of
the individual PUPSx bits. See Multiple Serial Interface.
This port provides eight general-purpose I/O pins when not enabled for
input capture and output compare in the timer and pulse accumulator
subsystem. The TEN bit in the TSCR register enables the timer function.
The pulse accumulator subsystem is enabled with the PAEN bit in the
PACTL register.
Frees
Register DDRT determines pin direction of port T when used for generalpurpose I/O. When DDRT bits are set, the corresponding pin is
configured for output. On reset the DDRT bits are cleared and the
corresponding pin is configured for input.
Freescale Semiconductor, Inc.
When the PUPT bit in the TMSK2 register is set, all input pins are pulled
up internally by an active pull-up device. Pull-ups are disabled after
reset.
Technical DataMC68HC912D60A — Rev 3.0
58Pinout and Signal DescriptionsMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
nc...
I
cale Semiconductor,
Frees
Port Name
Por t A
PA[7:0]
Por t B
PB[7:0]
Por t AD1
PAD1[7:0]
Por t AD0
PAD0[7:0]
Por t CAN
PCAN[7:0]
Por t E
PE[7:0]
Por t P
PP[7:0]
Por t S
PS[7:0]
Por t T
PT[7:0]
Freescale Semiconductor, Inc.
Setting the RDPT bit in the TMSK2 register configures all port T outputs
to have reduced drive levels. Levels are at normal drive capability after
reset. The TMSK2 register can be read or written anytime after reset
Refer to Enhanced Capture Timer.
Table 3-3. MC68HC912D60A Port Description Summary
Pin NumbersData Direction
80-pin112-pin
48–4164–57
23–1631–24
84/82/80
N/A
60–53
72, 73
25–28,
37–40
76–80,
1–3
70–6396–89
14–11,
7–4
/78/76/7
4/72/70
83/81/79
/77/75/7
3/71/69
(1)
98–105In/Out
36–39,
53–56
108–112
,
1–3
18–15,
7–4
Register
(Address)
In/Out
DDRA ($0002)
In/Out
DDRB ($0003)
InAnalog-to-digital converter 1 and general-purpose I/O.
InAnalog-to-digital converter 0 and general-purpose I/O.
PE[1:0] In
PE[7:2] In/Out
DDRE ($0009)
In/Out
DDRP ($0057)
In/Out
DDRS ($00D7)
In/Out
DDRT ($00AF)
Port A and port B pins are used for address and data in
expanded modes. The port data registers are not in the
address map during expanded and peripheral mode
operation. When in the map, port A and port B can be
read or written any time.
DDRA and DDRB are not in the address map in expanded
or peripheral modes.
General purpose I/O. PCAN[1:0] are used with the
MSCAN12 module and cannot be used as I/O.
Mode selection, bus control signals and interrupt service
request signals; or general-purpose I/O.
General-purpose I/O. PP[3:0] are used with the pulse-width
modulator when enabled.
Serial communications interfaces 1 and 0 and serial
peripheral interface subsystems and general-purpose I/O.
General-purpose I/O when not enabled for input capture
and output compare in the timer and pulse accumulator
subsystem.
Pinout and Signal Descriptions
Description
Port Signals
1. In 80-pin QFP package only TxCAN and RxCAN are available. PortCAN[2:7] pins should either be defined as outputs or
have their pull-ups enabled.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAPinout and Signal Descriptions59
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Pinout and Signal Descriptions
3.6.12 Port Pull-Up Pull-Down and Reduced Drive
MCU ports can be configured for internal pull-up. To reduce power
consumption and RFI, the pin output drivers can be configured to
operate at a reduced drive level. Reduced drive causes a slight increase
in transition time depending on loading and should be used only for ports
which have a light loading. Table 3-4 summarizes the port pull-up/pulldown default status and controls.
Table 3-4. Port Pull-Up, Pull-Down and Reduced Drive Summary
Enable BitReduced Drive Control Bit
nc...
I
cale Semiconductor,
Frees
Port
Name
Port APull-upPUCR ($000C)PUPADisabledRDRIV ($000D)RDPAFull drive
Port BPull-upPUCR ($000C)PUPBDisabledRDRIV ($000D)RDPBFull drive
Por t E:
PE7,
1. Pull-Up when PGUPD input pin is high, Pull-down when PGUPD input pin is low.
In the 80-pin version, PGUPD is internally tied to VDD, hence PG4 is pulled up.
2. Pull-Up when PHUPD input pin is high, Pull-down when PHUPD input pin is low.
In the 80-pin version, PHUPD is internally tied to VSS, hence PH4 is pulled down.
The register block can be mapped to any 2K byte boundary within the
standard 64K byte address space by manipulating bits REG[15:11] in
the INITRG register. INITRG establishes the upper five bits of the
register block’s 16-bit address. The register block occupies the first 512
bytes of the 2K byte block. Default addressing (after reset) is indicated
in Table 4-1. For additional information refer to Operating Modes and
Eight possible operating modes determine the operating configuration of
the MC68HC912D60A. Each mode has an associated default memory
map and external bus configuration. After reset, most system resources
can be mapped to other addresses by writing to the appropriate control
registers.
The operating mode out of reset is determined by the states of the
BKGD, MODB, and MODA pins during reset.
The SMODN, MODB, and MODA bits in the MODE register show current
operating mode and provide limited mode switching during operation.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAOperating Modes and Resource Mapping71
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Operating Modes and Resource Mapping
The states of the BKGD, MODB, and MODA pins are latched into these
bits on the rising edge of the reset signal.
Table 5-1. Mode Selection
BKGDMODBMODAModePort APort B
100Normal Single ChipG.P. I/OG.P. I/O
101Normal Expanded NarrowADDR/DATAADDR
nc...
I
cale Semiconductor,
Frees
110
111Normal Expanded WideADDR/DATAADDR/DATA
000Special Single ChipG.P. I/OG.P. I/O
001Special Expanded NarrowADDR/DATAADDR
010Special PeripheralADDR/DATAADDR/DATA
011Special Expanded WideADDR/DATAADDR/DATA
There are two basic types of operating modes:
Normal modes — some registers and bits are protected
against accidental changes.
Special modes — allow greater access to protected control
registers and bits for special purposes such as testing and
emulation.
For operation above 105°C, the MC68HC912D60A (M temperature
range product only) is limited to single chip modes of operation.
Reserved (Forced to
Peripheral)
——
A system development and debug feature, background debug mode
(BDM), is available in all modes. In special single-chip mode, BDM is
active immediately after reset.
5.3.1 Normal Operating Modes
These modes provide three operating configurations. Background
debugging is available in all three modes, but must first be enabled for
some operations by means of a BDM background command, then
activated.
Technical DataMC68HC912D60A — Rev 3.0
72Operating Modes and Resource MappingMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
nc...
I
Operating Modes and Resource Mapping
Operating Modes
Normal Single-Chip Mode — There are no external address
and data buses in this mode. The MCU operates as a standalone device and all program and data resources are on-chip.
External port pins normally associated with address and data
buses can be used for general-purpose I/O.
Normal Expanded Wide Mode — This is a normal mode of
operation in which the expanded bus is present with a 16-bit
data bus. Ports A and B are used for the 16-bit multiplexed
address/data bus.
Normal Expanded Narrow Mode — This is a normal mode of
operation in which the expanded bus is present with an 8-bit
data bus. Ports A and B are used for the16-bit address bus.
Port A is used as the data bus, multiplexed with addresses. In
this mode, 16-bit data is presented one byte at a time, the high
byte followed by the low byte. The address is automatically
incremented on the second cycle.
5.3.2 Special Operating Modes
cale Semiconductor,
Frees
There are three special operating modes that correspond to normal
operating modes. These operating modes are commonly used in factory
testing and system development. In addition, there is a special
peripheral mode, in which an external master, such as an I.C. tester, can
control the on-chip peripherals.
Special Single-Chip Mode — This mode can be used to force
the MCU to active BDM mode to allow system debug through
the BKGD pin. There are no external address and data buses
in this mode. The MCU operates as a stand-alone device and
all program and data space are on-chip. External port pins can
be used for general-purpose I/O.
Special Expanded Wide Mode — This mode can be used for
emulation of normal expanded wide mode and emulation of
normal single-chip mode. Ports A and B are used for the 16-bit
multiplexed address/data bus.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAOperating Modes and Resource Mapping73
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Operating Modes and Resource Mapping
Special Expanded Narrow Mode — This mode can be used
for emulation of normal expanded narrow mode. Ports A and B
are used for the16-bit address bus. Port A is used as the data
bus, multiplexed with addresses. In this mode, 16-bit data is
presented one byte at a time, the high byte followed by the low
byte. The address is automatically incremented on the second
cycle.
Special Peripheral Mode — The CPU is not active in this
mode. An external master can control on-chip peripherals for
testing purposes. It is not possible to change to or from this
mode without going through reset. Background debugging
nc...
I
should not be used while the MCU is in special peripheral
mode as internal bus conflicts between BDM and the external
master can cause improper operation of both modes.
5.4 Background Debug Mode
cale Semiconductor,
Background debug mode (BDM) is an auxiliary operating mode that is
used for system development. BDM is implemented in on-chip hardware
and provides a full set of debug operations. Some BDM commands can
be executed while the CPU is operating normally. Other BDM
commands are firmware based, and require the BDM firmware to be
enabled and active for execution.
In special single-chip mode, BDM is enabled and active immediately out
of reset. BDM is available in all other operating modes, but must be
enabled before it can be activated. BDM should not be used in special
peripheral mode because of potential bus conflicts.
Frees
Once enabled, background mode can be made active by a serial
command sent via the BKGD pin or execution of a CPU12 BGND
instruction. While background mode is active, the CPU can interpret
special debugging commands, and read and write CPU registers,
peripheral registers, and locations in memory.
While BDM is active, the CPU executes code located in a small on-chip
ROM mapped to addresses $FF20 to $FFFF, and BDM control registers
are accessible at addresses $FF00 to $FF06. The BDM ROM replaces
Technical DataMC68HC912D60A — Rev 3.0
74Operating Modes and Resource MappingMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Operating Modes and Resource Mapping
Background Debug Mode
the regular system vectors while BDM is active. While BDM is active, the
user memory from $FF00 to $FFFF is not in the map except through
serial BDM commands.
Bit 7654321Bit 0
SMODNMODBMODAESTRIVISEBSWAI0EME
RESET:00011001Special Single Chip
RESET:00111001Special Exp Nar
RESET:01011001 Peripheral
nc...
I
RESET:01111001Special Exp Wide
RESET:10010000Normal Single Chip
RESET:10110000Normal Exp Nar
RESET:11110000Normal Exp Wide
MODE — Mode Register$000B
MODE controls the MCU operating mode and various configuration
options. This register is not in the map in peripheral mode
SMODN, MODB, MODA — Mode Select Special, B and A
These bits show the current operating mode and reflect the status of
the BKGD, MODB and MODA input pins at the rising edge of reset.
cale Semiconductor,
SMODN is Read anytime. May only be written in special modes
(SMODN = 0). The first write is ignored;
MODB, MODA may be written once in Normal modes (SMODN = 1).
Frees
Write anytime in special modes (first write is ignored) – special
peripheral and reserved modes cannot be selected.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAOperating Modes and Resource Mapping75
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Operating Modes and Resource Mapping
ESTR — E Clock Stretch Enable
Determines if the E Clock behaves as a simple free-running clock or
as a bus control signal that is active only for external bus cycles.
ESTR is always 1 in expanded modes since it is required for address
and data bus de-multiplexing and must follow stretched cycles.
0 = E never stretches (always free running).
1 = E stretches high during external access cycles and low during
non-visible internal accesses (IVIS=0).
Normal modes: write once; Special modes: write anytime. Read
anytime.
nc...
I
cale Semiconductor,
Frees
IVIS — Internal Visibility
This bit determines whether internal ADDR, DATA, R/W and LSTRB
signals can be seen on the external bus during accesses to internal
locations. In Special Narrow Mode if this bit is set and an internal
access occurs the data will appear wide on Ports A and B. This serves
the same function as the EMD bit of the non-multiplexed versions of
the HC12 and allows for emulation. Visibility is not available when the
part is operating in a single-chip mode.
0 = No visibility of internal bus operations on external bus.
1 = Internal bus operations are visible on external bus.
Normal modes: write once; Special modes: write anytime EXCEPT
the first time. Read anytime.
EBSWAI — External Bus Module Stop in Wait Control
This bit controls access to the external bus interface when in wait
mode. The module will delay before shutting down in wait mode to
allow for final bus activity to complete.
0 = External bus and registers continue functioning during wait mode.
1 = External bus is shut down during wait mode.
Normal modes: write anytime; Special modes: write never. Read
anytime.
Technical DataMC68HC912D60A — Rev 3.0
76Operating Modes and Resource MappingMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
EME — Emulate Port E
nc...
5.5 Internal Resource Mapping
I
Freescale Semiconductor, Inc.
In single-chip mode PORTE and DDRE are always in the map
regardless of the state of this bit.
0 = PORTE and DDRE are in the memory map.
1 = If in an expanded mode, PORTE and DDRE are removed from the
internal memory map. Removing the registers from the map allows
the user to emulate the function of these registers externally.
Normal modes: write once; special modes: write anytime EXCEPT
the first time. Read anytime.
Operating Modes and Resource Mapping
Internal Resource Mapping
cale Semiconductor,
Frees
The internal register block, RAM, and EEPROM have default locations
within the 64K byte standard address space but may be reassigned to
other locations during program execution by setting bits in mapping
registers INITRG, INITRM, and INITEE. During normal operating modes
these registers can be written once. It is advisable to explicitly establish
these resource locations during the initialization phase of program
execution, even if default values are chosen, in order to protect the
registers from inadvertent modification later.
Writes to the mapping registers go into effect between the cycle that
follows the write and the cycle after that. To assure that there are no
unintended operations, a write to one of these registers should be
followed with a NOP instruction.
If conflicts occur when mapping resources, the register block will take
precedence over the other resources; RAM or EEPROM addresses
occupied by the register block will not be available for storage. When
active, BDM ROM takes precedence over other resources, although a
conflict between BDM ROM and register space is not possible. The
following table shows resource mapping precedence.
In expanded modes, all address space not used by internal resources is
by default external memory.
The MC68HC912D60A contains 60K bytes of Flash EEPROM
nonvolatile memory which can be used to store program code or static
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAOperating Modes and Resource Mapping77
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Operating Modes and Resource Mapping
data. It is made of the 28K byte FEE28 array mapped from $1000 to
$7FFF at reset and of the 32 K byte FEE32 array mapped from $8000 to
$FFFF at reset. MAPROM bit in the MISC register allows the swapping
of the two flash arrays.
PrecedenceResource
1BDM ROM (if active)
2Register Space
nc...
I
3RAM
4EEPROM
Table 5-2. Mapping Precedence
5On-Chip Flash EEPROM (MC68HC912D60A)
6External Memory
5.5.1 Register Block Mapping
After reset the 512 byte register block resides at location $0000 but can
be reassigned to any 2K byte boundary within the standard 64K byte
address space. Mapping of internal registers is controlled by five bits in
the INITRG register. The register block occupies the first 512 bytes of the
2K byte block.
cale Semiconductor,
Bit 7654321Bit 0
REG15REG14REG13REG12REG1100MMSWAI
Frees
RESET:00000000
INITRG — Initialization of Internal Register Position Register$0011
REG[15:11] — Internal register map position
These bits specify the upper five bits of the 16-bit registers address.
Normal modes: write once; special modes: write anytime. Read
anytime.
Technical DataMC68HC912D60A — Rev 3.0
78Operating Modes and Resource MappingMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
nc...
5.5.2 RAM Mapping
I
Freescale Semiconductor, Inc.
MMSWAI — Memory Mapping Interface Stop in Wait Control
This bit controls access to the memory mapping interface when in
Wait mode.
Normal modes: write anytime; special modes: write never. Read
anytime.
0 = Memory mapping interface continues to function during Wait
mode.
1 = Memory mapping interface access is shut down during Wait
mode.
Operating Modes and Resource Mapping
Internal Resource Mapping
The MC68HC912D60A has 2K byte of fully static RAM that is used for
storing instructions, variables, and temporary data during program
execution. After reset, RAM addressing begins at location $0000 but can
be assigned to any 2K byte boundary within the standard 64K byte
address space. Mapping of internal RAM is controlled by five bits in the
INITRM register.
After reset, the first 512 bytes of RAM have their access inhibited by the
presence of the register address space. After initial MCU configuration,
it is recommended to map the register space at location $0800.
Bit 7654321Bit 0
cale Semiconductor,
RESET:00000000
INITRM — Initialization of Internal RAM Position Register$0010
RAM15RAM14RAM13RAM12RAM11000
Frees
RAM[15:11] — Internal RAM map position
These bits specify the upper five bits of the 16-bit RAM address.
Normal modes: write once; special modes: write anytime. Read
anytime.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAOperating Modes and Resource Mapping79
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Operating Modes and Resource Mapping
5.5.3 EEPROM Mapping
The MC68HC912D60A has 1K bytes of EEPROM which is activated by
the EEON bit in the INITEE register. Mapping of internal EEPROM is
controlled by four bits in the INITEE register. After reset EEPROM
address space begins at location $0C00 but can be mapped to any 4K
byte boundary within the standard 64K byte address space.
Bit 7654321Bit 0
EE15EE14EE13EE12000EEON
RESET:00000001
INITEE— Initialization of Internal EEPROM Position Register$0012
nc...
I
cale Semiconductor,
Frees
EE[15:12] — Internal EEPROM map position
These bits specify the upper four bits of the 16-bit EEPROM address.
Normal modes: write once; special modes: write anytime. Read
anytime.
EEON — internal EEPROM On (Enabled)
This bit is forced to one in single-chip modes.
Read or write anytime.
0 = Removes the EEPROM from the map.
1 = Places the on-chip EEPROM in the memory map at the address
selected by EE[15:12].
Technical DataMC68HC912D60A — Rev 3.0
80Operating Modes and Resource MappingMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
5.5.4 Miscellaneous System Control Register
Additional mapping and external resource controls are available. To use
external resources the part must be operated in one of the expanded
modes.
MISC — Miscellaneous Mapping Control Register$0013
nc...
I
Normal modes: write once; Special modes: write anytime. Read
anytime.
Operating Modes and Resource Mapping
Internal Resource Mapping
cale Semiconductor,
Frees
MAPROM — Map Location of ROM
This bit is used to swap the location of the on-chip Flash EEPROM.
0 = 28K byte array is mapped from $1000 to $7FFF, 32K byte array
is mapped from $8000 to $FFFF.
1 = 28K byte is mapped from $9000 to $FFFF, 32K byte array is
mapped from $0000 to $7FFF.
NDRF — Narrow Data Bus for Register-Following Map Space
This bit enables a narrow bus feature for the 512 byte RegisterFollowing Map. This is useful for accessing 8-bit peripherals and
allows 8-bit and 16-bit external memory devices to be mixed in a
system. In Expanded Narrow (eight bit) modes, Single Chip Modes,
and Peripheral mode, this bit has no effect.
0 = Makes Register-Following MAP space act as a full 16 bit data bus.
1 = Makes the Register-Following MAP space act the same as an 8
bit only external data bus (data only goes through port A externally).
The Register-Following space is mapped from $0200 to $03FF after
reset, which is next to the register map. If the registers are moved this
space follows.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAOperating Modes and Resource Mapping81
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Operating Modes and Resource Mapping
RFSTR1, RFSTR0 — Register Following Stretch
This two bit field determines the amount of clock stretch on accesses
to the 512 byte Register Following Map. It is valid regardless of the
state of the NDRF bit. In Single Chip and Peripheral Modes this bit
has no meaning or effect.
Table 5-3. RFSTR Stretch Bit Definition
RFSTR1RFSTR0
000
011
nc...
I
102
113
Number of E Clocks
Stretched
EXSTR1, EXSTR0 — External Access Stretch
This two bit field determines the amount of clock stretch on accesses
to the External Address Space. In Single Chip and Peripheral Modes
this bit has no meaning or effect.
Table 5-4. EXSTR Stretch Bit Definition
EXSTR1EXSTR0
000
cale Semiconductor,
011
102
113
Number of E Clocks
Stretched
Frees
ROMON28, ROMON32 — Enable bits for ROM
These bits are used to enable the Flash EEPROM arrays FEE28 and
FEE32 respectively.
0 = Corresponding Flash EEPROM array disabled from the memory
map.
1 = Corresponding Flash EEPROM array enabled in the memory
map.
Technical DataMC68HC912D60A — Rev 3.0
82Operating Modes and Resource MappingMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
5.6 Memory Maps
Freescale Semiconductor, Inc.
Operating Modes and Resource Mapping
Memory Maps
The following diagrams illustrate the memory map for each mode of
operation immediately after reset.
Internally the MC68HC912D60A has full 16-bit data paths, but
depending upon the operating mode and control registers, the external
multiplexed bus may be 8 or 16 bits. There are cases where 8-bit and
16-bit accesses can appear on adjacent cycles using the LSTRB signal
to indicate 8- or 16-bit data.
It is possible to have a mix of 8 and 16 bit peripherals attached to the
external multiplexed bus, using the NDRF bit in the MISC register while
in expanded wide modes.
cale Semiconductor,
6.3 Detecting Access Type from External Signals
Frees
The external signals LSTRB, R/W, and A0 can be used to determine the
type of bus access that is taking place. Accesses to the internal RAM
module are the only type of access that produce LSTRB
because the internal RAM is specifically designed to allow misaligned
16-bit accesses in a single cycle. In these cases the data for the address
=A0=1,
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLABus Control and Input/Output85
For More Information On This Product,
Go to: www.freescale.com
Bus Control and Input/Output
that was accessed is on the low half of the data bus and the data for
address + 1 is on the high half of the data bus.
nc...
I
Freescale Semiconductor, Inc.
Figure 6-1. Access Type vs. Bus Control Pins
LSTRBA0R/WType of Access
1018-bit read of an even address
0118-bit read of an odd address
1008-bit write of an even address
0108-bit write of an odd address
00116-bit read of an even address
111
00016-bit write to an even address
110
16-bit read of an odd address
(low/high data swapped)
16-bit write to an even address
(low/high data swapped)
6.4 Registers
cale Semiconductor,
Frees
Not all registers are visible in the MC68HC912D60A memory map under
certain conditions. In special peripheral mode the first 16 registers
associated with bus expansion are removed from the memory map.
In expanded modes, some or all of port A, port B, and port E are used
for expansion buses and control signals. In order to allow emulation of
the single-chip functions of these ports, some of these registers must be
rebuilt in an external port replacement unit. In any expanded mode, port
A, and port B, are used for address and data lines so registers for these
ports, as well as the data direction registers for these ports, are removed
from the on-chip memory map and become external accesses.
In any expanded mode, port E pins may be needed for bus control (e.g.,
ECLK, R/W). To regain the single-chip functions of port E, the emulate
port E (EME) control bit in the MODE register may be set. In this special
case of expanded mode and EME set, PORTE and DDRE registers are
removed from the on-chip memory map and become external accesses
so port E may be rebuilt externally.
Technical DataMC68HC912D60A — Rev 3.0
86Bus Control and Input/OutputMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Bit 7654321Bit 0
Single ChipPA7PA6PA5PA4PA3PA2PA1PA0
RESET:————————
Bus Control and Input/Output
Registers
Expanded
& Periph:
Expanded
narrow
PORTA — Port A Register$0000
nc...
I
ADDR15/
DATA15
ADDR15/
DATA15/
DATA7
ADDR14/
DATA14
ADDR14/
DATA14/
DATA6
ADDR13/
DATA13
ADDR13/
DATA13/
DATA5
ADDR12/
DATA12
ADDR12/
DATA12/
DATA4
ADDR11/
DATA11
ADDR11/
DATA11/
DATA3
ADDR10/
DATA10
ADDR10/
DATA10/
DATA2
ADDR9/
DATA9
ADDR9/
DATA9/
DATA1
ADDR8/
DATA8
ADDR8/
DATA8/
DATA0
Bits PA[7:0] are associated respectively with addresses ADDR[15:8],
DATA[15:8] and DATA[7:0], in narrow mode. When this port is not used
for external addresses such as in single-chip mode, these pins can be
used as general-purpose I/O. DDRA determines the primary direction of
each pin. This register is not in the on-chip map in expanded and
peripheral modes. Read and write anytime.
Bit 7654321Bit 0
DDA7DDA6DDA5DDA4DDA3DDA2DDA1DDA0
RESET:00000000
DDRA — Port A Data Direction Register$0002
cale Semiconductor,
This register determines the primary direction for each port A pin when
functioning as a general-purpose I/O port. DDRA is not in the on-chip
Frees
map in expanded and peripheral modes. Read and write anytime.
0 = Associated pin is a high-impedance input
1 = Associated pin is an output
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLABus Control and Input/Output87
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Bus Control and Input/Output
Bit 7654321Bit 0
Single ChipPB7PB6PB5PB4PB3PB2PB1PB0
RESET:————————
Expanded
& Periph:
Expanded
narrow
PORTB — Port B Register$0001
nc...
I
ADDR7/
DATA7
ADDR7ADDR6ADDR5ADDR4ADDR3ADDR2ADDR1ADDR0
ADDR6/
DATA6
ADDR5/
DATA5
ADDR4/
DATA4
ADDR3/
DATA3
ADDR2/
DATA2
ADDR1/
DATA1
ADDR0/
DATA0
Bits PB[7:0] are associated with addresses ADDR[7:0] and DATA[7:0]
(except in narrow mode) respectively. When this port is not used for
external addresses such as in single-chip mode, these pins can be used
as general-purpose I/O. DDRB determines the primary direction of each
pin. This register is not in the on-chip map in expanded and peripheral
modes. Read and write anytime.
Bit 7654321Bit 0
DDB7DDB6DDB5DDB4DDB3DDB2DDB1DDB0
RESET:00000000
DDRB — Port B Data Direction Register$0003
cale Semiconductor,
This register determines the primary direction for each port B pin when
functioning as a general-purpose I/O port. DDRB is not in the on-chip
Frees
map in expanded and peripheral modes. Read and write anytime.
0 = Associated pin is a high-impedance input
1 = Associated pin is an output
Technical DataMC68HC912D60A — Rev 3.0
88Bus Control and Input/OutputMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
BIT 7654321BIT 0
PE7PE6PE5PE4PE3PE2PE1PE0
RESET:————————
Bus Control and Input/Output
Registers
or
or
MODB or
IPIPE1 or
CGMTST
MODA or
IPIPE0
ECLK
Alt. Pin
Function
PORTE — Port E Register$0008
DBE
ECLK
CAL
LSTRB
or
BDTAGL or
TAGLO
R/WIRQXIRQ
This register is associated with external bus control signals and interrupt
nc...
I
inputs, including data bus enable (DBE
MODA/IPIPE0), ECLK, size (LSTRB), read/write (R/W), IRQ, and XIRQ.
), mode select (MODB/IPIPE1,
When the associated pin is not used for one of these specific functions,
the pin can be used as general-purpose I/O. The port E assignment
register (PEAR) selects the function of each pin. DDRE determines the
primary direction of each port E pin when configured to be generalpurpose I/O.
Some of these pins have software selectable pull-ups (DBE, LSTRB,
R/W, IRQ, and XIRQ). A single control bit enables the pull-ups for all
these pins which are configured as inputs.
This register is not in the map in peripheral mode or expanded modes
when the EME bit is set.
cale Semiconductor,
Read and write anytime.
Frees
Bit 7654321Bit 0
DDE7DDE6DDE5DDE4DDE3DDE200
RESET:00000000
DDRE — Port E Data Direction Register$0009
This register determines the primary direction for each port E pin
configured as general-purpose I/O.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLABus Control and Input/Output89
For More Information On This Product,
Go to: www.freescale.com
Bus Control and Input/Output
PE[1:0] are associated with XIRQ and IRQ and cannot be configured as
outputs. These pins can be read regardless of whether the alternate
interrupt functions are enabled.
This register is not in the map in peripheral mode and expanded modes
while the EME control bit is set.
Read and write anytime.
nc...
I
BIT 7654321BIT 0
Freescale Semiconductor, Inc.
0 = Associated pin is a high-impedance input
1 = Associated pin is an output
NDBECGMTEPIPOENECLKLSTRERDWECALEDBENE
RESET:00000000
RESET:00101100
RESET:11010000Peripheral
RESET:10010000
RESET:00101100
PEAR — Port E Assignment Register$000A
cale Semiconductor,
The PEAR register is used to choose between the general-purpose I/O
functions and the alternate bus control functions of port E. When an
alternate control function is selected, the associated DDRE bits are
Frees
overridden.
The reset condition of this register depends on the mode of operation
because bus-control signals are needed immediately after reset in some
modes.
Normal
Expanded
Special
Expanded
Normal
single chip
Special
single chip
In normal single-chip mode, no external bus control signals are needed
so all of port E is configured for general-purpose I/O.
Technical DataMC68HC912D60A — Rev 3.0
90Bus Control and Input/OutputMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
In normal expanded modes, the reset vector is located in external
memory. The DBE and ECLK are required for de-multiplexing address
and data, but LSTRB and R/W are only needed by the system when
there are external writable resources. Therefore in normal expanded
modes, only the DBE and ECLK are configured for their alternate bus
control functions and the other bits of port E are configured for generalpurpose I/O. If the normal expanded system needs any other bus-control
signals, PEAR would need to be written before any access that needed
the additional signals.
In special expanded modes, DBE, IPIPE1, IPIPE0, E, LSTRB, and R/W
are configured as bus-control signals.
nc...
I
In peripheral mode, the PEAR register is not accessible for reads or
writes. However, the CGMTE control bit is reset to one to configure PE6
as a test output from the PLL module.
0 = PE7 is used for DBE, external control of data enable on
memories, or inverted ECLK.
1 = PE7 is the CAL function if CALE bit is set in PEAR register or
general-purpose I/O.
NDBE controls the use of the DBE
effect in Single Chip or Peripheral Modes. The associated pin will
default to the CAL function if the CALE bit is set in PEAR register or
otherwise to an I/O.
0 = PE6 is general-purpose I/O or pipe output.
1 = PE6 is a test signal output from the CGM module (no effect in
single chip or normal expanded modes). PIPOE = 1 overrides
this function and forces PE6 to be a pipe status output signal.
pin of Port E. The NDBE bit has no
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLABus Control and Input/Output91
For More Information On This Product,
Go to: www.freescale.com
Bus Control and Input/Output
PIPOE — Pipe Status Signal Output Enable
NECLK — No External E Clock
nc...
I
Freescale Semiconductor, Inc.
Normal: write once; Special: write anytime EXCEPT the first time.
Read anytime.
0 = PE[6:5] are general-purpose I/O (if CGMTE = 1, PE6 is a test
1 = PE[6:5] are outputs and indicate the state of the instruction
Normal single chip: write once; special single chip: write anytime; all
other modes: write never. Read anytime. In peripheral mode, E is an
input and in all other modes, E is an output.
0 = PE4 is the external ECLK pin subject to the following limitation:
1 = PE4 is a general-purpose I/O pin.
output signal from the CGM module).
queue (only effective in expanded modes).
In single-chip modes, to get an ECLK output signal, it is
necessary to have ESTR = 0 in addition to NECLK = 0.
cale Semiconductor,
Frees
LSTRE — Low Strobe (LSTRB) Enable
Normal: write once; Special: write anytime EXCEPT the first time.
Read anytime. This bit has no effect in single-chip modes or normal
expanded narrow mode.
0 = PE3 is a general-purpose I/O pin.
1 = PE3 is configured as the LSTRB bus-control output, provided
the MCU is not in single chip or normal expanded narrow
modes.
LSTRB
mode, LSTRB
external writes. External reads do not normally need LSTRB because
all 16 data bits can be driven even if the MCU only needs 8 bits of
data.
In normal expanded narrow mode this pin is reset to an output driving
high allowing the pin to be an output while in and immediately after
reset.
TAGLO is a shared function of the PE3/LSTRB pin. In special
expanded modes with LSTRE set and the BDM tagging on, a zero at
the falling edge of E tags the instruction word low byte being read into
the instruction queue.
is used during external writes. After reset in normal expanded
is disabled. If needed, it should be enabled before
Technical DataMC68HC912D60A — Rev 3.0
92Bus Control and Input/OutputMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
RDWE — Read/Write Enable
Normal: write once; Special: write anytime EXCEPT the first time.
Read anytime. This bit has no effect in single-chip modes.
0 = PE2 is a general-purpose I/O pin.
1 = PE2 is configured as the R/W pin. In single chip modes, RDWE
R/W is used for external writes. After reset in normal expanded mode,
it is disabled. If needed it should be enabled before any external
writes.
CALE — Calibration Reference Enable
Bus Control and Input/Output
Registers
has no effect and PE2 is a general-purpose I/O pin.
nc...
I
cale Semiconductor,
Frees
Read and write anytime.
0 = Calibration reference is disabled and PE7 is general-purpose
I/O in single chip or peripheral modes or if the NDBE bit is set.
1 = Calibration reference is enabled on PE7 in single chip and
peripheral modes or if the NDBE bit is set.
DBENE — DBE or Inverted E Clock on Port E[7]
Normal modes: write once. Special modes: write anytime EXCEPT
the first; read anytime.
DBENE controls which signal is output on PE7 when NDBE control bit
is cleared. The inverted ECLK output can be used to latch the address
for demultiplexing. It has the same behaviour as the ECLK, except it
is inverted. Please note that in the case of idle expansion bus, the ‘not
ECLK’ signal could stay high for many cycles.
The DBNE bit has no effect in single chip or peripheral modes and
PE7 is defaulted to the CAL function if the CALE bit is set in the PEAR
register or to an I/O otherwise.
0 = PE7 pin used for DBE external control of data enable on
memories in expanded modes when NDBE = 0
1 = PE7 pin used for inverted ECLK output in expanded modes
when NDBE = 0
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLABus Control and Input/Output93
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Bus Control and Input/Output
Bit 7654321Bit 0
PUPHPUPG0PUPE00PUPBPUPA
RESET:11010000
PUCR — Pull-Up Control Register$000C
These bits select pull-up resistors for any pin in the corresponding port
that is currently configured as an input. This register is not in the map in
peripheral mode.
nc...
I
cale Semiconductor,
Frees
Read and write anytime.
PUPH — Pull-Up or Pull-Down Port H Enable
0 = Port H pull-ups are disabled.
1 = Enable pull-up/down devices for all port H input pins.
PUPG — Pull-Up or Pull-Down Port G Enable
0 = Port G pull-ups are disabled.
1 = Enable pull-up/down devices for all port G input pins.
PUPE — Pull-Up Port E Enable
0 = Port E pull-ups on PE7 and PE[3:0] are disabled.
1 = Enable pull-up devices for port E input pins PE7 and PE[3:0].
PUPB — Pull-Up Port B Enable
0 = Port B pull-ups are disabled.
1 = Enable pull-up devices for all port B input pins.
This bit has no effect if port B is being used as part of the address/data
bus (the pull-ups are inactive).
PUPA — Pull-Up Port A Enable
0 = Port A pull-ups are disabled.
1 = Enable pull-up devices for all port A input pins.
This bit has no effect if port A is being used as part of the address/data
bus (the pull-ups are inactive).
Technical DataMC68HC912D60A — Rev 3.0
94Bus Control and Input/OutputMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Bit 7654321Bit 0
0RDPHRDPG0RDPE0RDPBRDPA
RESET:00000000
RDRIV — Reduced Drive of I/O Lines$000D
These bits select reduced drive for the associated port pins. This gives
reduced power consumption and reduced RFI with a slight increase in
transition time (depending on loading). The reduced drive function is
independent of which function is being used on a particular port.
nc...
I
This register is not in the map in peripheral mode.
Bus Control and Input/Output
Registers
cale Semiconductor,
Frees
Normal: write once; Special: write anytime EXCEPT the first time. Read
anytime.
RDPH — Reduced Drive of Port H
0 = All port H output pins have full drive enabled.
1 = All port H output pins have reduced drive capability.
RDPG — Reduced Drive of Port G
0 = All port G output pins have full drive enabled.
1 = All port G output pins have reduced drive capability.
RDPE — Reduced Drive of Port E
0 = All port E output pins have full drive enabled.
1 = All port E output pins have reduced drive capability.
RDPB — Reduced Drive of Port B
0 = All port B output pins have full drive enabled.
1 = All port B output pins have reduced drive capability.
RDPA — Reduced Drive of Port A
0 = All port A output pins have full drive enabled.
1 = All port A output pins have reduced drive capability.
The two Flash EEPROM modules (32-Kbyte and 28-Kbyte) for the
MC68HC912D60A serve as electrically erasable and programmable,
non-volatile ROM emulation memory. The modules can be used for
program code that must either execute at high speed or is frequently
executed, such as operating system kernels and standard subroutines,
or they can be used for static data which is read frequently. The Flash
EEPROM is ideal for program storage for single-chip applications
allowing for field reprogramming.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAFlash Memory97
For More Information On This Product,
Go to: www.freescale.com
Flash Memory
7.3 Overview
nc...
I
Freescale Semiconductor, Inc.
The Flash EEPROM array is arranged in a 16-bit configuration and may
be read as either bytes, aligned words or misaligned words. Access time
is one bus cycle for byte and aligned word access and two bus cycles for
misaligned word operations.
The Flash EEPROM module supports bulk erase only.
Each Flash EEPROM module has hardware interlocks which protect
stored data from accidental corruption. An erase- and programprotected 8-Kbyte block for boot routines is located at $6000–$7FFF or
$E000–$FFFF depending upon the mapped location of the Flash
EEPROM arrays.
On 1L02H and later mask sets, an optional protection scheme is
supported to protect the entire two Flash EEPROM modules (32-Kbyte
and 28-Kbyte) against accident program or erase. This is achieved using
the protection bit FPOPEN in EEPROM EEMCR (see 7.11 Flash
protection bit FPOPEN).
7.4 Flash EEPROM Control Block
A 4-byte register block for each module controls the Flash EEPROM
operation. Configuration information is specified and programmed
independently from the contents of the Flash EEPROM array.
cale Semiconductor,
After reset, the control register block for the 32K Flash EEPROM array
(FEE32) is located from addresses $00F4 to $00F7 and for the 28K
Flash EEPROM array (FEE28) from $00F8 to $00FB.
Frees
7.5 Flash EEPROM Arrays
After reset, the 32K Flash EEPROM array is located from addresses
$8000 to $FFFF and the 28K Flash EEPROM array is from $1000 to
$7FFF. In expanded modes, the Flash EEPROM arrays are turned off.
The Flash EEPROM can be mapped to an alternate address range. See
Operating Modes and Resource Mapping.
Technical DataMC68HC912D60A — Rev 3.0
98Flash MemoryMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Flash EEPROM Registers
7.6 Flash EEPROM Registers
FEE32LCK/FEE28LCK — Flash EEPROM Lock Control Register$00F4/$00F8
Bit 7654321Bit 0
0000000LOCK
RESET:00000000
In normal modes the LOCK bit can only be written once after reset.
LOCK — Lock Register Bit
0 = Enable write to FEEMCR register
1 = Disable write to FEEMCR register
This register controls the operation of the Flash EEPROM array. BOOTP
cannot be changed when the LOCK control bit in the FEELCK register is
set or if HVEN or PGM or ERAS in the FEECTL register is set .
BOOTP — Boot Protect
The boot blocks are located at $6000–$7FFF and $E000–$FFFF for
each Flash EEPROM module.
cale Semiconductor,
0 = Enable erase and program of 8K byte boot block
1 = Disable erase and program of 8K byte boot block
FEE32CTL/FEE28CTL — Flash EEPROM Control Register$00F7/$00FB
Frees
Bit 7654321Bit 0
000FEESWAIHVEN0ERASPGM
RESET:00000000
This register controls the programming and erasure of the Flash
EEPROM.
MC68HC912D60A — Rev 3.0Technical Data
MOTOROLAFlash Memory99
For More Information On This Product,
Go to: www.freescale.com
Flash Memory
Freescale Semiconductor, Inc.
FEESWAI — Flash EEPROM Stop in Wait Control
0 = Do not halt Flash EEPROM clock when the part is in wait mode.
0 = Halt Flash EEPROM clock when the part is in wait mode.
HVEN — High-Voltage Enable
This bit enables the charge pump to supply high voltages for program
and erase operations in the array. HVEN can only be set if either PGM
or ERAS are set and the proper sequence for program or erase is
followed.
0 = Disables high voltage to array and charge pump off
1 = Enables high voltage to array and charge pump on
nc...
I
cale Semiconductor,
7.7 Operation
Frees
ERAS — Erase Control
This bit configures the memory for erase operation. ERAS is
interlocked with the PGM bit such that both bits cannot be equal to 1
or set to1 at the same time.
0 = Erase operation is not selected.
1 = Erase operation selected.
PGM — Program Control
This bit configures the memory for program operation. PGM is
interlocked with the ERAS bit such that both bits cannot be equal to 1
or set to1 at the same time.
0 = Program operation is not selected.
1 = Program operation selected.
The Flash EEPROM can contain program and data. On reset, it can
operate as a bootstrap memory to provide the CPU with internal
initialization information during the reset sequence.
7.7.1 Bootstrap Operation Single-Chip Mode
After reset, the CPU controlling the system will begin booting up by
fetching the first program address from address $FFFE.
Technical DataMC68HC912D60A — Rev 3.0
100Flash MemoryMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.