The M68HC11 K-series microcontroller units (MCUs) are high-performance derivatives of the
MC68HC11F1 and have several additional features. The MC68HC11K0, MC68HC11K1,
MC68HC11K3, MC68HC11K4 and MC68HC711K4 comprise the series. These MCUs, with a nonmultiplexed expanded bus, are characterized by high speed and low power consumption. Their fully static
design allows operation at frequencies from 4 MHz to dc.
This document contains information concerning standard, custom-ROM, and extended-voltage devices. Standard devices include those with disabled ROM (MC68HC11K1), disabled EEPROM
(MC68HC11K3), disabled ROM and EEPROM (MC68HC11K0), or EPROM replacing ROM
(MC68HC711K4). Custom-ROM devices have a ROM array that is programmed at the factory to customer specifications. Extended-voltage devices are guaranteed to operate over a much greater voltage
range (3.0 Vdc to 5.5 Vdc) at lower frequencies than the standard devices. Refer to the device ordering
information tables for details concerning these differences.
1 Features
• M68HC11 CPU
• Power Saving STOP and WAIT Modes
• 768 Bytes RAM (All Saved During Standby)
• 24 Kbytes ROM or EPROM
• 640 Bytes Electrically Erasable Programmable Read Only Memory (EEPROM)
• On-Chip Memory Mapping Logic Allows Expansion to Over 1 Mbyte of Address Space
• PROG Mode Allows Use of Standard EPROM Programmer (27C256 Footprint)
• Nonmultiplexed Address and Data Buses
• Four Programmable Chip Selects with Clock Stretching (Expanded Modes)
• Enhanced 16-Bit Timer with Four-Stage Programmable Prescaler
— Three Input Capture (IC) Channels
— Four Output Compare (OC) Channels
— One Additional Channel, Selectable as Fourth IC or Fifth OC
• 8-Bit Pulse Accumulator
• Four 8-Bit or Two 16-Bit Pulse Width Modulation (PWM) Timer Channels
• Real-Time Interrupt Circuit
• Computer Operating Properly (COP) Watchdog
• Clock Monitor
• Enhanced Asynchronous Nonreturn to Zero (NRZ) Serial Communications Interface (SCI)
• Enhanced Synchronous Serial Peripheral Interface (SPI)
DDRAData Direction Register for Port A $0001 42
DDRBData Direction Register for Port B$0002 43
DDRFData Direction Register for Port F $0003 46
DDRGData Direction Register for Port G$007F 47
DDRHData Direction Register for Port H$007D 46
The M68HC11 K-series MCUs have four modes of operation that directly affect the address space.
These modes are described as follows.
2.1 Single-Chip Operating Mode
In single-chip operating mode, the M68HC11 K-series MCUs are stand-alone microcontrollers with no
external address or data bus. Addressing range is 64 Kbytes and is limited to on-chip resources. Refer
to the memory map diagram.
2.2 Expanded Operating Mode
In expanded operating mode, the MCU has a 64 Kbyte address range and, using the expansion bus,
can access external resources within the 64 Kbyte space. This space includes the same on-chip memory addresses used for single-chip mode, in addition to addressing capabilities for external peripheral
and memory devices. Addressing beyond 64 Kbytes is available only in expanded mode using the onchip, register-based memory mapping logic. The additional address lines for memory expansion
(XA[18:13]) are implemented as alternate functions of port G. The expansion bus (external address and
data buses) is made up of ports B, C, and F, and the R/W
order address bits are output on the port B pins, low order address bits on the port F pins, and the data
bus on port C. Refer to the memory map diagram.
2.3 Bootstrap Mode
Bootstrap mode allows special-purpose programs to be loaded into internal RAM. The MCU contains
448 bytes of bootstrap ROM which is enabled and present in the memory map only when the device is
in bootstrap mode. The bootstrap ROM contains a program which initializes the SCI and allows the user
to download up to 768 bytes of code into on-chip RAM. After a four-character delay, or after receiving
the character for address $037F, control passes to the loaded program at $0080. Refer to the memory
map diagram. Refer also to Application Note
M68HC11 Bootstrap Mode
signal. In expanded operating mode, high
(AN1060/D).
2.4 Special Test Mode
Special test mode is used primarily for factory testing. In this operating mode, ROM/EPROM is removed
from the address space and interrupt vectors are accessed externally at $BFC0–$BFFF.
2.5 Mode Selection
Operating modes are selected by a combination of logic levels applied to two input pins (MODA and
MODB) during reset. The logic level present (at the rising edge of reset) on these inputs is reflected in
bits in the HPRIO register. After reset, the operating mode may be changed according to the table contained in the description of the HPRIO register.
The functions of two features that are enabled by bits in OPT2 register are dependent upon the operating mode. LIR driven is enabled with the LIRDV bit. Internal read visibility/not E is enabled with the
IRVNE bit. Refer to the OPT2 register description that follows HPRIO.
HPRIO —Highest Priority I-Bit Interrupt and Miscellaneous $003C
Bit 7654321Bit 0
RBOOT* SMOD*MDA*PSEL4PSEL3PSEL2 PSEL1 PSEL0
RESET:0 0 000110Single Chip
00100110Expanded
11000110Bootstrap
01100110Special Test
*The reset values of RBOOT, SMOD, and MDA depend on the mode selected at power up.
M68HC11 K Series MOTOROLA
MC68HC11KTS/D11
RBOOT — Read Bootstrap ROM/EPROM
Valid only when SMOD is set (bootstrap or special test mode). Can only be written in special modes.
0 = Bootstrap ROM disabled and not in map
1 = Bootstrap ROM enabled and in map at $BE00–$BFFF
SMOD and MDA —Special Mode Select and Mode Select A
These two bits can be read at any time. They can be written anytime in special modes. MDA can only
be written once in normal modes. SMOD cannot be set once it has been cleared.
*Can be written only once in normal modes. Can be written anytime in special modes.
LIRDV —LIR Driven
In single-chip and bootstrap modes, this bit has no meaning or effect. The LIR pin is normally configured
for wired-OR operation (only pulls low). In order to detect consecutive instructions in a high-speed application, this signal can be made to drive high for a short time to prevent false triggering.
0 = LIR not driven high out of reset
1 = LIR driven high for one quarter cycle to reduce transition time
CWOM —Port C Wired-OR Mode
Refer to 6 Parallel Input/Output.
Bit 5 —Not implemented
Always read zero
IRVNE —Internal Read Visibility/Not E
IRVNE can be written only once in normal modes (SMOD = 0). In special modes IRVNE can be written
any time. In special test mode, IRVNE is reset to one. In all other modes, IRVNE is reset to zero.
In expanded modes this bit determines whether IRV is on or off.
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.
0 = E is driven out from the chip.
1 = E pin is driven low. Refer to the following table.
ModeIRVNE Out
of Reset
Single Chip 0OnOffEOnce
Expanded0OnOffIRVOnce
Boot0OnOffEAnytime
Special Test1OnOnIRVAnytime
E Clock Out
of Reset
IRV Out of
Reset
IRVNE
Affects Only
IRVNE Can
Be Written
MOTOROLAM68HC11 K Series
12MC68HC11KTS/D
LSBF —LSB First Enable
Refer to 8 Serial Peripheral Interface.
SPR2 —SPI Clock Rate Select
Refer to 8 Serial Peripheral Interface.
XDV[1:0] —XOUT Clock Divide Select
Controls the frequency of the clock driven out of the XOUT pin
In general, K-series MCUs have 768 bytes RAM, 640 bytes EEPROM, and 24 Kbytes ROM/EPROM.
Some devices in the series have portions of their memory resources disabled. Some have ROM and
some have EPROM replacing ROM. The following paragraphs describe the memory systems of devices
in the series.
3.1 Memory Map and Register Block
The INIT, INIT2, and CONFIG registers control the presence and location of the registers, RAM, EEPROM, and ROM/EPROM in the 64 Kbyte CPU address space. The 128-byte register block originates
at $0000 after reset and can be placed at any 4 Kbyte boundary ($x000) after reset by writing an appropriate value to the INIT register. Refer to Figure 4.
$0000
EXT
$1000
EXT
$A000
$FFFF
SINGLE
CHIP
NOTE: ROM/EPROM can be enabled in special test mode by setting ROMON bit in the config register after reset.
EXPANDED
BOOTSTRAP
EXT
EXT
SPECIAL
TEST
128-BYTE REGISTER BLOCK
x000
(CAN BE REMAPPED TO ANY
x07F
4K PAGE BY THE INIT REGISTER)
x080
768 BYTES RAM
(CAN BE REMAPPED TO ANY
4K PAGE BY THE INIT REGISTER)
x37F
xD00
RESERVED (SPECIAL TEST MODE ONLY)
xD7F
640 BYTES EEPROM
xD80
(CAN BE REMAPPED TO ANY
4K PAGE BY THE INIT2 REGISTER)
xFFF
A000
24 KBYTES ROM/EPROM
(CAN BE REMAPPED TO $2000–$7FFF OR
$A000–$FFFF BY THE CONFIG REGISTER)
FFFF
BOOT ROM
BE00
(ONLY PRESENT IN
BOOTSTRAP MODE)
SPECIAL MODE
BFC0
INTERRUPT
BFFF
VECTORS
FFC0
NORMAL MODE
INTERRUPT
FFFF
VECTORS
Figure 4 Memory Map
MOTOROLAM68HC11 K Series
14MC6HC11KTS/D
INIT = $00
INIT = $10
INIT = $04
REG @ $0000
RAM @ $0080
$0000
REGISTER
BLOCK
$007F
$0080
RAM
B
$02FF
$0300
RAM
A
$037F
REG @ $0000
RAM @ $1000
$0000
REGISTER
BLOCK
$007F
$1000
RAM
A
$107F
$1080
RAM
B
$12FF
Figure 5 RAM and Register Mapping
REG @ $4000
RAM @ $0000
$0000
RAM
A
$007F
$0080
RAM
B
$02FF
$4000
REGISTER
BLOCK
$407F
Table 4 M68HC11 K Series Register and Control Bit Assignments
to
$007BReserved
$007CPH7PH6PH5PH4PH3PH2PH1PH0PORTH
$007DDDH7DDH6DDH5DDH4DDH3DDH2DDH1DDH0DDRH
$007EPG7PG6PG5PG4PG3PG2PG1PG0PORTG
$007FDDG7DDG6DDG5DDG4DDG3DDG2DDG1DDG0DDRG
*MC68HC711K4 only.
3.2 RAM
All members of the M68HC11 K series have 768 bytes of static RAM. The RAM can be mapped to any
4-Kbyte boundary. Upon reset, the RAM is mapped at $0080–$037F. The registers are also mapped to
this 4-Kbyte boundary. In previous versions of the M68HC11 devices the register block being mapped
to the same boundary would cause the portion of RAM overlapped by the register block to be lost. However, a new RAM remapping feature has been added which automatically allows all of the RAM to be
accessible even if the register block overlaps the RAM. Because the registers are located in the same
M68HC11 K Series MOTOROLA
MC6HC11KTS/D17
4-Kbyte boundary after reset, 128 bytes of the RAM are located at $0300 to $037F. Remapping is accomplished by writing appropriate values to the INIT register. Refer to the register and RAM mapping
examples following the memory map diagram.
When power is removed from the MCU, RAM contents may be preserved using the MODB/V
A power source (2.0 Vdc –V
) applied to this pin protects all 768 bytes of RAM.
DD
INIT — RAM and Register Mapping $003D
Bit 7654321Bit 0
RAM3RAM2RAM1RAM0REG3REG2REG1REG0
RESET:0000000 0
Can be written only once in first 64 cycles out of reset in normal modes or at any time in special mode.
RAM[3:0] —Internal RAM Map Position
These bits determine the upper four bits of the RAM address. At reset RAM is mapped to $0000. Normally the RAM would be mapped at $0000–$02FF (768 bytes). However, the register block overlaps
the first 128 bytes of RAM, causing them to be remapped to $0300–$037F. Refer to Figure 4 and Fig-ure 5.
REG[3:0] —128-Byte Register Block Map Position
These bits determine the upper four bits of the register block starting address. At reset registers are
mapped to $0000 and overlap the first 128 bytes of RAM, causing them to be remapped to $0300–
$037F. Refer to Figure 4 and Figure 5.
3.3 ROM/EPROM
Standard devices have 24 kbytes of EPROM (OTPROM in a non-windowed package). Custom ROM
devices have a 24-Kbyte ROM array that is mask programmed at the factory to customer specifications.
The MC68HC11K0, MC68HC11K1, MC68L11K0, and MC68L11K1 have no ROM/EPROM. Refer to
the ordering information tables.
STBY
pin.
The ROMAD and ROMON control bits in the CONFIG register control the position and presence of
ROM/EPROM in the memory map. The ROM/EPROM can be mapped at $2000–$7FFF or $A000–
$FFFF. If it is mapped to $A000–$FFFF, vector space is included. In single-chip mode the ROM/
EPROM is forced to $A000–$FFFF (ROMAD = 1) and enabled (ROMON = 1), regardless of the value
in the CONFIG register. This ensures that there will be ROM/EPROM at the vector space. In special
test mode, the ROMON bit is forced to zero so that the ROM/EPROM is removed from the memory map.
Refer to Figure 4.
Programming EPROM requires an external 12.25 volt nominal power supply (V
plied to the XIRQ
/V
pin. Three methods are used to program and verify EPROM/OTPROM.
PPE
) that must be ap-
PPE
Normal EPROM/OTPROM programming can be accomplished in any operating mode. Normal programming is accomplished using the EPROM/OTPROM programming register (EPROG). The EPROG
register enables the EPROM programming voltage, controls the latching of data to be programmed, and
selects single- or multiple-byte programming.
To program the EPROM, complete the following steps using the EPROG register:
1. Set the ELAT bit in EPROG register. EELAT bit in PPROG must be cleared as it negates the
function of the ELAT bit.
2. Write data to the desired address.
3. Turn on programming voltage to the EPROM array by setting the EPGM bit in EPROG register.
4. Delay for 2 ms or more, as appropriate.
5. Clear the EPGM bit in EPROG to turn off the programming voltage.
MOTOROLAM68HC11 K Series
18MC6HC11KTS/D
6. Clear the EPROG register to reconfigure the EPROM address and data buses for normal operation.
In EPROM emulation mode (PROG mode), the EPROM/OTPROM is programmed as a stand-alone
EPROM by adapting the MCU footprint to the 27C256-type EPROM and using an appropriate EPROM
programmer. To put the MCU in PROG mode, pull the following pins low: MODA/LIR, MODB/V
RESET
, PA[2:0]. Refer to Figure 6.
STBY
In the third method, the EPROM is programmed by software while in the special test or bootstrap
modes. User-developed software can be uploaded through the SCI, or a ROM resident EPROM programming utility can be used. To use the resident utility, bootload a three-byte program consisting of a
single jump instruction to $BF00. $BF00 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 programming
data from an external host and programs it into 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 = $A000).
When the utility program is ready to receive programming 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.
,
Although the external 12.25 V programming voltage must be applied to the XIRQ/V
EPROM programming, it should be equal to V
should equal V
during normal operation also. The XIRQ/V
DD
before verifying the data that was just programmed. It
DD
pin has a high voltage detect circuit
PPE
pin during
PPE
that inhibits assertion of the ELAT bit when programming voltage is at low levels.
CAUTION
If the MCU is used in any operating mode while high voltage (12.25 V nominal) is
present on the XIRQ
/V
pin, the IRQ/CE pin must be pulled high to avoid acci-
PPE
dental programming or corruption of EPROM contents. After programming an
EPROM location, IRQ
pin must also be pulled high before the address and data
are changed to program the next location.
EPROG — EPROM Programming Control $002B
Bit 7654321Bit 0
MBE—ELATEXCOLEXROW——EPGM
RESET:0000000 0
MBE —Multiple-Byte Programming Enable
0 = EPROM array configured for normal programming
1 = Program two bytes with the same data
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 programmed. MBE can be read in any mode and always
reads zero in normal modes. MBE can only be written in special modes.
Bit 6 —Not implemented
Always reads zero
ELAT —EPROM Latch Control
ELAT can be read any time. ELAT can be written any time except when EPGM = 1, then the write to
ELAT will be disabled. When ELAT = 1, writes to EPROM cause address and data to be latched and
the EPROM cannot be read.
0 = EPROM address and data bus configured for normal reads
1 = EPROM address and data bus configured for programming
M68HC11 K Series MOTOROLA
MC6HC11KTS/D19
EXCOL —Select Extra Columns
0 = User array selected
1 = User array is disabled and extra columns are accessed at bits [7:0]. Addresses use bits [11:5]
and bits [4:0] are don't care. EXCOL can only be read in special modes and always returns zero
in normal modes. EXCOL can be written in special modes only.
EXROW —Select Extra Rows
0 = User array selected
1 = User array is disabled and two extra rows are available. Addresses use bits [5:0] and bits [11:6]
are don't care. EXROW can only be read in special modes and always returns zero in normal
modes. EXROW can be written in special modes only.
Bits [2:1] —Not implemented
Always read zero
EPGM —EPROM Programming Voltage Enable
EPGM can be read any time and can only be written when ELAT = 1.
0 = Programming voltage to EPROM array disconnected
2. Unused Inputs – these pins may be left unterminated.
3. Unused Outputs – these pins should be left unconnected.
4. Grounding these six pins configures the MC68HC711K4 for EPROM emulation mode.
Figure 6 Pin Assignments of the MC68HC711K4 MCU in PROG Mode
M68HC11 K Series MOTOROLA
MC6HC11KTS/D21
3.4 EEPROM
The 640-byte EEPROM is initially located at $0D80 after reset, assuming EEPROM is enabled in the
memory map by the EEON bit in the CONFIG register. EEPROM can be placed at any 4-Kbyte boundary ($xD80) by writing appropriate values to the INIT2 register. Note that EEPROM can be mapped so
that it contains the vector space. Refer to Figure 4. The MC68HC11K0, MC68HC11K3, MC68L11K0,
and MC68L11K3 have no EEPROM. Refer to the ordering information tables.
Programming and erasing the EEPROM is controlled by the PPROG register, and dependent upon the
block protect (BPROT) register value. An on-chip charge pump develops the high voltage required for
programming and erasing. When the frequency of the E clock is less than 1 MHz, select the internal
clock source to drive the EEPROM charge pump by writing one to the CSEL bit in the OPTION register.
The CONFIG register consists of a single EEPROM byte. Although the byte is not included in the 640byte EEPROM array, programming the CONFIG register requires the same procedure as any byte in
the array. The erased state of bits in the CONFIG register is logic one. Refer to the CONFIG register
description that follows this section.
The erased state of an EEPROM byte is $FF (all ones).
To erase the EEPROM, ensure that the proper bits of the BPROT register are cleared, then complete
the following steps using the PPROG register:
1. Set the ERASE, EELAT, and appropriate BYTE and ROW bits in PPROG register.
2. Write to the appropriate EEPROM address with any data. Row erase only requires a write to
any location in the row. Bulk erase is done by writing to any location in the array.
3. Set the ERASE, EELAT, EEPGM, and appropriate BYTE and ROW bits in PPROG register.
4. Delay for 10 ms or more, as appropriate.
5. Clear the EEPGM bit in PPROG to turn off the programming voltage.
6. Clear the PPROG register to reconfigure the EEPROM address and data buses for normal operation.
To program the EEPROM, ensure the proper bits of the BPROT register are cleared and use the
PPROG register to complete the following steps:
1. Set the EELAT bit in PPROG register.
2. Write data to the desired address.
3. Set EEPGM bit in PPROG.
4. Delay for 10 ms or more, as appropriate.
5. Clear the EEPGM bit in PPROG to turn off the programming voltage.
6. Clear the PPROG register to reconfigure the EEPROM address and data buses for normal operation.
CAUTION
Since it is possible to perform other operations while the EEPROM programming/
erase operation is in progress, it is common to start the operation and then return
to the main program until the 10 ms is completed. When the EELAT bit is set at the
beginning of a program/erase operation, the EEPROM is electronically removed
from the memory map; thus, it is not accessible during the program/erase cycle.
Care must be taken to ensure that EEPROM resources will not be needed by any
routines in the code during the 10 ms program/erase time.
PPROG —EEPROM Programming Control $003B
Bit 7654321Bit 0
ODDEVENLVPIBYTEROWERASEEELATEEPGM
RESET:0000000 0
MOTOROLAM68HC11 K Series
22MC6HC11KTS/D
ODD —Program Odd Rows in Half of EEPROM (TEST)
EVEN —Program Even Rows in Half of EEPROM (TEST)
LVPI —Low Voltage Programming Inhibit
LVPI can be read at any time and writes to LVPI have no meaning nor effect. LVPI is set if LVPEN bit
in BPROT register equals one and the LVPI circuit detects that VDD has fallen below a safe operating
voltage. Once set, LVPI is cleared when V
returns to a safe operating voltage or if LVPEN bit in
DD
BPROT register is cleared. If LVPEN equals zero, then LVPI is always zero and has no meaning nor
effect.
0 = EEPROM address and data bus configured for normal reads
1 = EEPROM address and data bus configured for programming or erasing
EEPGM —EEPROM Program Command
0 = Program or erase voltage switched off to EEPROM array
1 = Program or erase voltage switched on to EEPROM array
BPROT — Block Protect$0035
Bit 7654321Bit 0
BULKPLVPENBPRT4PTCONBPRT3BPRT2BPRT1BPRT0
RESET:1111111 1
NOTE
Block protect register bits can be written to zero (protection disabled) only once
within 64 cycles of a reset in normal modes, or at any time in special modes. Block
protect register bits can be written to one (protection enabled) at any time.
BULKP —Bulk Erase of EEPROM Protect
0 = EEPROM can be bulk erased normally
1 = EEPROM cannot be bulk or row erased
M68HC11 K Series MOTOROLA
MC6HC11KTS/D23
LVPEN —Low Voltage Programming Protect Enable
If LVPEN = 1, programming of the EEPROM is enabled unless the LVPI circuit detects that VDD has
fallen below a safe operating voltage, thus setting the low voltage programming inhibit bit in PPROG
register (LVPI = 1).
0 = Low voltage programming protect for EEPROM disabled
1 = Low voltage programming protect for EEPROM enabled
BPRT4 —Block Protect Bit for Upper 128 Bytes of EEPROM
Refer to description for BPRT[3:0].
PTCON —Protect for CONFIG
0 = CONFIG register can be programmed or erased normally
1 = CONFIG register cannot be programmed or erased
INIT2 can be written only once in normal modes, any time in special modes.
EE[3:0] —EEPROM Map Position
EEPROM is at $xD80–$xFFF, where x is the hexadecimal digit represented by EE[3:0].
Bits [3:0] —Not implemented
Always read zero
3.5 Configuration Control Register (CONFIG)
The CONFIG register is used to define several system functions. Although the CONFIG register is an
address within the register block, it is actually an EEPROM byte with the address of $x03F. CONFIG is
made up of EEPROM cells and static latches. The operation of the MCU is controlled directly by these
latches and not the actual EEPROM byte. When programming the CONFIG register, the EEPROM byte
is being accessed. When the CONFIG register is being read, the static latches are being accessed.
The CONFIG register can be read at any time. The value read is the one latched from the EEPROM
cells during the last reset sequence. A new value programmed into this register cannot be read until a
subsequent reset occurs. Unused bits always read as ones.
In normal modes (SMOD = 0), CONFIG bits can only be written using the EEPROM programming sequence, and are neither readable nor active until latched via the next reset. In special modes (SMOD =
1), CONFIG bits can be written at any time.
MOTOROLAM68HC11 K Series
24MC6HC11KTS/D
Loading...
+ 56 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.