To provide the most up-to-date information, the revision of our
documents on the World Wide Web will be the most current. Your printed
copy may b e an earlier revision. To ve rify you have the latest information
available, refer to:
http://www.motorola.com/semiconductors/
The following revision history table summarizes changes contained in
this document. For your convenience, the page number designators
have been linked to the appropriate location.
This documen t contains a detail ed description of the M68HC11 E series
of 8-bit microcontroller units (MCUs). These MCUs all combine the
M68HC11 centra l proce ssor un it (C PU ) with h ig h-pe rfor manc e, on- chip
peripherals.
Section 1. General Descr ip tion
The E series is comprised of many devices with various
configurations of:
With the exception of a few minor differences, the operation of all
E-series MCUs is identical. A fully static design and high-density
complementary metal-oxide semiconductor (HCMOS) fabrication
process allow the E-seri es devices to operate at frequencies fr om 3 MHz
to dc with very low power consumption.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAGeneral Description 23
General Description
1.3 Features
Features of the E-series devices include:
•M68HC11 CPU
•Power-saving stop and wait modes
•Low-voltage devices available (3.0–5.5 Vdc)
•0, 256, 512, or 768 bytes of on-chip RAM, data retained during
standby
•0, 12, or 20 Kbytes of on-chip ROM or EPROM
•0, 512, or 2048 bytes of on-chip EEPROM with block protect for
security
•2048 bytes of EEP ROM with selectable base address in the
MC68HC811E2
•Asynchronous non-return-to-zero (NRZ) serial communications
interface (SCI)
•Additional baud rates available on MC68HC(7)11E20
Figure 2-5. Pin Assignments for 48-Pin DIP (MC68HC811E2)
2.3 VDD and VSS
Power is supplied to the MCU through VDD and VSS. VDD is the power
supply, VSS is ground. The MC U operate s from a s ingle 5- volt (nomi nal)
power supply. Low-voltage devices in the E series operate at
3.0–5.5 volts.
Very fast signal tra nsitions occur on the MCU pins. The short r ise and fall
times place high, short duration current demands on the power supply.
To prevent nois e problems, pro vide good power sup ply bypassing at t he
MCU. Also, use bypass capacitors that have good
Technical DataMC68HC11E Family — Rev. 4
32Pin DescriptionsMOTOROLA
Pin Descriptions
VDD and VSS
high-frequen cy characteristics and situate them as close to the MCU as
possible. Bypa ss requirements var y, depending on h ow heavily the M CU
pins are loaded.
V
DD
2
IN
RESET
MC34(0/1)64
GND
3
V
DD
4.7 kΩ
1
TO RESET
OF M68HC11
Figure 2-6. External Reset Circuit
V
DD
IN
RESET
V
DD
MC34064
GND
V
DD
4.7 kΩ
TO RESET
OF M68HC11
MANUAL
RESET SWITCH
4.7 kΩ
OPTIONAL POWER-ON DELAY AND MANUAL RESET SWITCH
4.7 kΩ
1.0 µF
IN
RESET
MC34164
GND
Figure 2-7. External Reset Circuit with Delay
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAPin Descriptions 33
Pin Des cr ip t io ns
2.4 RESET
CAUTION:Do not connect an external resistor capacitor (RC) power-up delay
A bidirectional control signal, RESET, acts as an input to initialize the
MCU to a known startup state. It also acts as an open-drain output to
indicate that an internal failure has been detected in either the clock
monitor or computer operating properly (COP) watchdog circuit. The
CPU distinguishes between internal and external reset conditions by
sensing whether the reset pin rises to a logic 1 in less than two E-clock
cycles after a reset has occurred. See Figure 2-6 and Figure 2-7.
circuit to the reset pin of M68HC11 devices because the circuit charge
time constant can cau se t he devi ce to misinter pre t th e type of reset that
occurred.
Because the CPU is not able to fetch and execute instructions properly
when V
be controlled. A low-voltage inhibit (LVI) circuit is required primarily for
protection of EEPROM contents. However, since the configuration
register (CONFIG) value is read from the EEPROM, protection is
required even if the EEPROM array is not being used.
falls below the minimum operating voltage level, reset must
DD
Presently, there are several economi cal way s to solve this pro blem. For
example, two good external components for LVI reset are:
1.The Seiko S0854HN (or other S805 series devices):
—Extremely low power (2 µA)
—TO-92 package
—Limited temperature range, –20°C to +70°C
—Av ailabl e in various trip-poi nt voltage rang es
2.The Motorola MC34064:
—TO-92 or SO-8 package
—Draws about 300 µA
—Temperature range –40°C to 85°C
—Well controlled trip point
—Inexpensive
Refer to Section 5. Resets and Interrupts for further information.
Technical DataMC68HC11E Family — Rev. 4
34Pin DescriptionsMOTOROLA
Crystal Driver and External Clock Input (XTAL and EXTAL)
2.5 Crystal Driver and External Clock Input (XTAL and EXTAL)
These two pins provide the interface for either a crystal or a CMOScompatible clock to control the internal clock generator circuitry. The
frequency applied to these pins is four times higher than the desired
E-clock rate.
The XTAL pin must be left unterminated when an external CMOScompatible clock input i s connected to the EXTAL pin. T he XTAL output
is normally intended to drive only a crystal.
CAUTION:In all cases, use caution around the oscillator pins. Load capacitances
shown in the oscillator circuit are specified by the crystal manufacturer
and should include all stray layout capacitances.
Refer to Figure 2-8 and Figure 2-9.
Pin Descriptions
C
L
C
L
MCU
EXTAL
XTAL
10 MΩ
4 x E
CRYSTAL
Figure 2-8. Common Parallel Resonant
Crystal Connections
4 x E
CMOS-COMPATIBLE
MCU
EXTAL
XTAL
EXTERNAL OSCILLATOR
NC
Figure 2-9. External Oscillator Connections
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAPin Descriptions 35
Pin Des cr ip t io ns
2.6 E-Clock Output (E)
E is the o utput connection for the internally gen erated E clock. T he signal
from E is used as a ti ming reference. The fr equency of the E-clock out put
is one fourth that of the input frequency at the XTAL and EXTAL pins.
When E-clock outpu t is low , an intern al pr ocess is taking place. When it
is high, data is being accessed.
All clocks, including the E clock, are halted when the MCU is in stop
mode. To reduce R FI emissions, the E-clock output of most E-series
devices can be disabled while operating in single-chip modes.
The E-clock signal is always enabled on the MC68HC811E2.
2.7 Interrupt Request (IRQ)
The IRQ input provides a means of applying asynchronous interrupt
requests to the MCU. Either negative edge-sensitive triggering or
level-sensitive triggering is program selectable (OPTION register). IRQ
is always configured to level-sensitive triggering at reset. When using
IRQ in a level-sensitive wired-OR configuration, connect an external
pullup resistor, typically 4.7 kΩ, to VDD.
2.8 Non-Maskable Interrupt (XIRQ/V
The XIRQ input provides a means of requesting a non-maskable
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 enable s it. Becau s e the XIR Q input is level- sensitiv e, it can b e
connected to a multiple -source wired-OR network with an external pullup
resistor to VDD. XIRQ is often used as a power loss detect interrupt.
Whenever XIRQ or IRQ is used with multiple interrupt sources each
source must drive the interr upt input with an open -drain type of dri ver to
avoid contention between outputs.
PPE
)
NOTE:IRQ must be configured for level -sensitive operation if the re is more than
one source ofIRQ interrupt.
Technical DataMC68HC11E Family — Rev. 4
36Pin DescriptionsMOTOROLA
Pin Descriptions
MODA and MODB (MODA/LIR and MODB/VSTBY)
There should be a single pullup resistor near the MCU interrupt input pin
(typically 4.7 kΩ). 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 acknowledg es the interrupt request. If one or more
interrupt sources are still p ending aft er the MCU se rvices a r equest , the
interrupt line will still be held low and the MCU will be interrupted again
as soon as the interrupt mask bit in the MCU is cleared (normally upon
return from an interrupt). Refer to Section 5. Resets and Interrupts.
V
is the input for the 12-volt nominal programming voltage required
PPE
for EPROM/OTPROM programming. On devices without
EPROM/OTPROM, this pin is only an XIRQ
input.
2.9 MODA and MODB (MODA/LIR and MODB/V
During reset, MODA and MODB select one of the four oper ating modes:
•Single-chip mode
•Expanded mode
•Test m ode
•Bootstrap mode
Refer to Section 4. Operating Modes and On-Chip Memory.
After the ope rating mode h as been sel ected, the load instruction regi ster
(LIR) pin provides an open-drain output to indicate that execution of an
instruction has begun. A series of E-clock cycles occurs during
execution of each instruction. The LIR signal goes low during the first
E-clock cycle of each instr uction (opcode fe tch). This outp ut is provide d
for assistance in program debugging.
The V
power. When the voltage on this pin is more than one MOS threshold
(about 0.7 volts) above th e VDD voltage, the internal R AM and part o f the
reset logic are powered from this signal rather than the VDD input. This
allows RAM contents to be retained without VDD power applied to the
MCU. Reset must be driven lo w before VDD is removed and must remain
low until VDD has been restored to a valid level.
pin is used to input random-access memory (R AM) standb y
STBY
STBY
)
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAPin Descriptions 37
Pin Des cr ip t io ns
2.10 V
and VRH
RL
2.11 STRA/AS
These two inputs pro vide the reference volta ges for the analog-to- digital
(A/D) converter ci rcuitry:
•VRL is the low reference, typically 0 Vdc.
•VRH is the high reference.
For proper A/D converter operation:
•VRH should be at least 3 Vdc greater than VRL.
•VRL and VRH should be between VSS and VDD.
The strobe A (ST RA) and addre ss strobe (AS) pin p erforms eit her of two
separate functions, depending on the operating mode:
•In the expanded multiplexed mode, AS provides an address
strobe function.
AS can be used to demultiplex the address and data signals at port C.
Refer to Section 4. Operating Modes and On-Chip Memory.
The strobe B (STRB) and read/write (R/W) pin act as either an output
strobe or as a data bus direction indicator, depending on the operating
mode.
In single-chip operating mode, STRB acts as a programmab le strobe for
handshake with other parallel devices. Refer to Section 6. Parallel
Input/Output (I/O) Ports for further information.
In expanded multiplexed operating mode, R/W is used to indicate the
direction of transfers on the external data bus. A low on the R/W pin
indicates data is bei ng written to the externa l data bus. A high on this pin
Technical DataMC68HC11E Family — Rev. 4
38Pin DescriptionsMOTOROLA
2.13 Port Signals
Pin Descriptions
Port Signals
indicates that a read cycle is in progress. R/W stays low during
consecutive data bus write cycles, such as a double-byte store. It is
possible for data to be driven out o f port C, if inte rnal r ead visibility (IRV)
is enabled and an internal address is read, even though R/W is in a
high-impedance state. Refer to Section 4. Operating Modes and
On-Chip Memory for more information about IRVNE (internal read
visibility not E).
Port pins have different functions in different operating modes. Pin
functions for port A, port D, and port E are independent of operating
modes. Port B and port C, however, are affected by operating mode.
Port B provides eight general-purpose output signals in single-chip
operating modes. When the microcontroller is in expanded multiplexed
operating mode, port B pins are the eight high-order address lines.
2.13.1 Port A
Port C provides eight general-purpose input/output signals when the
MCU is in t he single-chip operating mod e. When the microcontroll er is in
the expanded multiplexed ope rating mode, por t C pins are a multi plexed
address/data bus.
Refer to Table 2-1 for a functional description of the 40 port signals
within different operating modes. Terminate unused inputs and
input/output (I/O) pins configured as inputs high or low.
In all operating modes, port A can be configured for three timer input
capture (IC) functions a nd four timer outp ut compar e (OC) f unctions. An
additional pin can be configured as either the fourth IC or the fifth OC.
Any port A pin tha t is not curr ently bei ng use d for a timer function can be
used as either a general-purpose input or output line. Only port A pins
PA7 and PA3 have an associated data direction control bit that allows
the pin to be selectively configured as input or output. Bits DDRA7 and
DDRA3 located in PACTL register control data direction for PA7 and
PA3, respective ly. All other port A pins are fixed as either input o r output.
PA7 can function as genera l-purpose I /O or as tim er output compare fo r
OC1. PA7 is also the input to the pulse accumulator, even while
functioning as a general-purpose I/O or an OC1 output.
PA6–PA4 serve as either general-p urpose outputs, timer input captu res,
or timer output comp are 2–4. In a ddition, PA6–PA4 can be controlled by
OC1.
PA3 can be a general-purpose I/O pin or a timer IC/OC pin. Timer
functions associated with this pin incl ude OC1 and IC4/OC5. I C4/OC5 is
software selectable as either a fourth input capture or a fifth output
compare. PA3 can al so be configu red to allow OC1 edges to trigger IC 4
captures.
PA2–PA0 serve as general-purpose inputs or as IC1–IC3.
PORTA can be read at any time. Reads of pins configured as inputs
return the logic level present on the pin. Pins configured as outputs
return the logic level present at the pin driver input. If written, PORTA
stores the data in an inter nal latch, bits 7 and 3. I t drives the pin s only if
they are confi gur ed a s out puts. Wri tes to POR TA d o no t chan ge the p i n
state when pins are configured for timer input captures or output
compares. Refer to Section 6. Parallel Input/Output (I/O) Ports.
2.13.2 Port B
During single -chip operat ing modes, al l port B pins are gen eral-purp ose
output pins. During MCU reads of this port, the level sensed at the input
side of the port B ou tput drivers is read. Por t B can also be used in simple
strobed output mode. In thi s mode, an output pulse appear s at the STRB
signal each time data is written to port B.
In expanded multiplexed operating modes, all of the port B pins act as
high order ad dress outp ut sign als. Du ring each MCU cycle, b its 15–8 of
the address bus are output on the PB7–PB0 pins. The PORTB register
is treated as an external address in expanded modes.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAPin Descriptions 41
Pin Des cr ip t io ns
2.13.3 Port C
While in single-chip operating modes, all port C pins are
general-pur pose I/O pins. Port C inputs can be latched into an alternate
PORTCL register by providing an input transition to the STRA signal.
Port C can also be used in full handshake modes of parall el I/O where
the STRA input and STRB output act as handshake control lines.
When in exp ande d m ul tiplexe d m odes, a ll por t C pi n s a re config ured as
multiplexed address/data signals. During the address portion of each
MCU cycle, bits 7–0 of the address are output on the PC7–PC0 pins.
During the data portion of each MCU cycle (E high), PC7–PC0 are
bidirectional data signals, DATA7–DATA0. The direction of data at the
port C pins is indicated by the R/W
signal.
The CWOM con trol bit in the PIOC register disables th e port C P-channel
output driver. CWOM simultaneously affects all eight bits of port C.
Because the N-channel driver is not aff ected by CWOM , setting CWOM
causes port C to become an open-drain type output port suitable for
wired-OR operation.
In wired-OR mode:
•When a port C bit is at logic level 0, it is driven low by the
N-channel driver .
•When a port C bit is at logic level 1, the associated pin has
high-impedance, as neither the N-channel nor the P-channel
devices are active.
It is customary to have an exter nal pullup resistor on lines tha t are driven
by open-drain devices. Port C can only be configured for wired-OR
operation when the MCU is in single-chip mode. Refer to Section 6.
Parallel Input/Ou tput (I/O) Ports for addi tional information about port C
functions.
Technical DataMC68HC11E Family — Rev. 4
42Pin DescriptionsMOTOROLA
2.13.4 Port D
Pin Descriptions
Port Signals
Pins PD5–PD0 can be used for general-pur pose I/O signals. Th ese pins
alternately serve as the seri al com munica tion i nterf ace (SC I) and ser ial
peripheral interfac e (SPI) signals when those subsystems are enabled .
•PD0 is the recei ve data input (RxD) signal for the SCI.
•PD1 is the transmit data output (TxD) signal for the SCI.
•PD5–PD2 are dedicated to the SPI:
–PD2 is the master in/slave out (MISO) signal.
–PD3 is the master out/slave in (MOSI) signal.
–PD4 is the serial clock (SCK) signal.
2.13.5 Port E
CAUTION:If high accuracy is required for A/D conversions, avoid reading port E
–PD5 is the slave select (SS
) input.
Use port E for general-purpose or analog-to-digital (A/D) inputs.
during sampling, as small disturbances can red uce th e accur acy of t hat
result.
•Special operations such as subroutine calls and interrupts
The CPU is designed to treat all peripheral, input/output (I/O), and
memory loca tions identically as a ddresses in the 64-Kbyte memory map.
This is referred to as memory-mapped I/O. There are no special
instructions for I/O that are separate from those used for memory. This
architecture a lso allows accessing an operand from an external memo ry
location with no execution time penalty.
3.3 CPU Registers
M68HC11 CPU registers are an integral part of the CPU and are not
addressed as if they were memory locations. The seven registers,
discussed in the following paragraphs, are shown in Figure 3-1.
Technical DataMC68HC11E Family — Rev. 4
46Central Processor Unit (CPU)MOTOROLA
Central Processor Unit (CPU)
CPU Registers
7070
150
AB
D
IX
IY
SP
PC
70
8-B I T ACCUMULATORS A & B
OR 16-BIT DOUBLE ACCUMULATOR D
INDEX REGISTER X
INDEX REGISTER Y
STACK POINTER
PROGRAM COUNTER
CONDITION CODES
CVZNIHXS
CARRY/BORROW FROM MSB
OVERFLOW
ZERO
NEGATIVE
I-INTERRUPT MASK
HALF CARRY (FROM BIT 3)
X-INTERRUPT MASK
STOP DISABLE
Figure 3-1. Programming Model
3.3.1 Accumulators A, B, and D
Accumulators A and B are general-purpose 8-bit registers that hold
operands and results of arithmetic calculations or data manipulations.
For some instructions, these two accumulators are treated as a single
double-byte (16-bit) accumulator called accumulator D. Although most
instructions can use accumulators A or B interchangeably, these
exceptions apply:
•The ABX and ABY instructions add the contents of 8-bit
accumulator B to the contents of 16-bit register X or Y, but there
are no equivalent instructions that use A instead of B.
•The TAP and TPA instructions transfer data from accumulator A
to the condition code register or from the condition code register
to accumulator A. However, there are no equivalent instructions
that use B rather than A.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLACentral Processor Unit (CPU) 47
Central Processor Unit (C PU)
•The decimal adjust accumulato r A (DA A) instruction i s used after
binary-coded de cimal (BCD) arithm etic operations, but there is no
equivalent BCD instruction to adjust accumulator B.
•The add, subtract, and com pare instructio ns associate d with both
A and B (ABA, SBA, and CBA) only operate in one direction,
making it important to plan ahead to ensure that the correct
operand is in the correct accumulator.
3.3.2 Index Register X (IX)
The IX register provides a 16- bit indexing value that can be ad ded to the
8-bit offset pr ovided in an instruct ion to create an effective address. T he
IX register can also be used as a counter or as a temporary storage
register.
3.3.3 Index Register Y (IY)
The 16-bit IY regi ste r pe rfor ms a n inde xed m ode function si milar to th at
of the IX register. However, most instructions using the IY register
require an extra byte of machine code and an extra cycle of execution
time because of the way the opcode map is implemented. Refer to
3.5 Opcodes and Operands for further information.
3.3.4 Stack Pointer (SP)
The M68HC11 CPU has an a utomatic pro gram stack. Thi s stack can be
located anywhere in the address space and can be any size up to the
amount of memory a vailable in the system. Normally, the SP is initialized
by one of the first instructions in an application program. The stack is
configured as a data structure that grows downward from high memory
to low memory. Each time a new byte is pushed onto the stack, the SP
is decremented. Each time a byte is pulled from the stack, the SP is
incremented. At any given time, the SP holds the 16-bit address of the
next free location in the stack. Figure 3-2 is a summary of SP
operations.
Technical DataMC68HC11E Family — Rev. 4
48Central Processor Unit (CPU)MOTOROLA
Central Processor Unit (CPU)
CPU Registers
JSR, JUMP TO SUBROUTINE
MAIN PROGRAM
PC
$9D = JSR
DIRECT
RTN
dd
NEXT MAIN INSTR.
MAIN PROGRAM
PC
$AD = JSR
INDEXED, X
RTN
ff
NEX T MAIN IN S TR.
MAIN PROGRAM
PC
$18 = PRE
INDEXED, Y
RTN
$AD = JSR
ff
NEXT MAIN INSTR.
MAIN PROGRAM
PC
$BD = PRE
INDEXED, Y
RTN
hh
ll
NEXT MAIN INSTR.
BSR, BRANCH TO SUBRO UTINE
MAIN PROGRAM
PC
$8D = BSR
RTS, RETURN FROM
SUBROUTINE
MAIN PROGRAM
PC
$39 = RTS
70
➩ SP–2
SP–1
SP
STACK
70
➩ SP–2
SP–1
SP
SP
SP+1
➩ SP+2
RTN
H
RTN
L
STACK
70
RTN
H
RTN
L
STACK
RTN
RTN
RTI, RETURN FROM INTERRUPT
STACK
INTERRUP T RO UTINE
PC
$3B = RTI
H
L
70
SP
SP+1
SP+2
SP+3
SP+4
SP+5
SP+6
SP+7
SP+8
➩ SP+9
CCR
ACCB
ACCA
IX
H
IX
IY
H
IY
RTN
RTN
L
L
H
L
SWI, SOFTWARE INTERRUPT
STACK
MAIN PROGRAM
PC
$3F = SWI
WAI, WAIT FOR INTERRUPT
MAIN PROGRAM
PC
$3E = WAI
70
➩ SP–9
SP–8
SP–7
SP–6
SP–5
SP–4
SP–3
SP–2
SP–1
SP
CCR
ACCB
ACCA
IX
H
IX
IY
H
IY
RTN
RTN
L
L
H
L
LEGEND:
RTN = ADDRESS OF NEXT INSTRUCTION IN MAIN PROGRAM TO
BE EXECUTED UPON RETURN FROM SUBROUTINE
= MOST SIGNIFICANT BYTE OF RETURN ADDRESS
RTN
H
= LEAST SIGNIFICANT BYTE OF RETURN ADDRESS
RTN
L
➩ = STACK POINTER POSITION AFTER OPERATION IS COMPLETE
dd = 8-BIT DIRECT ADDRESS ($0000–$00FF) (HIGH BYTE ASSUMED
TO BE $00)
ff = 8-BIT POSITIVE OFFSET $00 (0) TO $FF (255) IS ADDED TO INDEX
hh = HIGH-ORDER BYTE OF 16-BIT EXTENDED ADDRESS
ll = LOW-ORDER BYTE OF 16-BIT EXTENDED ADDRESS
rr= SIGNED RELA TIVE OFFSET $80 (–128) TO $7F (+127) (OFFSET
RELATIVE TO THE ADDRESS FOLL OWING THE MACHINE CODE
OFFSET BYTE)
Figure 3-2. Stacking Operations
When a subroutin e is called by a jump-to-subrouti ne (JSR) or bra nch-tosubroutine (BSR) instr uction, the address of the instruction after the JSR
or BSR is automatically pushed onto the stack, least significant byte first.
When the subroutine is finished, a return-from-subroutine (RTS)
instruction is executed. The RTS pulls the previously stacked return
address from the stack and l oads it into the progra m counter. Executi on
then continues at this recovered return address.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLACentral Processor Unit (CPU) 49
Central Processor Unit (C PU)
When an interrupt is recognized, the current instruction finishes
normally, the return address (the current value in the program counter)
is pushed onto the stack, all of the CPU registers are pushed onto the
stack, and execution continues at the ad dress specified by the ve ctor for
the interrupt.
At the end of the inte rrup t servi ce routin e, an r etur n-fr om i nte rru pt (RT I)
instruction is executed. The RTI instruction causes the saved registers
to be pulled off the stack in reverse order. Program execution resumes
at the return address.
Certain instructions push and pull the A and B accumulators and the X
and Y index registers and are often used to preserve program context.
For example, pushing accumulator A onto the stack when entering a
subroutine that uses accumulator A and then pulling accumulator A off
the stack just before leaving the subroutine ensur es that the contents of
a register will be the same after returning from the subroutine as it was
before starting the subroutine.
3.3.5 Program Counter (PC)
The program coun ter, a 16-bit register, contai ns the addr ess o f the ne xt
instruction to be e xecuted . A fter rese t, the pr ogra m co unter is ini tia lize d
from one of six p ossible vecto rs, de pending on operating mode and the
cause of reset. See Table 3-1.
ModePOR or RESET PinClock MonitorCOP Watchdog
Normal$FFFE , F$FFFC, D$FFFA, B
Test or Boo t$BFFE, F$BFFC, D$BFFA, B
Table 3-1. Reset Vector Comparison
Technical DataMC68HC11E Family — Rev. 4
50Central Processor Unit (CPU)MOTOROLA
3.3.6 Condition Code Register (CCR)
This 8-bit register contains:
•Five condition code indicators (C, V, Z, N, and H),
•Two interrupt masking bits (IRQ and XIRQ)
•A stop disable bit (S)
In the M68HC11 CPU, condition codes are updated automatically by
most instructions. For example, load accumulator A (LDAA) and store
accumulator A (STAA) instructions automatically set or clear the N, Z,
and V conditi on code f lags. P ushe s, pu lls, add B to X ( ABX), add B to Y
(ABY), and transfer/exchange instructions do not affect the condition
codes. Refer to Table 3-2, which shows what condition codes are
affected by a particular instruction.
Central Processor Unit (CPU)
CPU Registers
3.3.6.1 Carry/Borrow (C)
The C bit is set if the arithmetic logic unit (ALU) performs a carry or
borrow dur ing an arithmetic o peration. The C bit also acts as an error flag
for multiply and divide operations. Shift and rotate instructions operate
with and through the carry bit to facilitate multiple-word sh ift ope ration s.
3.3.6.2 Overflow (V)
The overflow bit is set if an operation causes an arithmetic overflow.
Otherwise, the V bit is cleared.
3.3.6.3 Zero (Z)
The Z bit is set i f the result of an arithmetic, logic, or data manipulation
operation is 0. Otherwise, the Z bit is cleared. Compare instructions do
an internal implied subtraction and the condition codes, including Z,
reflect the results of that subtraction. A few operations (INX, DEX, INY,
and DEY) affect the Z bit and no other condition flags. For these
operations, only = and ≠ conditions can be determined.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLACentral Processor Unit (CPU) 51
Central Processor Unit (C PU)
3.3.6.4 Negative (N)
The N bit is set if the result of an arithmetic, logic, or data manipulation
operation is negat ive (MSB = 1). Otherwise, th e N b it is clea red. A result
is said to be ne gativ e if its mo st si gnifican t bit ( MS B) is a 1. A qu ick way
to test whether the conten ts of a mem ory location has the MSB set is to
load it into an accumulator and then check the status of the N bit.
3.3.6.5 Interrupt Mask (I)
The interr upt reque st (IRQ) ma sk (I bit) is a glo bal mask tha t disable s all
maskable interru pt sources. Whil e the I bit is set, inter rupts can beco me
pending, but the operation of the CPU conti nues uninter rup ted until the
I bit is cleared. A fte r an y rese t, the I bit i s se t by d efault and ca n onl y be
cleared by a software i nstructi on. When a n inter rup t is re cognized , the I
bit is set after the registe rs are sta cked, but b efore the interrupt vector is
fetched. After the interrupt has been serviced, a return-from-interrupt
instruction is norma lly executed, restoring the r egisters to the values that
were present before the interrupt occurred. Normally, the I bit is 0 after
a return from interrupt is executed. Although the I bit can be cleared
within an interrupt ser vice routine, " nesting " interr upts in th is way should
only be done when there is a clear understanding of latency and of the
arbitration mechanism. Refer to Section 5. Resets and Interrupts.
3.3.6.6 Half Carry (H)
The H bit is set when a carry occurs between bits 3 and 4 of the
arithmetic l ogic unit during an ADD, ABA, or ADC instru ction. Other wise,
the H bit is cleared. Half carry is used during BCD operations.
3.3.6.7 X Interrupt Mask (X)
The XIRQ mask (X) bit disables interrupts from the XIRQ
pin. After any
reset, X is set by default and must be cleared by a software instruction.
When an XIRQ interrupt is recognized, the X and I bits are set after the
registers are stacked, but befor e the interrupt vector is fetched. A fter the
interrupt has been serviced, an RTI instruction is normally executed,
causing the registers to be restored to the values that were present
before the interrupt occurred. The X interrupt mask bit is set only by
Technical DataMC68HC11E Family — Rev. 4
52Central Processor Unit (CPU)MOTOROLA
hardware (R ESET or XIR Q a cknowledge). X is clear ed only by pr ogram
instruction (TAP, where the associated bit of A is 0; or RTI, where bit 6
of the value loaded into the CCR from the stack has been clea red) .
There is no hardware action for clearing X.
3.3.6.8 STOP Disable (S)
Setting the STOP disable (S) bit prevents the STOP instruction from
putting the M68HC11 into a low-power stop condition. If the STOP
instruction is encountered by the CPU while the S bit is set, it is treated
as a no-operation (NOP) instruction, and processing continues to the
next instruction. S is set by reset; STOP is disabled by default.
3.4 Data Types
Central Processor Unit (CPU)
Data Types
The M68HC11 CPU supports four data types:
1.Bit data
2.8-bit and 16-bit signed and unsigned integers
3.16-bit unsigned fractions
4.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. Because the M68HC 11 is an 8-bit CPU ,
there are no special requirements for alignment of instructions or
operands.
3.5 Opcodes and Operands
The M68HC11 Family of microcontrollers 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
able to be expressed in 8-bit binary numbers.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLACentral Processor Unit (CPU) 53
Central Processor Unit (C PU)
A 4-page opcode map has been implemented to expand the number of
instructions. An additional byte, called a prebyte, directs the processor
from page 0 of the opcode map to one of the other three pages. As its
name implies, the additional byte precedes the opcode.
A complete instruct ion consists of a prebyte, if any, an opcode, and zero,
one, two, or three o perands. The ope rands conta in info rmation th e CPU
needs for executing the instruction. Complete instructions can be from
one to five bytes long.
3.6 Addressing Modes
Six addressing modes can be used to access memory:
•Immediate
•Direct
3.6.1 Immediate
•Extended
•Indexed
•Inherent
•Relative
These modes ar e detailed in the following paragraphs. All modes excep t
inherent mode use an effective address. The effective address is the
memory address from which the argument is fetched or stored or the
address from which execution is to proceed. The effective address can
be specified within an instruction, or it can be calculated.
In the immediate addressing mode, an argument is contained in the
byte(s) immediate ly following the opcode. The numbe r of bytes following
the opcode matches the size of the register or memory location being
operated on. There are 2-, 3-, and 4- (if prebyte is required) byte
immediate instr uctions. Th e eff ecti ve a ddre ss is th e address of the byte
following the instruction.
Technical DataMC68HC11E Family — Rev. 4
54Central Processor Unit (CPU)MOTOROLA
3.6.2 Direct
3.6.3 Extended
Central Processor Unit (CPU)
Addressing Modes
In the direct addressing mode, the low-order byte of the operand
address is contained in a single byte following the opcode, and the
high-order byte of the address is assumed to be $00. Addresses
$00–$FF are thus accessed directly, using 2-byte instructions.
Execution time is reduced by elim inating the ad diti onal mem ory acces s
required for the high-order address byte. In most applications, this
256-byte area is reserved for frequently referenced data. In M68HC11
MCUs, the memory map can be configu red for combinat io ns of interna l
registers, RAM, or external memory to occupy these addresses.
In the extende d addressing mode , the effective address of the argume nt
is contained in two bytes following the opcode byte. These are 3-byte
instructions (or 4-byte instructions if a prebyte is required). One or two
bytes are needed for the opcode and two for the effective address.
3.6.4 Indexed
3.6.5 Inherent
In the indexed addressing mode, an 8-bit unsigned offset contained in
the instruction is added to the value cont ained in an index reg ister (IX o r
IY). The sum is the effective address. This addressing mode allows
referencing an y memory loca tion in the 64- Kbyte add ress space. Th ese
are 2- to 5-byte instructions, depending on whether or not a prebyte is
required.
In the inherent addressing mode, all the information necessary to
execute the instruction is contained in the opcode. Operations that use
only the index registers or accumulators, as well as control instructions
with no arguments, are included in this addressing mode. These are
1- or 2-byte instructions.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLACentral Processor Unit (CPU) 55
Central Processor Unit (C PU)
3.6.6 Relative
The relative addre ssing mode is use d only for branch instru ctions. If the
branch condition is true, an 8-bit signed offset included in the instru ction
is added to the contents of the program counter to form the effective
branch address. Otherwise, control proceeds to the next instruction.
These are usually 2-byte instructions.
3.7 Instruction Set
Refer to Table 3-2, which shows all the M68HC11 instructions in all
possible addressing modes. For each instruction, the table shows the
operand constructi on, the number of ma chine code bytes, and execution
time in CPU E-clock cycles.
Technical DataMC68HC11E Family — Rev. 4
56Central Processor Unit (CPU)MOTOROLA
Central Processor Unit (CPU)
C
0
b7b0
C
0
b7b0
C
0
b7b0
C
0
b7b0ABb7
b0
C
b7b0
C
b7b0
C
b7b0
Instructi on Set
Table 3-2. Instruction Set (Sheet 1 of 7)
MnemonicOperationDescription
ABAAdd
Accumulators
A + B ⇒ AINH1B—2—— ∆—∆∆∆∆
ABXAdd B to XIX + (00 : B) ⇒ IXINH3A—3————————
ABYAdd B to YIY + (00 : B) ⇒ IYINH183A—4————————
ADCA (opr)Add with Carry
ADCB (opr)Add with Carry
ADDA (opr) Add Memory to
ADDB (opr) Add Memory to
to A
to B
A
B
A + M + C ⇒ AAIMM
B + M + C ⇒ BBIMM
A + M ⇒ AAIMM
B + M ⇒ BBIMM
ADDD (opr) Add 16-Bit to D D + (M : M + 1) ⇒ DIMM
ANDA (opr) AND A with
ANDB (opr) AND B with
Memory
Memory
A • M ⇒ AA IMM
B • M ⇒ BBIMM
ASL (opr)Arithmetic Shift
Left
ASLAArithmetic Shift
Left A
AddressingInstructionCondition Codes
Mode OpcodeOperand CyclesSXHINZVC
ADIR
AEXT
AIND,X
AIND,Y
BDIR
BEXT
BIND,X
BIND,Y
ADIR
AEXT
AIND,X
AIND,Y
BDIR
BEXT
BIND,X
BIND,Y
DIR
EXT
IND,X
IND,Y
A DIR
A EXT
AIND,X
AIND,Y
BDIR
BEXT
BIND,X
BIND,Y
EXT
IND,X
IND,Y
99
B9
A9
18A9
C9
D9
F9
E9
18E9
8B
9B
BB
AB
18AB
CB
DB
FB
EB
18EB
C3
D3
F3
E3
18 E3
84
94
B4
A4
18 A4
C4
D4
F4
E4
18E4
78
68
1868
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
hh ll
ff
ff
2
——∆—∆∆∆∆
3
4
4
5
2
——∆—∆∆∆∆
3
4
4
5
2
——∆—∆∆∆∆
3
4
4
5
2
——∆—∆∆∆∆
3
4
4
5
4
————∆∆∆∆
5
6
6
7
2
————∆∆0—
3
4
4
5
2
————∆∆0—
3
4
4
5
6
————∆∆∆∆
6
7
89
AINH48 —2————∆∆∆∆
ASLBArithmetic Shift
ASLDArithmetic Shift
ASR Arithmetic Shift
Left B
Left D
Right
ASRAArithmetic Shift
BINH58 —2————∆∆∆∆
INH05—3———— ∆∆∆∆
EXT
IND,X
IND,Y
1867
77
67
hh ll
ff
ff
6
————∆∆∆∆
6
7
AINH47 —2————∆∆∆∆
Right A
ASRBArithmetic Shift
BINH57 —2————∆∆∆∆
Right B
BCC (rel)Branch if Carry
BCLR (opr)
Clear
Clear Bit(s) M • (mm
(msk)
? C = 0REL24rr3————————
) ⇒ MDIR
IND,X
IND,Y
15
1D
181D
dd mm
ff mm
ff mm
6
————∆∆0—
7
8
MC68HC11E Family — Rev. 4Technical Data
MOTOROLACentral Processor Unit (CPU) 57
Central Processor Unit (C PU)
Table 3-2. Instruction Set (Sheet 2 of 7)
MnemonicOperationDescription
BCS (rel)Branch if Carry
BEQ (rel)Branch if = Zero? Z = 1REL27rr3————————
BGE (rel)Branch if ∆ Zero? N ⊕ V = 0REL2Crr3————————
BGT (rel)Branch if > Zero? Z + (N ⊕ V) = 0REL2Err3————————
BHI (rel)Branch if
BHS (rel)Branch if
BITA (opr) Bit(s) Test A
BITB (opr)Bit(s) Test B
BLE (rel)Branch if ∆ Zero? Z + (N ⊕ V) = 1REL2Frr3————————
BLO (rel)Branch if Lower? C = 1REL25rr3————————
BLS (rel)Branch if Lower
BLT (rel)Branch if < Zero? N ⊕ V = 1REL2Drr3————————
BMI (rel)Branch if Minus? N = 1REL2Brr3————————
BNE (rel)Branch if not =
BPL (rel)Branch if Plus? N = 0REL2Arr3————————
BRA (rel)Branch Always? 1 = 1REL20rr3————————
BRCLR(opr)
(msk)
(rel)
BRN (rel)Branch Never? 1 = 0REL21rr3————————
BRSET(opr)
(msk)
(rel)
BSET (opr)
(msk)
BSR (rel)Branch to
BVC (rel)Branch if
BVS (rel)Branch if
CBACompare A to BA – BINH11—2————∆∆∆∆
CLCClear Carry Bit0 ⇒ CINH0C—2——————— 0
CLIClear Interrupt
CLR (opr)Clear Memory
CLRAClear
CLRBClear
CLVClear O v erflow
CMPA (opr)Compare A to
Set
Higher
Higher or Same
with Memory
with Memory
or Same
Zero
Branch if
Bit(s) Clear
Branch if Bit(s)
Set
Set Bit(s)M + mm ⇒ MDIR
Subroutine
Overflow Clear
Overflow Set
Mask
Byte
Accumulator A
Accumulator B
Flag
Memory
? C = 1REL25rr3————————
? C + Z = 0REL22rr3————————
? C = 0REL24rr3————————
A • MAIMM
B • MBIMM
? C + Z = 1REL23rr3————————
? Z = 0REL26rr3————————
? M • mm = 0DIR
) • mm = 0DIR
? (M
See Figure 3–2REL 8Drr 6————————
? V = 0REL28rr3————————
? V = 1REL29rr3————————
0 ⇒ IINH0E—2——— 0————
0 ⇒ MEXT
0 ⇒ AAINH4F—2————0100
0 ⇒ BBINH5F—2————0100
0 ⇒ VINH0A—2—————— 0—
A – MAIMM
AddressingInstructionCondition Codes
Mode OpcodeOperand CyclesSXHINZVC
85
ADIR
AEXT
AIND,X
AIND,Y
BDIR
BEXT
BIND,X
BIND,Y
IND,X
IND,Y
IND,X
IND,Y
IND,X
IND,Y
IND,X
IND,Y
ADIR
AEXT
AIND,X
AIND,Y
95
B5
A5
18A5
C5
D5
F5
E5
18E5
13
1F
181F
12
1E
181E
14
1C
181C
7F
6F
186F
81
91
B1
A1
18A1
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
dd mm rr
ff mm rr
ff mm rr
dd mm rr
ff mm rr
ff mm rr
dd mm
ff mm
ff mm
hh ll
ff
ff
ii
dd
hh ll
ff
ff
2
————∆∆0—
3
4
4
5
2
————∆∆0—
3
4
4
5
6
————————
7
8
6
————————
7
8
6
————∆∆0—
7
8
6
————0100
6
7
2
————∆∆∆∆
3
4
4
5
Technical DataMC68HC11E Family — Rev. 4
58Central Processor Unit (CPU)MOTOROLA
Central Processor Unit (CPU)
Instructi on Set
Table 3-2. Instruction Set (Sheet 3 of 7)
MnemonicOperationDescription
CMPB (opr)Compare B to
COM (opr)Ones
COMAOnes
COMBOnes
CPD (opr)Compare D to
CPX (opr)Compare X to
CPY (opr)Compare Y to
DAADecimal Adjust AAdjust Sum to BCDINH19—2————∆∆∆∆
Memory
Complement
Memory Byte
Complement
A
Complement
B
Memory 16-Bit
Memory 16-Bit
Memory 16-Bit
B – MBIMM
$FF – M ⇒ MEXT
$FF – A ⇒ AAINH43—2————∆∆01
$FF – B ⇒ BBINH53—2————∆∆01
D – M : M + 1IMM
IX – M : M + 1IMM
IY – M : M + 1IMM
AddressingInstructionCondition Codes
Mode OpcodeOperand CyclesSXHINZVC
BDIR
BEXT
BIND,X
BIND,Y
IND,X
IND,Y
DIR
EXT
IND,X
IND,Y
DIR
EXT
IND,X
IND,Y
DIR
EXT
IND,X
IND,Y
C1
D1
F1
E1
18E1
73
63
1863
1A83
1A93
1AB3
1AA3
CDA3
8C
9C
BC
AC
CDAC
188C
189C
18BC
1AAC
18AC
ii
dd
hh ll
ff
ff
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
2
————∆∆∆∆
3
4
4
5
6
————∆∆01
6
7
5
————∆∆∆∆
6
7
7
7
4
————∆∆∆∆
5
6
6
7
5
————∆∆∆∆
6
7
7
7
DEC (opr)Decrement
DECADecrement
DECBDecrement
DESDecrement
DEXDecrement
DEYDecrement
EORA (opr) Exclusive OR A
EORB (opr) Exclusive OR B
FDIVFractional
IDIVInteger Divide
INC (opr)Increment
INCAIncrement
Memory Byte
Accumulator
A
Accumulator
B
Stack Pointer
Index Register
X
Index Register
Y
with Memory
with Memory
Divide 16 by 16
16 by 16
Memory Byte
Accumulator
A
M – 1 ⇒ MEXT
A – 1 ⇒ AAINH4A—2————∆∆∆—
B – 1 ⇒ BBINH5A—2————∆∆∆—
SP – 1 ⇒ SPINH34—3————————
IX – 1 ⇒ IXINH09—3————— ∆——
IY – 1 ⇒ IYINH1809—4————— ∆——
A ⊕ M ⇒ AAIMM
B ⊕ M ⇒ BBIMM
D / IX ⇒ IX; r ⇒ DINH03—41————— ∆∆∆
D / IX ⇒ IX; r ⇒ DINH02—41————— ∆0∆
M + 1 ⇒ MEXT
A + 1 ⇒ AAINH4C—2————∆∆∆—
IND,X
IND,Y
ADIR
AEXT
AIND,X
AIND,Y
BDIR
BEXT
BIND,X
BIND,Y
IND,X
IND,Y
7A
6A
186A
88
98
B8
A8
18A8
C8
D8
F8
E8
18E8
7C
6C
186C
hh ll
ff
ff
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
hh ll
ff
ff
6
————∆∆∆—
6
7
2
————∆∆0—
3
4
4
5
2
————∆∆0—
3
4
4
5
6
————∆∆∆—
6
7
MC68HC11E Family — Rev. 4Technical Data
MOTOROLACentral Processor Unit (CPU) 59
Central Processor Unit (C PU)
C
0
b7b0
C
0
b7b0C
0
b7b0
C
0
b7b0ABb7b0
C
0
b7b0
C
0
b7b0
Table 3-2. Instruction Set (Sheet 4 of 7)
MnemonicOperationDescription
INCBIncrement
INSIncrement
INXIncrement
INYIncrement
JMP (opr)JumpSee Figure 3–2EXT
JSR (opr)Jump to
LDAA (opr)Load
LDAB (opr)Load
LDD (opr)Load Double
LDS (opr)Load Stack
LDX (opr)Load Index
LDY (opr)Load Index
LSL (opr)Logical Shift
LSLA Logical Shift
Accumulator
B
Stack Pointer
Index Register
X
Index Register
Y
Subroutine
Accumulator
A
Accumulator
B
Accumulator
D
Pointer
Register
X
Register
Y
Left
Left A
B + 1 ⇒ BBINH5C—2————∆∆∆—
SP + 1 ⇒ SPINH31—3————————
IX + 1 ⇒ IXINH08—3—————∆——
IY + 1 ⇒ IYINH1808—4—————∆——
See Figure 3–2DIR
M ⇒ AAIMM
M ⇒ BBIMM
M ⇒ A,M + 1 ⇒ BIMM
M : M + 1 ⇒ SPIMM
M : M + 1 ⇒ IXIMM
M : M + 1 ⇒ IYIMM
AddressingInstructionCondition Codes
Mode OpcodeOperand CyclesSXHINZVC
IND,X
IND,Y
EXT
IND,X
IND,Y
A DIR
A EXT
A IND,X
A IND,Y
B DIR
B EXT
B IND,X
B IND,Y
DIR
EXT
IND,X
IND,Y
DIR
EXT
IND,X
IND,Y
DIR
EXT
IND,X
IND,Y
DIR
EXT
IND,X
IND,Y
EXT
IND,X
IND,Y
AINH48 —2————∆∆∆∆
7E
6E
186E
9D
BD
AD
18 AD
86
96
B6
A6
18A6
C6
D6
F6
E6
18E6
CC
DC
FC
EC
18EC
8E
9E
BE
AE
18AE
CE
DE
FE
EE
CDEE
18CE
18DE
18FE
1AEE
18EE
78
68
1868
hh ll
ff
ff
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
hh ll
ff
ff
3
————————
3
4
5
————————
6
6
7
2
————∆∆0—
3
4
4
5
2
————∆∆0—
3
4
4
5
3
————∆∆0—
4
5
5
6
3
————∆∆0—
4
5
5
6
3
————∆∆0—
4
5
5
6
4
————∆∆0—
5
6
6
6
6
————∆∆∆∆
6
7
LSLBLogical Shift
Left B
LSLDLogical Shift
Left Double
LSR (opr)Logical Shift
Right
LSRALogical Shift
Right A
BINH58 —2————∆∆∆∆
INH05—3————∆∆∆∆
EXT
IND,X
IND,Y
AINH44 —2————0∆∆∆
1864
74
64
hh ll
ff
ff
6
————0∆∆∆
6
7
Technical DataMC68HC11E Family — Rev. 4
60Central Processor Unit (CPU)MOTOROLA
Table 3-2. Instruction Set (Sheet 5 of 7)
C
0
b7b0
C
0
b7b0ABb7b0
C
b7b0
C
b7b0
C
b7b0
C
b7b0
C
b7b0
C
b7b0
MnemonicOperationDescription
LSRBLogical Shift
Right B
Central Processor Unit (CPU)
Instructi on Set
AddressingInstructionCondition Codes
Mode OpcodeOperand CyclesSXHINZVC
BINH54 —2————0∆∆∆
LSRDLogical Shift
Right Double
INH04—3———— 0∆∆∆
MULMultiply 8 by 8A ∗ B ⇒ DINH3D—10——————— ∆
NEG (opr)Two’s
Complement
NEGATwo’s
NEGBTwo’s
Memory Byte
Complement
A
Complement
0 – M ⇒ MEXT
IND,X
IND,Y
1860
70
60
hh ll
ff
ff
6
————∆∆∆∆
6
7
0 – A ⇒ AAINH40—2————∆∆∆∆
0 – B ⇒ BBINH50—2————∆∆∆∆
B
NOPNo operationNo OperationINH01—2————————
ORAA (opr)OR
ORAB (opr)OR
PSHAPush A onto
Accumulator
A (Inclusive)
Accumulator
B (Inclusive)
Stack
PSHBPush B onto
A + M ⇒ AAIMM
B + M ⇒ BBIMM
ADIR
AEXT
AIND,X
AIND,Y
BDIR
BEXT
BIND,X
BIND,Y
8A
9A
BA
AA
18AA
CA
DA
FA
EA
18EA
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
2
————∆∆0—
3
4
4
5
2
————∆∆0—
3
4
4
5
A ⇒ Stk,SP = SP – 1 AINH36—3————————
B ⇒ Stk,SP = SP – 1 BINH37—3————————
Stack
PSHXPush X onto
Stack (Lo
PSHYPush Y onto
PULAPull A from
PULBPull B from
PULXPull X Fr om
PULYPull Y from
First)
Stack (Lo
First)
Stack
Stack
Stack (Hi
First)
Stack (Hi
IX ⇒ Stk,SP = SP – 2 INH3C—4————————
IY ⇒ Stk,SP = SP – 2 INH183C—5————————
SP = SP + 1, A ⇐ Stk AINH32—4————————
SP = SP + 1, B ⇐ Stk BINH33—4————————
SP = SP + 2, IX ⇐ StkINH38—5————————
SP = SP + 2, IY ⇐ StkINH1838—6————————
First)
ROL (opr)Rotate Left EXT
IND,X
IND,Y
1869
79
69
hh ll
ff
ff
6
————∆∆∆∆
6
7
ROLARotate Left AAINH49—2————∆∆∆∆
ROLBRotate Left BBINH59—2————∆∆∆∆
ROR (opr)Rotate Right EXT
IND,X
IND,Y
1866
76
66
hh ll
ff
ff
6
————∆∆∆∆
6
7
RORARotate Right AAINH46—2————∆∆∆∆
RORBRotate Right BBINH56—2————∆∆∆∆
RTIReturn from
Interrupt
See Figure 3–2INH 3B—12∆↓∆∆∆∆∆∆
MC68HC11E Family — Rev. 4Technical Data
MOTOROLACentral Processor Unit (CPU) 61
Central Processor Unit (C PU)
Table 3-2. Instruction Set (Sheet 6 of 7)
MnemonicOperationDescription
RTSReturn from
SBASubtract B from
SBCA (opr)Subtract with
SBCB (opr)Subtract with
SECSet Carry1 ⇒ CINH0D—2——————— 1
SEISet Interrupt
SEVSet Overflow
STAA (opr)Store
STAB (opr)Store
STD (opr)Store
STOPStop Internal
STS (opr)Store Stack
STX (opr)Store Index
STY (opr)Store Index
SUBA (opr)Subtract
SUBB (opr)Subtract
SUBD (opr)Subtract
SWISoftware
TABTransfer A to BA ⇒ BINH16—2———— ∆∆0—
TAPTransfer A to
TBATransfer B to AB ⇒ AINH17—2———— ∆∆0—
Subroutine
A
Carry from A
Carry from B
Mask
Flag
Accumulator
A
Accumulator
B
Accumulator
D
Clocks
Pointer
Register X
Register Y
Memory from
A
Memory from
B
Memory from
D
Interrupt
CC Register
See Figure 3–2INH 39—5————————
A – B ⇒ AINH10—2———— ∆∆∆∆
A – M – C ⇒ AAIMM
B – M – C ⇒ BBIMM
1 ⇒ IINH0F—2———1————
1 ⇒ VINH0B—2——————1—
A ⇒ MADIR
B ⇒ MBDIR
A ⇒ M, B ⇒ M + 1DIR
—INHCF—2————————
SP ⇒ M : M + 1DIR
IX ⇒ M : M + 1DIR
IY ⇒ M : M + 1DIR
A – M ⇒ AAIMM
B – M ⇒ BAIMM
D – M : M + 1 ⇒ DIMM
See Figure 3–2INH 3F—14———1————
A ⇒ CCR INH06—2∆↓∆∆∆∆∆∆
AddressingInstructionCondition Codes
Mode OpcodeOperand CyclesSXHINZVC
82
ADIR
AEXT
AIND,X
AIND,Y
BDIR
BEXT
BIND,X
BIND,Y
AEXT
AIND,X
AIND,Y
BEXT
BIND,X
BIND,Y
EXT
IND,X
IND,Y
EXT
IND,X
IND,Y
EXT
IND,X
IND,Y
EXT
IND,X
IND,Y
ADIR
AEXT
AIND,X
AIND,Y
ADIR
AEXT
AIND,X
AIND,Y
DIR
EXT
IND,X
IND,Y
92
B2
A2
18A2
C2
D2
F2
E2
18E2
97
B7
A7
18 A7
D7
F7
E7
18 E7
DD
FD
ED
18 ED
9F
BF
AF
18 AF
DF
FF
EF
CD EF
18DF
18FF
1AEF
18EF
80
90
B0
A0
18A0
C0
D0
F0
E0
18E0
83
93
B3
A3
18A3
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
dd
hh ll
ff
ff
dd
hh ll
ff
ff
dd
hh ll
ff
ff
dd
hh ll
ff
ff
dd
hh ll
ff
ff
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
ii
dd
hh ll
ff
ff
jj kk
dd
hh ll
ff
ff
2
————∆∆∆∆
3
4
4
5
2
————∆∆∆∆
3
4
4
5
3
————∆∆0—
4
4
5
3
————∆∆0—
4
4
5
4
————∆∆0—
5
5
6
4
————∆∆0—
5
5
6
4
————∆∆0—
5
5
6
5
————∆∆0—
6
6
6
2
————∆∆∆∆
3
4
4
5
2
————∆∆∆∆
3
4
4
5
4
————∆∆∆∆
5
6
6
7
Technical DataMC68HC11E Family — Rev. 4
62Central Processor Unit (CPU)MOTOROLA
Table 3-2. Instruction Set (Sheet 7 of 7)
MnemonicOperationDescription
TESTTEST (Only in
TPATransfer CC
TST (opr)Test for Ze ro or
TSTATest A for Zero
TSTBTest B for Zero
TSXTransfer Stack
TSYTransfer Stack
TXSTransfer X to
TYSTransfer Y to
WAIWait for
XGDXExchange D
XGDYExchange D
Test Modes)
Register to A
Minus
or Minus
or Minus
Pointer to X
Pointer to Y
Stack Pointer
Stack Pointer
Interrupt
with X
with Y
Address Bus CountsINH00—*————————
CCR ⇒ AINH07—2————————
M – 0 EXT
A – 0AINH4D—2————∆∆00
B – 0BINH5D—2————∆∆00
SP + 1 ⇒ IXINH30—3————————
SP + 1 ⇒ IYINH1830—4————————
IX – 1 ⇒ SPINH35—3————————
IY – 1 ⇒ SPINH1835—4————————
Stack Regs & WAITINH3E—**————————
IX ⇒ D, D ⇒ IX INH8F—3————————
IY ⇒ D, D ⇒ IYINH188F—4————————
Central Processor Unit (CPU)
Instructi on Set
AddressingInstructionCondition Codes
Mode OpcodeOperand CyclesSXHINZVC
7D
IND,X
IND,Y
6D
186D
hh ll
ff
ff
6
————∆∆00
6
7
Cycle
* Infinity or until reset occurs
**12 cycles are used beginning with the opcode fetch. A wait state is entered which remains in effect for an integer number of MPU E-clock
cycles (n) until an interrupt is recognized. Finally, two additional cycles are used to fetch the appropriate interrupt vector (14 + n total).
Operands
dd= 8-bit direct address ($0000–$00FF) (high byte assumed to be $00)
ff= 8-bit positive offset $00 (0) to $FF (255) (is added to index)
hh= High-order byte of 16-bit extended address
ii= One byte of immediate data
jj= High-order byte of 16-bit immediate data
kk= Low-order byte of 16-bit immediate data
ll= Low-order byte of 16-bit extended address
mm= 8-bit mask (set bits to be affected)
rr= Signed relative offset $80 (–128) to $7F (+127)
(offset relative to address following machine code offset byte))
Operators
( )Contents of register shown inside parentheses
⇐Is transferred to
⇑Is pulled from stack
⇓Is pushed onto stack
•Boolean AND
+Arithmetic addition symbol except where used as inclusive-OR symbol
in Boolean formula
⊕Exclusive-OR
∗Multiply
:Concatenation
–Arithmetic subtraction symbol or negation symbol (two’s complement)
Condition Codes
—Bit not changed
0Bit always cleared
1Bit always set
∆Bit cleared or set, depending on operation
↓Bit can be cleared, cannot become set
This section contains information about the operating modes and the
on-chip memory for M68HC11 E-series MCUs. Except for a few minor
differences, operation is identical for all devices in the E series.
Differences are noted where necessary.
4.3 Operating Modes
The values of the mode select inputs MODB and MODA during reset
determine the operating mode. Single-chip and expanded multiplexed
are the normal modes.
•In single-chip mode only on-chip memory is available.
•Expanded mode, however, allows access to external memory.
Each of the two normal modes is paired with a special mode:
4.3.1 Single-Chip Mode
In single-chip mode, ports B and C and strobe pins A (STRA) and B
(STRB) are available for general-purpose parallel input/output (I/O). In
this mode, all software needed to control the MCU is contained in
internal resource s. If present, read-only memory ( ROM) and/or er asable,
programmable read-only memory (EPROM) will always be enabled out
of reset, ensuring that the re set and interrupt vecto rs will be available at
locations $FFC0–$FFFF.
NOTE:For the MC68HC811E2, the vector locations are the same; however,
they are contained in the 2048-byte EEPROM array.
•Bootstrap, a variation of the single-chip mode, is a special mode
that executes a bo otloader progra m in an internal boo tstrap ROM.
•Test is a special mode that allows privileged access to internal
resources.
Technical DataMC68HC11E Family — Rev. 4
66Operating Modes and On-Chip MemoryMOTOROLA
4.3.2 Expanded Mode
Operating Modes and On-Chip Memory
Operating Modes
In expanded operating mode, the MCU can access the full 64-Kbyte
address space. The space includes:
•The same on-chip memory addresses used for single-chip mode
•Addresses for external peripherals and memory devices
The expansion bus is made up of ports B and C, and control signals AS
(address strobe) and R/W (r ead/ wri te). R /W and AS allow the low-order
address and the 8-bit data bus to be multiplexed on the same pins.
During the first half of each bus cycle address information is present.
During the second half of each bus cycle the pins become the
bidirectional data bus. AS is an active-high latch enable signal for an
external address latch. Address information is allowed through the
transparent latch while AS is high and is latched when AS drives low.
NOTE:The write enable signal for an external memory is the NAND of the
4.3.3 Test Mode
The address, R /W
, and AS signals are active and valid for all bus cycles,
including accesses to i nternal memor y l ocatio ns. The E clock is used to
enable external devices to drive data onto the internal data bus during
the second half of a read bus cycle (E clock high). R/W controls the
direction of data tr ansfer s. R/W
drives low when data is being written to
the internal data bus. R/W will remain low during consecutive data bus
write cycles, such as when a double-byte store occurs.
Refer to Figure 4-1.
E clock and the inverted R/W signal.
Test mode, a variation of the expanded mode, is primarily used during
Motorola’s internal production testing; however, it is accessible for
programming the configuration (CONFIG) register, programming
calibration data into electrically erasable, programmable read-only
memory (EEPROM), and supporting emulation and debugging during
development.
When the MCU is reset in special bootstrap mode, a small on-chip
read-only memory (ROM) is enabled at address $BF00–$BFFF. The
ROM contains a bootloader program and a special set of interrupt and
reset vectors. The MCU fetches the reset vector, then executes the
bootloader.
Bootstrap mode is a specia l variation of the single-chip mode . Bootstrap
mode allows special-purpose programs to be entered into internal
random-access memory (RAM). When bootstrap mode is selected at
reset, a small bootstrap ROM becomes present in the memory map.
Reset and interrupt vectors are located in this ROM at $BFC0–$BFFF.
The bootstrap RO M contai ns a sma ll program which initializ es the seri al
communications interface (SCI) and allows the user to download a
program int o on-chip RA M. The size of the do wnloaded program can be
as large as the si ze of the on-chip RAM. After a 4-character delay, or
after receiving the character for the highest address in RAM, control
Technical DataMC68HC11E Family — Rev. 4
68Operating Modes and On-Chip MemoryMOTOROLA
4.4 Memory Map
Operating Modes and On-Chip Memory
Memory Map
passes to the loaded prog ram at $0000. Refer to Fig ure 4-2, Figure 4-3,
Figure 4-4, Figure 4-5, and Figure 4-6.
Use of an external pullup resistor is required when using the SCI
transmitter pi n because port D pins are configured for wired-OR
operation by th e bootloader. In bootstrap mode, the interru pt vectors are
directed to RAM . This all ows th e use of in terr upts thr ough a jump t able.
Refer to the application note AN1060 entitled M68HC11 Bootstrap
Mode, that is included in this data book.
The operat ing mode determ ines memory ma pping and whe ther external
addresses can be accessed. Refer to Fig ure 4-2, Figure 4-3,
Figure 4-4, Figure 4-5, and Figure 4-6, which illustra te the memory
maps for each of the three families comprising the M68HC11 E series of
MCUs.
Memory locat ions for on-chip resources are the same for both expande d
and single-chip modes. Control bits in the configuration (CONFIG)
register allow EPROM and EEPROM (if pr esent) to be disabled fro m the
memory map . The RAM is map ped to $0000 after reset. It can be p laced
at any 4-Kbyte boundary ($x000) by writing an appropriate value to the
RAM and I/O map re gister ( INIT). The 64-b yte re gister b l ock is map ped
to $1000 after reset and also can be placed at any 4-Kbyte boundary
($x000) by writing an app ropr iate val ue to the INIT reg ister. If R AM and
registers are mapped to the same boundary, the first 64 bytes of RAM
will be inaccessible.
Refer to Figure 4-7, which details the MCU register and control bit
assignments. Reset states shown are for single-chip mode only.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 69
Operating Modes and On-Chip Memory
$0000
$1000
$B600
$D000
$FFFF
EXT
EXTEXT
EXPANDED
BOOTSTRAPSPECIAL
Figure 4-2. Me mory Map for MC68 HC11E0
EXT
TEST
0000
512 BYTES RAM
01FF
1000
64-BYTE REGIST ER BLOC K
103F
BOOT
BF00
ROM
BFFF
NORMAL
FFC0
MODES
INTERRUPT
FFFF
VECTORS
BFC0
BFFF
SPECIAL MODES
INTERRUPT
VECTORS
$0000
$1000
$B600
$D000
$FFFF
EXT
EXTEXT
EXT
EXPANDED
BOOTSTRAPSPECIAL
Figure 4-3. Me mory Map for MC68 HC11E1
EXT
EXT
TEST
0000
512 BYTES RAM
01FF
1000
64-BYTE REGISTE R BLO CK
103F
B600
512 BYTES EEPROM
B7FF
BOOT
BF00
ROM
BFFF
NORMAL
FFC0
MODES
INTERRUPT
FFFF
VECTORS
BFC0
BFFF
SPECIAL MODES
INTERRUPT
VECTORS
Technical DataMC68HC11E Family — Rev. 4
70Operating Modes and On-Chip MemoryMOTOROLA
Operating Modes and On-Chip Memory
Memory Map
$0000
$1000
$B600
$D000
$FFFF
SINGLE
CHIP
0000
EXT
EXTEXT
EXT
EXPANDED
BOOTSTRAPSPECIAL
EXT
EXT
TEST
512 BYTES RAM
01FF
1000
64-BYTE REGISTER BLOCK
103F
B600
512 BYTES EEPROM
B7FF
BOOT
BF00
ROM
BFFF
12 KBYTES ROM/EPROM
D000
FFFF
Figure 4-4. Memory Map for MC68HC(7)11E9
BFC0
BFFF
FFC0
FFFF
SPECIAL MODES
INTERRUPT
VECTORS
NORMAL
MODES
INTERRUPT
VECTORS
$0000
EXT
$1000
EXT
$9000
EXT
$B600
EXT
$D000
$FFFF
SINGLE
CHIP
* 20 Kbytes RO M/EPROM are contained in two se gments of 8 Kbytes and 12 Kbytes each.
EXPANDED
BOOTSTRAPSPECIAL
EXT
EXT
EXT
EXT
TEST
0000
768 BYTES RAM
02FF
1000
64-BYTE REGISTER BLOC K
103F
9000
8 KBYTES ROM/EPROM *
AFFF
B600
512 BYTES EEPROM
B7FF
BOOT
BF00
ROM
BFFF
12 KBYTES ROM/EPROM *
D000
FFFF
Figure 4-5. Memory Map for MC68HC(7)11E20
BFC0
BFFF
FFC0
FFFF
SPECIAL MODES
INTERRUPT
VECTORS
NORMAL
MODES
INTERRUPT
VECTORS
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 71
Operating Modes and On-Chip Memory
$0000
$1000
$F800
$FFFF
SINGLE
CHIP
0000
EXT
EXTEXT
EXPANDED
BOOTSTRAPSPECIAL
EXT
TEST
00FF
1000
103F
BF00
BFFF
F800
FFFF
Figure 4-6. Memory Map for MC68HC811E2
256 BYTES RAM
64-BYTE REGISTER BLOCK
BOOT
ROM
2048 BYTES EEPRO M
BFC0
BFFF
FFC0
FFFF
SPECIAL MODES
INTERRUPT
VECTORS
NORMAL
MODES
INTERRUPT
VECTORS
Addr.Register NameBit 7654321Bit 0
Read:
PA7PA6PA5PA4PA3PA2PA1PA0
Write:
Reset:I000IIII
$1000
Port A Data Register
(PORTA)
See page 134.
$1001ReservedRRRRRRRR
Read:
STAFSTAICWOMHNDSOINPLSEGAINVB
Write:
Reset:00000U11
$1002
Parallel I/O Control Register
(PIOC)
See page 141.
= UnimplementedR= ReservedU = Unaffected
I = Indeterminate after reset
Figure 4-7. Register and Control Bit Assignments (Sheet 1 of 8)
Technical DataMC68HC11E Family — Rev. 4
72Operating Modes and On-Chip MemoryMOTOROLA
Operating Modes and On-Chip Memory
Memory Map
Addr.Register NameBit 7654321Bit 0
Port C Data Re gister
$1003
Port B Data Register
$1004
Port C Latched Register
$1005
$1006ReservedRRRRRRRR
Port C Data Direction Regist er
$1007
Port D Data Re gister
$1008
(PORTC)
See page 136.
(PORTB)
See page 136.
(PORTCL)
See page 137.
(DDRC)
See page 137.
(PORTD)
See page 138.
Read:
PC7PC6PC5PC4PC3PC2PC1PC0
Write:
Reset:Indeterminate after reset
Read:
PB7PB6PB5PB4PB3PB2PB1PB0
Write:
Reset:00000000
Read:
PCL7P C L6PCL5PCL4PC L3PCL2PCL1P C L0
Write:
Reset:Indeterminate after reset
Read:
DDRC7 DDRC6DDRC5DDRC4DDRC3DDRC2DDRC1 DDRC0
Write:
Reset:00000000
Read:
00PD5PD4PD3PD2PD1PD0
Write:
Reset:UUIIIIII
Read:
DDRD5DDRD4DDRD3DDRD2DDRD1 DDRD0
Write:
Reset:00000000
Read:
PE7PE6PE5PE4PE3PE2PE1PE0
Write:
Reset:Indeterminate after reset
Read:
FOC1FOC2FOC3FOC4FOC5
Write:
Reset:00000000
= UnimplementedR= ReservedU = Unaffected
I = Indeterminate after reset
$1009
$100A
$100B
Port D Data Direction Regist er
(DDRD)
See page 138.
Port E Data Register
(PORTE)
See page 139.
Timer Compare Force
Register (CFORC)
See page 190.
Figure 4-7. Register and Control Bit Assignments (Sheet 2 of 8)
Figure 4-7. Register and Control Bit Assignments (Sheet 7 of 8)
Technical DataMC68HC11E Family — Rev. 4
78Operating Modes and On-Chip MemoryMOTOROLA
Operating Modes and On-Chip Memory
Memory Map
Addr.Register NameBit 7654321Bit 0
$1038ReservedRRRRRRRR
$1039
$103A
$103B
$103C
$103D
System Configuration Options
Register (OPTION)
See page 91.
Arm/Reset COP Timer
Circuitry Register (COPRST)
See page 111.
EPROM and EEPROM
Programming Control Register
(PPROG) See page 95.
Highest Priority I Bit Interrupt
and Miscellaneous Register
(HPRIO) See page 83.
RAM and I/O Mapping
Register (INIT)
See page 89.
Read:
ADPUCSELIRQE
Write:
Reset:00010000
Read:
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
Write:
Reset:00000000
Read:
ODDEVENELAT
Write:
Reset:00000000
Read:
RBOOTSMODMDAIRV(NE)PSEL3PSEL2PSEL1PSEL0
Write:
Reset:00000110
Read:
RAM3RAM2RAM1RAM0REG3REG2REG1REG0
Write:
Reset:00000001
(1)
(2)
(1)
DLY
CMECR1
BYTEROWERASEEELATEPGM
(1)
CR0
$103EReservedRRRRRRRR
(1)
System Configuration Register
$103F
(CONFIG)
See page 87.
System Configuration Register
$103F
(CONFIG)
See page 87.
1. Can be written only once in first 64 cycles out of reset in normal modes or at any time during special modes.
2. MC68HC711E9 only
Read:
NOSECNOCOP ROMONEEON
Write:
Reset:0000UU1U
Read:
(3)
Write:
EE3EE2EE1EE0NOSECNOCOP
Reset:1111UU11
EEON
3. MC68HC811E2 only
= UnimplementedR= ReservedU = Unaffected
I = Indeterminate after reset
Figure 4-7. Register and Control Bit Assignments (Sheet 8 of 8)
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 79
Operating Modes and On-Chip Memory
4.4.1 RAM and Input/Ou tput Mapping
Hardware priority is built into RAM and I/O mapping. Registers have
priority over RAM and RAM has priority over ROM. When a lower priority
resource is m apped at t he same loca tion as a high er prior ity reso urce, a
read/write of a location results in a read/write of the higher priority
resource only. For example, if both the register block and the RAM are
mapped to the sam e location, o nly the regist er block will be accessed. If
RAM and ROM are located at the same position, RAM has priority.
The fully static RAM can be used to store instructions, variables, and
temporary data. The direct add ressing mo de can access RAM locat ions
using a 1-byte address operand, saving program memory space and
execution time, depending on the application.
RAM contents can be preserved during per iods of processor ina ctivity by
two methods, both of which reduce power consumption. They are:
1.In the software-based stop mode, the clocks are stopped while
powers the MCU. Because power supply current is directly
V
DD
related to op erating fre quency in C MOS integra ted circ uits, only a
very small am ount of leakage e xists whe n the cloc ks are sto pped.
2.In the second method, the MODB/V
pin can supply RAM
STBY
power from a battery backup or from a second power supply.
Figure 4-8 shows a typical standby voltage circuit for a standard
5-volt device. Adjustmen ts to the circuit m ust be m ade for devices
that operate at lower voltages. Using the MODB/V
STBY
pin m ay
require external hardware, but can be justified when a significant
amount o f external c ircuitry is operating from V
DD
. If V
STBY
is used
to maintain RAM content s, reset must be held low whenever VDD
is below normal operating level. Refer to Section 5. Resets and
Interrupts.
Technical DataMC68HC11E Family — Rev. 4
80Operating Modes and On-Chip MemoryMOTOROLA
4.8-V
NiCd
Operating Modes and On-Chip Memory
Memory Map
V
DD
MAX
690
V
DD
V
OUT
V
BATT
+
4.7 k
TO MODB/V
OF M68HC11
STBY
Figure 4-8. RAM Standby MODB/V
Connections
STBY
The bootload er program is contained in the internal boo tstrap ROM. This
ROM, which appears as internal memory space at locations
$BF00–$BFFF, is enabled only if the MCU is reset in special bootstrap
mode.
In expanded modes, the ROM/EPROM/OTPROM (if present) is enabled
out of reset and located at the top of the memory map if the RO MON bit
in the CONFIG register i s set. ROM or EPROM is enabled out of rese t in
single-chip and bootstrap modes, regardless of the state of ROMON.
For devices with 512 bytes of EEPROM, the EEPROM is located at
$B600–$B7FF and has the same read cycle time as the internal ROM.
The 512 bytes of EEPROM cannot be remapped to other locations.
For the MC6 8HC811E 2, EEP ROM is l oca ted a t $F 800–$ FFFF and can
be remapped to any 4-Kbyte boundary. EEPROM mapping control bits
(EE[3:0] in CONFIG) determine the location of the 2048 bytes of
EEPROM and are present only on the MC68HC811E2. Refer to
4.4.3.1 System Configuration Register for a description of the
MC68HC811E2 CONFIG register.
EEPROM can be programmed or erased by software and an on-chip
charge pump , allow ing EE PRO M chan ges us in g the single VDD supply.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 81
Operating Modes and On-Chip Memory
4.4.2 Mode Selection
The four mode variations are selected by the logic states of the MODA
and MODB pins during reset. The MODA and MODB logic levels
determine the logic state of SMOD and the MDA control bits in the
highest priority I-bit interrupt and miscellaneous (HPRIO) register.
After reset is released, the mode select pins no longer influence the
MCU operating mode. In single-chip operating mode, the MODA pin is
connected to a logic level 0. In expanded mode, MODA is normally
connected to VDD through a pullup resistor of 4.7 kΩ. The MODA pin
also functions as the load instruction register LIR
not in reset. The open-drain active low LIR
the first E cycle of each instruction. The MODB pin also functions as
standby power input (V
maintained in absence of V
pin when the MCU is
output pin drives low during
), which allows RAM contents to be
STBY
.
DD
Refer to Tabl e 4-1, whic h is a summa ry of mode pin opera tion, the mode
control bits, and the four operating modes.
A normal mode is selected when MODB is logic 1 during reset. One of
three reset vectors is fetched from address $FFFA–$FFFF , and program
execution begins from the address indicated by this vector. If MODB is
logic 0 during reset, the special mode reset vector is fetched from
addresses $BFFA–$BFFF, and software has access to special test
features. Refer to Section 5. Resets and Interrupts.
Technical DataMC68HC11E Family — Rev. 4
82Operating Modes and On-Chip MemoryMOTOROLA
Address:$103C
Bit 7654321Bit 0
Operating Modes and On-Chip Memory
Memory Map
Read:
Write:
Resets:
Single chip:00000110
Expanded:00100110
Bootstrap:11000110
Test:01110110
1. The reset values depend on the mode selected at the RESET pin rising edge.
RBOOT
(1)
SMOD
(1)
MDA
(1)
IRV(NE)
(1)
PSEL3PSEL2PSEL1PSEL0
Figure 4-9. Highest Priority I-Bit Interrupt and Miscellaneous
Register (HPRIO)
RBOOT — Read Bootstrap ROM Bit
Valid only when S MOD is set (bootstrap o r special test mode); ca n be
written only in special modes
0 = Bootloader ROM disabled and not in map
1 = Bootloader ROM enabled and in map at $BE00–$BFFF
SMOD and MDA — Special Mode S elect and Mode Select A Bits
The initial value of SMOD is the inverse of the logic level present on
the MODB pin at the rising edge of reset. The initial value of MDA
equals the logic level present on the MODA pin at the rising edge of
reset. These two bits can be read at any time. They can be written
anytime in special modes. MDA can be written only once in normal
modes. SMOD cannot be set once it has been cleared.
IRVNE can be written once i n any mode. In expanded modes, IRV NE
determines whether IRV is on or off. In special test mode, IRVNE is
reset to 1. In all other modes, IRVNE is reset to 0. For the
MC68HC811E2, this bit is IRV and only controls the internal read
visibility function.
0 = No internal read visibility on external bus
1 = Data from internal reads is driven out the external data bus.
In single-chip modes this bit determines whether the E clock drives
out from the chip. For the MC68HC81 1E2, this bit has no mea ning or
effect in single-chip and bootstrap modes.
0 = E is driven out from the chip.
1 = E pin is driven low. Refer to the following table.
Mode
Single chip0OnOffEOnce
Expanded0OnOffIRVOn ce
Bootstrap0OnOffEOnce
Special test1OnOnIRVOnce
IRVNE Out
of Reset
E Clock Out
of Reset
IRV Out
of Reset
IRVNE
Affects Only
IRVNE Can
Be Written
PSEL[3:0] — Priority Select Bits
Refer to Section 5. Resets and Interrupts.
Technical DataMC68HC11E Family — Rev. 4
84Operating Modes and On-Chip MemoryMOTOROLA
4.4.3 System Initialization
Registers and bits t hat control initialization and the bas ic operation of the
MCU are protected against writes except under special circumstances.
Table 4-2 lists registers that can be written only once after reset or that
must be written within the first 64 cycles after reset.
SMOD = 1$x024T imer interru p t mask 2 (TMSK2)—All, set or clear
Register
Address
$x035B lo ck protect register (BPROT)Clear bits, once o nlyS et bits only
$x039
$x03C
$x03DRAM and I/O map register (INI T)Yes, once only —
$x035B lo ck protect register (BPROT)—All, set or clear
$x039
$x03C
$x03DRAM and I/O map register (INIT)—All, set or clear
System configuration
options (OPTION)
Highest priority I-bit interru pt
and miscellaneous (HPRIO)
System configuration options
(OPTION)
Highest priority I-bit interrupt and
miscellaneous (HPRIO)
Register Nam e
Must be Written
in First 64 Cycles
Bits [5:4], bits [2:0],
once only
See HPRIO
description
—All, set or clear
See HPRIO
description
Write
Anytime
Bits [7:6], bit 3
See HPRIO
description
See HPRIO
description
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 85
Operating Modes and On-Chip Memory
4.4.3.1 System Configuration Register
The system configuration register (CONFIG) consists of an EEPROM
byte and static lat ches th at control th e startup co nfiguration o f the MC U.
The contents of the EEPROM byte are transferred into static working
latches during rese t sequ ences. The operation of the MC U is co ntrolled
directly by these latches and not by CONFIG itself. In normal modes,
changes to CONFIG do not affect operation of the MCU until after the
next reset sequen ce. When pr ogr amm ing, the C ONF IG reg ister it self is
accessed. When the CONFIG register is read, the static latches are
accessed. See 4.6.1 EEPR OM and CONFIG Programming and
Erasure for information on modifying CONFIG.
To take full advantage of the MCU’s functionality, customers can
program the CONFIG register in bootstrap mode. This can be
accomplished by setting the mode pins to logic 0 and downloading a
small program to internal RAM. For more information, Motorola
application note AN1060 enti tled M68HC11 Boo tst ra p M ode has been
included at the back of this document. The downloadable talker will
consist of:
•Bulk erase
•Byte programming
•Communication server
All of this functionality is provided by PCbug11 which can be found on
the Motorola Web site at http://www.motorola.com/semicon ductors/.
For more i nformation on using PCb ug11 to pr ogram an E-series d evice,
Motorola engi neering bulletin EB296 entitled Programming
MC68HC711E9 Devices with PCbug11 and the M68HC11EVBU has
been included at the back of this document.
NOTE:The CONFIG register on the 68HC11 is an EEPROM cell and must be
programmed accordingly.
Operation of the CONFIG register in the MC68HC811E2 differs from
other devices in the M68HC11 E series. See Figure 4-10 and
Figure 4-11.
Technical DataMC68HC11E Family — Rev. 4
86Operating Modes and On-Chip MemoryMOTOROLA
Address:$103F
Bit 7654321Bit 0
Operating Modes and On-Chip Memory
Memory Map
Read:
Write:
Resets:
Single chip:0000UU1U
Bootstrap:0000UU(L)UU
Expanded:00001UUU
Test:00001U(L)UU
= Unimplemented
U indicates a previously programmed bit. U(L) indicates that the bit resets to the logic level held in the latch
prior to reset, but the function of COP is controlled by the DISR bit in TEST1 register.
NOSECNOCOPROMONEEON
Figure 4-10. System Configuration Register (CONFIG)
Address:$103F
Bit 7654321Bit 0
Read:
EE3EE2EE1EE0NOSECNOCOP
Write:
EEON
Resets:
Single chip:1111UU11
Bootstrap:1111UU(L)11
Expanded:UUUU1U1U
Test:UUUU1U(L)10
= Unimplemented
U indicates a previously programmed bit. U(L) indicates that the bit resets to the logic level held in the latch
prior to reset, but the function of COP is controlled by the DISR bit in TEST1 register.
Figure 4-11. MC68HC811E2 System Configuration Register (CONFIG)
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 87
Operating Modes and On-Chip Memory
EE[3:0] — EEPROM Mapping Bits
EE[3:0] apply only to MC68HC811E2 and allow the 2048 bytes of
EEPROM to be remapped to any 4-Kbyte boundary. See Table 4-3.
NOSEC is invalid unless th e secur i ty mask o ption is spec if ied befo re
the MCU is manufactured. If the security mask option is omitted
NOSEC always reads 1. The enhanced security feature is available
in the MC68S711 E9 MCU. The enhancement to the standard security
feature protects the EPROM as well as RAM and EEPROM.
0 = Security enabled
1 = Security disabled
NOCOP — COP System Disable Bit
Refer to Section 5. Resets and Interrupts.
1 = COP disabled
0 = COP enabled
Technical DataMC68HC11E Family — Rev. 4
88Operating Modes and On-Chip MemoryMOTOROLA
ROMON — ROM/EPROM/OTPR OM Enable Bit
When this bit is 0, the ROM or EPROM is disabled and that memory
space becomes extern ally addresse d. In single-ch ip mode, RO MO N
is forced to 1 to enable ROM/EPROM regardless of the state of the
ROMON bit.
0 = ROM disabled from the memory map
1 = ROM present in the memory map
EEON — EEPROM Enable Bit
When this bit is 0, the EEPROM is disabled and that memory space
becomes externally addressed .
0 = EEPROM removed from the memory map
1 = EEPROM present in the memory map
4.4.3.2 RAM and I/O Mapping Register
Operating Modes and On-Chip Memory
Memory Map
The internal registers used to control the operation of the MCU can be
relocated on 4-Kbyte bound ari es within the memory space with the use
of the RAM and I/O mapping register (INIT). This 8-bit special-purpose
register can change the default locations of the RAM and control
registers within the MCU memory map. It can be written only once withi n
the first 64 E-clock cycles after a reset in normal modes, and then it
becomes a read-only register.
Address:$103D
Bit 7654321Bit 0
Read:
Write:
Reset:00000001
RAM3RAM2RAM1RAM0REG3REG2REG1REG0
Figure 4-12. RAM and I/O Mapping Register (INIT)
RAM[3:0] — RAM Map Position Bits
These four bits, which specify the up per hexadecimal digit of the RAM
address, control position of RAM in the memory map. RAM can be
positioned at the begi n ning of any 4 -K byte p age in the m emo ry ma p.
It is initialized to address $0000 out of reset. Refer to Table 4-4.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 89
Operating Modes and On-Chip Memory
REG[3:0] — 64-Byte Register Block Position
These four bits sp ecify th e upper hexadecimal d igit of the addr ess for
the 64-byte block of internal registers. The register block, positioned
at the beginnin g of any 4-Kb yte page in the m emory map, is i nitialized
to address $1000 out of reset. Refer to Table 4-5.
The 8-bit, special-purpose system configuration options register
(OPTION) sets internal system configuration options during initialization.
The time protected contro l bits, IRQE, DLY , and CR[1:0], can be written
only once after a r eset and then th ey become re ad-only . This mini mizes
the possibility of an y acciden tal chan ges to the system configuration.
Address:$1039
Bit 7654321Bit 0
Operating Modes and On-Chip Memory
Memory Map
Read:
ADPUCSELIRQE
Write:
Reset:00010000
1. Can be written only once in first 64 cycle s out of reset in normal modes or at any time during
special modes.
= Unimplemented
(1)
DLY
(1)
CMECR1
(1)
CR0
(1)
Figure 4-13. System Configuration Options Register (OPTION)
ADPU — Analog-to-Digital Converter Power-Up Bit
Refer to Section 10. Analog-to-Digital (A/D) Converter.
CSEL — Clock Select Bit
Selects alternate clock source for on-chip EEPROM charge pump.
Refer to 4.6.1 EEPROM and CONFIG Programming and Erasure
for more information on EEPROM use.
CSEL also selects the clock source for the A/D converter, a function
discussed in Section 10. Analog-to-Digital (A/D) Converter.
IRQE — Configure IRQ
for Edge-Sensitive Only Operation Bit
Refer to Section 5. Resets and Interrupts.
DLY — Enable Oscillator Startup Delay Bit
0 = The oscillator startup delay coming out of stop mode is
bypassed and the MCU resumes proce ssing within about four
bus cycles.
1 = A delay of approximately 4000 E-clock cycles is impose d as the
MCU is started up from the stop power-saving mode. This
delay allows the crystal oscillator to stabilize.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 91
Operating Modes and On-Chip Memory
CME — Clock Monitor Enable Bit
Refer to Section 5. Resets and Interrupts.
Bit 2 — Not implemented
Always reads 0
CR[1:0] — COP Timer Rate Select Bits
The internal E clock is divided by 215 before it enters the COP
watchdog system. These control bits determine a scaling factor for
the watchdog timer. Refer to Section 5. Resets and Interrupts.
4.5 EPROM/OTPROM
Certain devices in the M68HC11 E series include on-chip
EPROM/OTPROM. For instance:
•The MC68HC711E9 devices contain 12 Kbytes of on-chip
EPROM (OTPROM in non-windowed package).
•The MC68HC711E20 has 20 Kbytes of EPROM (OTPROM in
non-windowed package).
•The MC68HC711E32 has 32 Kbytes of EPROM (OTPROM in
non-windowed package).
Standard MC68 HC71E9 and MC68HC711E20 devi ces are shipped with
the EPROM/OTPROM contents erased (all 1s). The programming
operation programs 0s. Windowed devices must be erased using a
suitable ul traviolet light sour ce before reprogramm ing. Depending o n the
light source, erasing can take from 15 to 45 minutes.
Using the on-chip EPROM/OTPROM programming feature requires an
external 12-volt nominal power supply (V
). Normal programming is
PPE
accomplished using the EPROM/OTPROM programming register
(PPROG).
PPROG is the combined EPROM/OTPROM and EEPROM
programming reg i ster on all devi ces wi th EP ROM/OT PRO M excep t the
MC68HC711E20 . For the MC68 HC711E20, th ere is a se parate reg ister
for EPROM/OTPROM programming called the EPROG register.
Technical DataMC68HC11E Family — Rev. 4
92Operating Modes and On-Chip MemoryMOTOROLA
As described in the following subsections, these two methods of
programming and verifying EPROM are possible:
•Programming an individual EPROM address
•Programming the EPROM with downloaded data
4.5.1 Programming an Individual EPROM Address
In this method, the MC U programs its own EPROM by controlling the
PPROG register (EPROG in MC68HC711E20). Use these procedures
to program the EPROM through the MCU with:
•The ROMON bit set in the CONFIG register
•The 12-volt nominal programming voltage present on the
XIRQ/V
PPE
pin
Operating Modes and On-Chip Memory
EPROM/OTPROM
•The IRQ
pin must be pulled high.
NOTE:Any operating mode can be used.
This example applies to all devices with EPROM/OTPROM except for
the MC68HC711E20.
EPROGLDAB #$20
STAB$103BSet ELAT bit in (EPGM = 0) to enable
STAA$0,XStore data to EPROM address
LDAB#$21
STAB$103BSet EPGM bit with ELAT = 1 to enable
JSRDLYEPDelay 2–4 ms
CLR$103BTurn off programming voltage and set
This example applies only to MC68HC711E20.
EPROGLDAB#$20
STAB$1036Set ELAT bit (EPGM = 0) to enable
STAA$0,XStore data to EPROM address
LDAB#$21
STAB$1036Set EPGM bit with ELAT = 1 to enable
JSRDLYEPDelay 2–4 ms
CLR$1036Turn off programming voltage and set
EPROM latches.
EPROM programming voltage
to READ mode
EPROM latches.
EPROM programming voltage
to READ mode
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 93
Operating Modes and On-Chip Memory
4.5.2 Programming the EPROM with Downloaded Data
When using thi s metho d, th e E PRO M is prog ramm ed by software while
in the spe cial te st or b ootstr ap mode s. Use r-de v eloped so ftware can be
uploaded through the SCI or a ROM-resident EPROM programming
utility can be used. The 12-volt nominal programming voltage must be
present on the XIRQ/V
3-byte program co nsis ting o f a singl e jump instructi o n to $ BF00. $B F00
is the starting address of a resident EPROM programming utility. The
utility program sets the X and Y index registers to default values, then
receives progr amming data from an e xternal host, and puts it in EPROM.
The value in IX determines programming delay time. The value in IY is
a pointer to the first address in EPROM to be programmed
(default = $D000).
When the utility program is ready to receive programmin g data, it sends
the host the $FF character. Then it waits. When the host sees the $FF
character, the EPROM programming data is sent, starting with the first
location in the EPROM array. After the last byte to be programmed is
sent and the corresponding verification data is returned, the
programming operation is terminated by resetting the MCU.
pin. To use the resident utility, bootload a
PPE
For more information, Motorola application note AN1060 entitled
M68HC11 Bootstrap Mode has been included at the back of this
document.
4.5.3 EPROM and EEPROM Programming Control Register
The EPROM and EEPROM programming control register (PPROG)
enables the EPROM programming voltage and controls the latching of
data to be programmed.
•For MC68HC711E9, PPROG is also the EEPROM programming
control register.
•For the MC68HC711E20, EPROM programming is controlled by
the EPROG register and EEPROM programming is controlled by
the PPROG register.
Technical DataMC68HC11E Family — Rev. 4
94Operating Modes and On-Chip MemoryMOTOROLA
Address:$103B
Bit 7654321Bit 0
Operating Modes and On-Chip Memory
EPROM/OTPROM
Read:
ODDEVENELAT
Write:
Reset:00000000
1. MC68HC711E9 only
(1)
BYTEROWERASEEELATEPGM
Figure 4-14. EPROM and EEPROM Programming
Control Register (PPROG)
ODD — Program Odd Rows in Half of EEPROM (Test) Bit
Refer to 4.6 EEPROM.
EVEN — Program Even Rows in Half of EEPROM (Test) Bit
Refer to 4.6 EEPROM.
ELAT — EPROM/OTPROM Latch Control Bit
When ELAT = 1, writes to EPROM cause address and data to be
latched and the EPROM/OTPROM cannot be read. ELAT can be
read any time. ELAT can be wri tten any time except when EPGM = 1;
then the write to ELAT is disabled.
0 = EPROM address and data bus configured for normal reads
1 = EPROM address and data bus configured for programming
For the MC68HC711E9:
a.EPGM enables t he high voltage necessary for both EEPROM
and EPROM/OTPROM programming.
b.ELAT and EELAT are mutually exclusive and cannot both
equal 1.
BYTE — Byte/Other EEPROM Erase Mode Bit
Refer to 4.6 EEPROM.
ROW — Row/All EEPROM Erase Mode Bit
Refer to 4.6 EEPROM.
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 95
Operating Modes and On-Chip Memory
ERASE — Erase Mode Select Bit
Refer to 4.6 EEPROM.
EELAT — EEPROM Latch Control Bit
Refer to 4.6 EEPROM.
EPGM — EPROM/OTPROM/EEPROM Programming
Voltage Enable Bit
EPGM can be read a ny time an d can be written only when ELAT = 1
(for EPROM/OTPROM programming) or when EELAT = 1 (for
EEPROM programming).
0 = Programming voltage to EPROM/OTPROM/EEPROM array
disconnected
1 = Programming voltage to EPROM/OTPROM/EEPROM array
connected
Address:$1036
Bit 7654321Bit 0
Read:
Write:
MBE
Reset:00000000
= Unimplemented
ELATEXCOLEXROWT1T0PGM
Figure 4-15. MC68HC711E20 EPROM Programming
Control Register (EPROG)
MBE — Multiple-Byte Programming Enable Bit
When multiple-byte programming is enabled, address bit 5 is
considered a don’t care so that bytes with address bit 5 = 0 and
address bit 5 = 1 both get program med. MBE can be rea d in any mode
and always reads 0 in normal modes. MBE can be w ritten only in
special modes.
0 = EPROM array configured for normal programming
1 = Program two bytes with the same data
Bit 6 — Unimplemented
Always reads 0
Technical DataMC68HC11E Family — Rev. 4
96Operating Modes and On-Chip MemoryMOTOROLA
Operating Modes and On-Chip Memory
EPROM/OTPROM
ELAT — EPROM/OTPROM Latch Control Bit
When ELAT = 1, writes to EPROM cause address and data to be
latched and the EPROM/OTPROM cannot be read. ELAT can be
read any time. ELAT can be written any time except when PGM = 1;
then the write to ELAT is disabled.
0 = EPROM/O TPROM address and data b us configured for normal
reads
1 = EPROM/OTPROM address and data bus configured for
programming
EXCOL — Select Extra Colum ns Bit
0 = User array sel ected
1 = User array is disabled and extr a column s are accessed at bits
[7:0]. Addresses use bits [13:5] and bits [4:0] are don’t care.
EXCOL can be read and written only in special modes and
always returns 0 in normal modes.
EXROW — Select Extra Rows Bit
0 = User array sel ected
1 = User array is disabled and two extra rows are available.
Addresses use bits [7:0] and bits [1 3:8] are don’t care. EXROW
can be read and written only in special modes and always
returns 0 in normal modes.
T[1:0] — EPROM Test Mode Select Bits
These bits allow selection of either gate stress or drain stress test
modes. They can be read and written only in special modes and
always read 0 in normal modes.
PGM can be read any time and can be written only when ELAT = 1.
0 = Programming voltage to EPROM array disconnected
1 = Programming voltage to EPROM array connected
4.6 EEPROM
Some E-series devices contain 512 bytes of on-chip EEPROM. The
MC68HC811E2 contains 2048 bytes of EEPROM with selectable base
address. All E-series devices contain the EEPROM-based CONFIG
register.
4.6.1 EEPROM and CONFIG Programming and Erasure
The erased state of an EEPROM bit is 1. During a read operation, bit
lines are precharge d to 1. The floating gate devices of pro grammed bits
conduct and pull the bit lines to 0. Unprogrammed bits remain at the
precharged le vel and are r ead as 1s. P ro grammi ng a bit to 1 cause s no
change. Programming a bit to 0 changes the bit so that subsequent
reads return 0.
When appropriate bits in the BPROT register are cleared, the PPROG
register controls programming and erasing the EEPROM. The PPROG
register can be read or written at any time, but logic enforces defined
programming and erasing sequences to prevent unintentional changes
to EEPROM data. When the EELAT bit in the PPROG registe r is cleared,
the EEPROM can be read as if it were a ROM.
The on-chip charge pump that generates the EEPROM programming
voltage from V
uses MOS capacitors, which are relatively small in
DD
value. The efficiency of this charge pump and its drive capability are
affected by the level of VDD and the frequency of the driving clock. The
load depends on the number of bits being programmed or erased and
capacitances in the EEPROM array.
The clock source driving the charg e pump is software sel ectable. When
the clock select (CSEL) bit in the OPTION register is 0, the E clock is
Technical DataMC68HC11E Family — Rev. 4
98Operating Modes and On-Chip MemoryMOTOROLA
used; when CSEL is 1, an on-chip resistor-capacitor (RC) oscillator is
used.
The EEPROM programming voltage power supply voltage to the
EEPROM array is not enabled until there has been a write to PPROG
with EELAT set and PGM cleared. This must be foll owed by a write to a
valid EEPROM location or to the CONFIG address, and then a write to
PPROG with both the EELAT and EPGM bits set. Any attempt to set
both EELAT and EPGM during the same write operation results in
neither bit being set.
4.6.1.1 Block Protect Register
This register prevents inadvertent writes to both the CONFIG register
and EEPROM. The active bits in this register are initialized to 1 out of
reset and can be cleared only during the first 64 E-clock cycles after
reset in the normal modes. When these bits are cl eared, the associated
EEPROM section and the CONFIG register can be programmed or
erased. EEPROM i s o nly visi ble if th e E EON bit in the CO NFIG registe r
is set. The bits in the BPROT register can be written to 1 at any time to
protect EEPROM and the CONFIG register. In test or bootstrap mode s,
write protection is inhibited and BPROT can be written repeatedly.
Address ranges for protected areas of EEPROM differ significantly for
the MC68HC811E2. Refer to Figure 4-16.
Operating Modes and On-Chip Memory
EEPROM
Address:$1035
Bit 7654321Bit 0
Read:
PTCONBPRT3BPRT2BPRT1BPRT0
Write:
Reset:00011111
= Unimplemented
Figure 4-16. Block Protect Register (BPROT)
Bits [7:5] — Unimplemented
Always read 0
MC68HC11E Family — Rev. 4Technical Data
MOTOROLAOperating Modes and On-Chip Memo ry 99
Operating Modes and On-Chip Memory
PTCON — Protect CONFIG Register Bit
0 = CONFIG register can be programmed or erased normally.
1 = CONFIG register cannot be programmed or erased.
BPRT[3:0] — Block Protect Bits for EEPROM
When set, these bits protect a block of EEPROM from being
programmed or electronically erased. Ultraviolet light, however, can
erase the entire EEPROM contents regardless of BPRT[3:0]
(windowed packages only). Refer to Table 4-6 and Table 4-7.
When cleared, BPRT[3:0] allow programming and erasure of the
associated block.
Table 4-6. EEPROM Block Protect
Bit NameBlock ProtectedBlock Size
BPRT0$B600–$B61F32 bytes
BPRT1$B620–$B65F64 bytes
BPRT2$B660–$B6DF128 bytes
BPRT3$B6E0–$B 7FF288 by t es
Table 4-7. EEPROM Block Protect in MC68HC811E2 MCUs
Bit NameBlock ProtectedBlock Size
BPRT0
BPRT1
BPRT2
BPRT3
1. x is determined by the value of EE[3 :0] in CONFIG register. Refer to
Figure 4-13.
$x800–$x9FF
$xA00–$xBFF
$xC00–$xDFF
$xE00–$xFFF
(1)
(1)
(1)
(1)
512 bytes
512 bytes
512 bytes
512 bytes
Technical DataMC68HC11E Family — Rev. 4
100Operating Modes and On-Chip MemoryMOTOROLA
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.