Text preview for : e_series.pdf part of PIONEER KEH-1850 KEH-1800 KEH-1800 X1M/UC KEH-1850 X1M/UC XM/ES X1M/ES ETC... ORDER NO. CRT2266



Back to : Pioneer Keh 1800 Keh 1850 | Home

M68HC11 E SERIES
HCMOS MICROCONTROLLER UNIT

Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "Typical" parameters can and do vary in different applications. All operating parameters, including "Typicals" must be validated for each customer application by customer's technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. MOTOROLA and the Motorola logo are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.

© MOTOROLA, INC., 1993, 1996

TABLE OF CONTENTS Paragraph Title
SECTION 1 INTRODUCTION 1.1 1.2 Features .................................................................................................... 1-1 Structure .................................................................................................... 1-2 SECTION 2 PIN DESCRIPTIONS 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.11.1 2.11.2 2.11.3 2.11.4 2.11.5 VDD and VSS .............................................................................................. 2-5 RESET ...................................................................................................... 2-5 Crystal Driver and External Clock Input (XTAL, EXTAL) ........................... 2-6 E-Clock Output (E) .................................................................................... 2-8 Interrupt Request (IRQ) ............................................................................. 2-8 Non-Maskable Interrupt (XIRQ/VPPE) ....................................................... 2-8 MODA and MODB (MODA/LIR and MODB/VSTBY) .................................. 2-9 VRL and VRH .............................................................................................. 2-9 STRA/AS ................................................................................................... 2-9 STRB/R/W ................................................................................................. 2-9 Port Signals ............................................................................................. 2-10 Port A .............................................................................................. 2-11 Port B .............................................................................................. 2-11 Port C .............................................................................................. 2-12 Port D .............................................................................................. 2-12 Port E .............................................................................................. 2-12 SECTION 3 CENTRAL PROCESSING UNIT 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.6.1 3.1.6.2 3.1.6.3 3.1.6.4 3.1.6.5 3.1.6.6 3.1.6.7 3.1.6.8 3.2 3.3 3.4 CPU Registers ........................................................................................... 3-1 Accumulators A, B, and D ................................................................. 3-2 Index Register X (IX) ......................................................................... 3-2 Index Register Y (IY) ......................................................................... 3-2 Stack Pointer (SP) ............................................................................. 3-2 Program Counter (PC) ...................................................................... 3-4 Condition Code Register (CCR) ........................................................ 3-4 Carry/Borrow (C) ....................................................................... 3-4 Overflow (V) .............................................................................. 3-5 Zero (Z) ..................................................................................... 3-5 Negative (N) .............................................................................. 3-5 Interrupt Mask (I) ....................................................................... 3-5 Half Carry (H) ............................................................................ 3-5 X Interrupt Mask (X) .................................................................. 3-5 Stop Disable (S) ........................................................................ 3-6 Data Types ................................................................................................ 3-6 Opcodes and Operands ............................................................................ 3-6 Addressing Modes ..................................................................................... 3-6
MOTOROLA iii

Page

M68HC11 E SERIES TECHNICAL DATA

TABLE OF CONTENTS
Paragraph 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.5 (Continued) Title Page

Immediate .......................................................................................... 3-6 Direct ................................................................................................. 3-7 Extended ........................................................................................... 3-7 Indexed .............................................................................................. 3-7 Inherent ............................................................................................. 3-7 Relative ............................................................................................. 3-7 Instruction Set ........................................................................................... 3-7 SECTION 4 OPERATING MODES AND ON-CHIP MEMORY

4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.2 4.2.1 4.2.2 4.2.2.1 4.2.2.2 4.2.2.3 4.3 4.3.1 4.3.2 4.3.3 4.4 4.4.1 4.4.1.1 4.4.1.2 4.4.1.3 4.4.1.4 4.4.1.5 4.4.1.6 4.4.2

Operating Modes ....................................................................................... 4-1 Single-Chip Mode .............................................................................. 4-1 Expanded Mode ................................................................................ 4-1 Test Mode ......................................................................................... 4-2 Bootstrap Mode ................................................................................. 4-2 Memory Map ............................................................................................. 4-3 Mode Selection .................................................................................. 4-9 System Initialization ......................................................................... 4-11 CONFIG Register .................................................................... 4-12 INIT Register ........................................................................... 4-14 OPTION Register .................................................................... 4-15 EPROM/OTPROM .................................................................................. 4-16 Programming an Individual EPROM Address ................................. 4-16 Programming EPROM with Downloaded Data ................................ 4-17 EPROM Programming Control Register .......................................... 4-17 EEPROM ................................................................................................. 4-20 EEPROM Programming .................................................................. 4-20 BPROT Register ..................................................................... 4-20 PPROG Register ..................................................................... 4-21 EEPROM Bulk Erase .............................................................. 4-23 EEPROM Row Erase .............................................................. 4-23 EEPROM Byte Erase .............................................................. 4-23 CONFIG Register Programming ............................................. 4-23 EEPROM Security ........................................................................... 4-24 SECTION 5 RESETS AND INTERRUPTS

5.1 5.1.1 5.1.2 5.1.3 5.1.4

Resets ....................................................................................................... 5-1 Power-On Reset ................................................................................ 5-1 External Reset (RESET) ................................................................... 5-1 COP Reset ........................................................................................ 5-1 Clock Monitor Reset .......................................................................... 5-2
M68HC11 E SERIES TECHNICAL DATA

MOTOROLA iv

TABLE OF CONTENTS
Paragraph 5.1.5 5.1.6 5.2 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.2.10 5.3 5.3.1 5.4 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 5.4.6 5.5 5.5.1 5.5.2 (Continued) Title Page

Option Register ................................................................................. 5-3 CONFIG Register .............................................................................. 5-4 Effects of Reset ......................................................................................... 5-4 Central Processing Unit ..................................................................... 5-4 Memory Map ..................................................................................... 5-5 Timer ................................................................................................. 5-5 Real-Time Interrupt (RTI) .................................................................. 5-5 Pulse Accumulator ............................................................................ 5-5 Computer Operating Properly (COP) ................................................ 5-5 Serial Communications Interface (SCI) ............................................. 5-5 Serial Peripheral Interface (SPI) ........................................................ 5-6 Analog-to-Digital Converter ............................................................... 5-6 System .............................................................................................. 5-6 Reset and Interrupt Priority ....................................................................... 5-6 Highest Priority Interrupt and Miscellaneous Register ...................... 5-7 Interrupts ................................................................................................... 5-8 Interrupt Recognition and Register Stacking ..................................... 5-9 Non-Maskable Interrupt Request (XIRQ) ........................................ 5-10 Illegal Opcode Trap ......................................................................... 5-10 Software Interrupt ............................................................................ 5-11 Maskable Interrupts ......................................................................... 5-11 Reset and Interrupt Processing ....................................................... 5-11 Low Power Operation .............................................................................. 5-16 WAIT ............................................................................................... 5-16 STOP ............................................................................................... 5-17 SECTION 6 PARALLEL INPUT/OUTPUT

6.1 6.2 6.3 6.4 6.5 6.6 6.7

Port A ........................................................................................................ 6-1 Port B ........................................................................................................ 6-2 Port C ........................................................................................................ 6-2 Port D ........................................................................................................ 6-3 Port E ........................................................................................................ 6-4 Handshake Protocol .................................................................................. 6-4 Parallel I/O Control Register ...................................................................... 6-5 SECTION 7 SERIAL COMMUNICATIONS INTERFACE

7.1 7.2 7.3 7.4

Data Format .............................................................................................. 7-1 Transmit Operation .................................................................................... 7-1 Receive Operation ..................................................................................... 7-3 Wakeup Feature ........................................................................................ 7-5
MOTOROLA v

M68HC11 E SERIES TECHNICAL DATA

TABLE OF CONTENTS
Paragraph 7.4.1 7.4.2 7.5 7.6 7.6.1 7.6.2 7.6.3 7.6.4 7.6.5 7.7 7.7.1 (Continued) Title Page

Idle-Line Wakeup .............................................................................. 7-5 Address-Mark Wakeup ...................................................................... 7-5 SCI Error Detection ................................................................................... 7-6 SCI Registers ............................................................................................ 7-6 Serial Communications Data Register .............................................. 7-6 Serial Communications Control Register 1 ....................................... 7-6 Serial Communications Control Register 2 ....................................... 7-7 Serial Communication Status Register .............................................. 7-8 Baud Rate Register ........................................................................... 7-9 Status Flags and Interrupts ..................................................................... 7-12 Receiver Flags ................................................................................ 7-13 SECTION 8 SERIAL PERIPHERAL INTERFACE

8.1 8.2 8.2.1 8.3 8.3.1 8.3.2 8.3.3 8.3.4 8.4 8.5 8.5.1 8.5.2 8.5.3

Functional Description ............................................................................... 8-1 SPI Transfer Formats ................................................................................ 8-2 Clock Phase and Polarity Controls .................................................... 8-3 SPI Signals ................................................................................................ 8-3 Master In Slave Out ........................................................................... 8-4 Master Out Slave In ........................................................................... 8-4 Serial Clock ....................................................................................... 8-4 Slave Select ...................................................................................... 8-4 SPI System Errors ..................................................................................... 8-5 SPI Registers ............................................................................................ 8-5 Serial Peripheral Control ................................................................... 8-6 Serial Peripheral Status ..................................................................... 8-7 Serial Peripheral Data I/O Register ................................................... 8-7 SECTION 9 TIMING SYSTEM

9.1 9.2 9.2.1 9.2.2 9.2.3 9.3 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.3.6

Timer Structure .......................................................................................... 9-3 Input Capture ............................................................................................. 9-4 Timer Control Register 2 ................................................................... 9-5 Timer Input Capture Registers .......................................................... 9-6 Timer Input Capture 4/Output Compare 5 Register .......................... 9-6 Output Compare ........................................................................................ 9-7 Timer Output Compare Registers ..................................................... 9-7 Timer Compare Force Register ......................................................... 9-8 Output Compare Mask Register ........................................................ 9-9 Output Compare Data Register ......................................................... 9-9 Timer Counter Register ..................................................................... 9-9 Timer Control Register 1 ................................................................. 9-10
M68HC11 E SERIES TECHNICAL DATA

MOTOROLA vi

TABLE OF CONTENTS
Paragraph (Continued) Title Page

9.3.7 Timer Interrupt Mask Register 1 ...................................................... 9-10 9.3.8 Timer Interrupt Flag Register 1 ....................................................... 9-11 9.3.9 Timer Interrupt Mask Register 2 ...................................................... 9-11 9.3.10 Timer Interrupt Flag Register 2 ....................................................... 9-12 9.4 Real-Time Interrupt ................................................................................. 9-13 9.4.1 Timer Interrupt Mask Register 2 ...................................................... 9-13 9.4.2 Timer Interrupt Flag Register 2 ....................................................... 9-14 9.4.3 Pulse Accumulator Control Register ............................................... 9-14 9.5 Computer Operating Properly Watchdog Function ................................. 9-15 9.6 Pulse Accumulator .................................................................................. 9-15 9.6.1 Pulse Accumulator Control Register ............................................... 9-16 9.6.2 Pulse Accumulator Count Register ................................................. 9-17 9.6.3 Pulse Accumulator Status and Interrupt Bits ................................... 9-18 SECTION 10 ANALOG-TO-DIGITAL CONVERTER 10.1 10.1.1 10.1.2 10.1.3 10.1.4 10.1.5 10.1.6 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 Overview ................................................................................................. 10-1 Multiplexer ....................................................................................... 10-1 Analog Converter ............................................................................ 10-3 Digital Control .................................................................................. 10-3 Result Registers .............................................................................. 10-3 A/D Converter Clocks ...................................................................... 10-4 Conversion Sequence ..................................................................... 10-4 A/D Converter Power-Up and Clock Select ............................................. 10-4 Conversion Process ................................................................................ 10-5 Channel Assignments ............................................................................. 10-6 Single-Channel Operation ....................................................................... 10-6 Multiple-Channel Operation ..................................................................... 10-6 Operation in STOP and WAIT Modes ..................................................... 10-7 A/D Control/Status Registers .................................................................. 10-7 A/D Converter Result Registers .............................................................. 10-8 APPENDIX A ELECTRICAL CHARACTERISTICS APPENDIX B MECHANICAL DATA AND ORDERING INFORMATION B.1 B.2 Ordering Information ................................................................................ B-1 Obtaining M68HC11 E-Series Mechanical Information ............................ B-4 APPENDIX CDEVELOPMENT SUPPORT C.1 Motorola M68HC11 E-Series Development Tools ................................... C-1
MOTOROLA vii

M68HC11 E SERIES TECHNICAL DATA

TABLE OF CONTENTS
Paragraph C.2 C.3 C.4 (Continued) Title Page

EVS -- Evaluation System ....................................................................... C-1 Motorola Modular Development System (MMDS11) ................................ C-1 SPGMR11-- Serial Programmer for M68HC11 MCUs ............................ C-3 SUMMARY OF CHANGES

MOTOROLA viii

M68HC11 E SERIES TECHNICAL DATA

LIST OF ILLUSTRATIONS Figure
1-1 2-1 2-2 2-3 2-4 2-5 2-6 2-7 2-8 2-9 2-10 3-1 3-2 4-1 4-2 4-3 4-4 4-5 5-1 5-1 5-2 5-2 5-3 7-1 7-2 7-3 7-4 7-5 8-1 8-2 9-1 9-2 9-3 10-1 10-2 10-3 A-1 A-2 A-3 A-4 A-5 A-6

Title

Page

M68HC11 E-Series Block Diagram ................................................................ 1-2 Pin Assignments for 52-Pin PLCC and CLCC ................................................ 2-1 Pin Assignments for 64-Pin QFP .................................................................... 2-2 Pin Assignments for 52-Pin Thin QFP ............................................................ 2-3 Pin Assignments for 56-Pin SDIP ................................................................... 2-4 Pin Assignments for 48-Pin DIP (MC68HC811E2) ........................................ 2-5 External Reset Circuit ..................................................................................... 2-6 External Reset Circuit with Delay ................................................................... 2-6 Common Crystal Connections ........................................................................ 2-7 External Oscillator Connections ..................................................................... 2-7 One Crystal Driving Two MCUs ..................................................................... 2-8 Programming Model ....................................................................................... 3-1 Stacking Operations ....................................................................................... 3-3 Address/Data Demultiplexing ......................................................................... 4-2 Memory Map for MC68HC11E0, MC68HC11E1, MC68HC11E8, and MC68HC(7)11E9 ............................................................................................ 4-3 Memory Map for MC68HC(7)11E20 ............................................................... 4-4 Memory Map for MC68HC811E2 ................................................................... 4-5 RAM Standby MODB/VSTBY Connections .................................................... 4-9 Processing Flow out of Reset (1 of 2) .......................................................... 5-12 Processing Flow out of Reset (2 of 2) .......................................................... 5-13 Interrupt Priority Resolution (1 of 2) ............................................................. 5-14 Interrupt PriorityResolution (2 of 2) .............................................................. 5-15 Interrupt Source Resolution Within SCI ........................................................ 5-16 SCI Transmitter Block Diagram ...................................................................... 7-2 SCI Receiver Block Diagram .......................................................................... 7-4 SCI Baud Rate Generator Block Diagram .................................................... 7-11 MC68HC(7)11E20 SCI Baud Rate Generator Block Diagram ..................... 7-12 Interrupt Source Resolution Within SCI ........................................................ 7-14 SPI Block Diagram ......................................................................................... 8-2 SPI Transfer Format ....................................................................................... 8-3 Timer Clock Divider Chains ............................................................................ 9-2 Capture/Compare Block Diagram .................................................................. 9-4 Pulse Accumulator ....................................................................................... 9-16 A/D Converter Block Diagram ...................................................................... 10-2 Electrical Model of an A/D Input Pin (Sample Mode) ................................... 10-3 A/D Conversion Sequence ........................................................................... 10-4 Test Methods .................................................................................................. A-4 Timer Inputs ................................................................................................... A-6 POR External Reset Timing Diagram ............................................................. A-7 STOP Recovery Timing Diagram ................................................................... A-8 WAIT Recovery from Interrupt Timing Diagram ............................................. A-9 Interrupt Timing Diagram .............................................................................. A-10
MOTOROLA ix

M68HC11 E SERIES TECHNICAL DATA

LIST OF ILLUSTRATIONS
Figure A-7 A-8 A-9 A-10 A-11 A-12 A-13 A-14 A-15 A-15 (Continued) Title Page

Port Read Timing Diagram ........................................................................... A-12 Port Write Timing Diagram ........................................................................... A-13 Simple Input Strobe Timing Diagram ........................................................... A-13 Simple Output Strobe Timing Diagram ......................................................... A-13 Port C Input Handshake Timing Diagram ..................................................... A-14 Port C Output Handshake Timing Diagram .................................................. A-14 Three-State Variation of Output Handshake Timing Diagram (STRA Enables Output Buffer) ..................................................................... A-15 Multiplexed Expansion Bus Timing Diagram ................................................ A-20 SPI Timing Diagram (1 of 2) ......................................................................... A-23 SPI Timing Diagram (2 of 2) ......................................................................... A-24

MOTOROLA x

M68HC11 E SERIES TECHNICAL DATA

LIST OF TABLES Table
2-1 3-1 3-2 4-1 4-2 4-3 4-4 4-5 4-6 4-7 4-8 4-9 5-1 5-2 5-3 5-4 5-5 6-1 6-2 7-1 7-2 8-1 9-1 9-2 9-3 9-4 9-5 9-6 9-7 10-1 10-2 A-1 A-2 A-3 A-3a A-4 A-4a A-5 A-5a A-6 A-6a A-7 A-7a

Title

Page

Port Signal Functions .................................................................................... 2-10 Reset Vector Comparison ............................................................................... 3-4 Instruction Set ................................................................................................. 3-8 Register and Control Bit Assignments............................................................. 4-6 Hardware Mode Select Summary ................................................................. 4-10 Write Access Limited Registers..................................................................... 4-12 EEPROM Mapping ........................................................................................ 4-13 RAM Mapping................................................................................................ 4-15 Register Mapping .......................................................................................... 4-15 EEPROM Block Protect................................................................................. 4-21 EEPROM Block Protect (MC68HC811E2) .................................................... 4-21 EEPROM Erase ............................................................................................ 4-22 COP Timer Rate Select................................................................................... 5-2 Reset Cause, Reset Vector, and Operating Mode .......................................... 5-4 Highest Priority Interrupt Selection.................................................................. 5-8 Interrupt and Reset Vector Assignments......................................................... 5-9 Stacking Order on Entry to Interrupts............................................................ 5-10 Input/Output Ports ........................................................................................... 6-1 Parallel I/O Control .......................................................................................... 6-6 Baud Rate Prescaler Selects ........................................................................ 7-10 Baud Rate Selects......................................................................................... 7-10 SPI Clock Rates .............................................................................................. 8-7 Timer Summary............................................................................................... 9-3 Timer Control Configuration ............................................................................ 9-6 Timer Output Compare Actions..................................................................... 9-10 Timer Prescale .............................................................................................. 9-12 RTI Rates ...................................................................................................... 9-13 Pulse Accumulator Timing............................................................................. 9-16 Pulse Accumulator Edge Control .................................................................. 9-17 Converter Channel Assignments................................................................... 10-6 A/D Converter Channel Selection ................................................................. 10-8 Maximum Ratings............................................................................................ A-1 Thermal Characteristics .................................................................................. A-1 DC Electrical Characteristics........................................................................... A-2 DC Electrical Characteristics (MC68L11E9) .................................................. A-3 Control Timing ................................................................................................. A-5 Control Timing (MC68L11E9)......................................................................... A-5 Peripheral Port Timing................................................................................... A-11 Peripheral Port Timing (MC68L11E9) .......................................................... A-12 Analog-To-Digital Converter Characteristics ................................................. A-16 Analog-To-Digital Converter Characteristics (MC68L11E9)......................... A-17 Expansion Bus Timing................................................................................... A-18 Expansion Bus Timing (MC68L11E9) .......................................................... A-19
MOTOROLA xi

M68HC11 E SERIES TECHNICAL DATA

LIST OF TABLES
Table A-8 A-8a A-9 A-9a B-1 B-2 B-3 (Continued) Title Page

Serial Peripheral Interface Timing ................................................................. A-21 Serial Peripheral Interface Timing (MC68L11E9)......................................... A-22 EEPROM Characteristics .............................................................................. A-25 EEPROM Characteristics (MC68L11E9)...................................................... A-25 Standard Device Ordering Information............................................................ B-1 Custom ROM Device Ordering Information..................................................... B-3 Extended Voltage Device Ordering Information (3.0 Vdc to 5.5 Vdc) ............. B-4

MOTOROLA xii

M68HC11 E SERIES TECHNICAL DATA

SECTION 1 INTRODUCTION
This document contains a detailed description of the M68HC11 E series of 8-bit microcontroller units (MCUs). These MCUs all combine the M68HC11 CPU with high-performance, on-chip peripherals. The E series is comprised of many devices with various configurations of RAM, ROM or EPROM, and EEPROM. Several low-voltage devices are also available. 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 E-series devices to operate at frequencies from 3 MHz to dc, with very low power consumption. 1.1 Features · M68HC11 CPU · Power Saving STOP and WAIT Modes · Low-Voltage Devices Available (3.0 ­ 5.5 Vdc or 2.7 ­ 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 EEPROM with selectable base address in MC68HC811E2 · Asynchronous Nonreturn to Zero (NRZ) Serial Communications Interface (SCI) -- Additional Baud Rates Available on MC68HC(7)11E20 · Synchronous Serial Peripheral Interface (SPI) · 8-Channel 8-Bit Analog-to-Digital (A/D) Converter · 16-Bit Timer System -- Three Input Capture (IC) Channels -- Four Output Compare (OC) Channels -- One Additional Channel, Selectable as Fourth IC or Fifth OC · 8-Bit Pulse Accumulator · Real-Time Interrupt Circuit · Computer Operating Properly (COP) Watchdog System · 38 General-Purpose Input/Output (I/O) Pins -- 16 Bidirectional I/O Pins -- 11 Input-Only Pins -- 11 Output-Only Pins · Several Packaging Options -- 52-Pin Plastic Leaded Chip Carrier (PLCC) -- 52-Pin Windowed Ceramic Leaded Chip Carrier (CLCC) -- 52-Pin Plastic Thin Quad Flat Pack, 10 mm X 10 mm (TQFP) -- 64-Pin Plastic Quad Flat Pack (QFP) -- 48-Pin Plastic Dual In-Line Package (DIP), MC68HC811E2 only -- 56-Pin Plastic Dual In-Line Package, .070" Lead Spacing (SDIP)

1

M68HC11E SERIES TECHNICAL DATA

INTRODUCTION

MOTOROLA 1-1

1.2 Structure Below is the functional diagram of the E-series MCUs. Differences among devices are noted in the table.

MODA/ MODB/ LIR VSTBY

XTAL EXTAL

E

IRQ

XIRQ/VPPE* RESET

OSC MODE CONTROL CLOCK LOGIC PULSE ACCUMULATOR COP PAI OC2 OC3 OC4 OC5/IC4/OC1 IC1 IC2 PERIODIC INTERRUPT IC3

INTERRUPT LOGIC

ROM OR EPROM (SEE TABLE)

TIMER SYSTEM

M68HC11 CPU

EEPROM (SEE TABLE) RAM (SEE TABLE)

1

R/W AS

BUS EXPANSION ADDRESS

ADDRESS/DATA

SERIAL PERIPHERAL INTERFACE SPI

SERIAL COMMUNICATION INTERFACE SCI

VDD VSS

STRB STRA

SS SCK MOSI MISO

TxD RxD

STROBE AND HANDSHAKE PARALLEL I/O

VRH VRL A/D CONVERTER

CONTROL PORT A PORT B PORT C

CONTROL PORT D PORT E

PC7/ADDR7/DATA7 PC6/ADDR6/DATA6 PC5/ADDR5/DATA5 PC4/ADDR4/DATA4 PC3/ADDR3/DATA3 PC2/ADDR2/DATA2 PC1/ADDR1/DATA1 PC0/ADDR0/DATA0

PA7/PAI PA6/OC2/OC1 PA5/OC3/OC1 PA4/OC4/OC1 PA3/OC5/IC4/OC1 PA2/IC1 PA1/IC2 PA0/IC3

PB7/ADDR15 PB6/ADDR14 PB5/ADDR13 PB4/ADDR12 PB3/ADDR11 PB2/ADDR10 PB1/ADDR9 PB0/ADDR8

STRB/R/W STRA/AS

PD5/SS PD4/SCK PD3/MOSI PD2/MISO PD1/TxD PD0/RxD RAM 512 512 512 512 512 768 768 256 ROM -- -- 12K 12K -- 20K -- --

* VPPE APPLIES ONLY TO DEVICES WITH EPROM/OTPROM.

DEVICE MC68HC11E0 MC68HC11E1 MC68HC11E8 MC68HC11E9 MC68HC711E9 MC68HC11E20 MC68HC711E20 MC68HC811E2

Figure 1-1 M68HC11 E-Series Block Diagram

MOTOROLA 1-2

INTRODUCTION

PE7/AN7 PE6/AN6 PE5/AN5 PE4/AN4 PE3/AN3 PE2/AN2 PE1/AN1 PE0/AN0 EPROM -- -- -- -- 12K -- 20K -- EEPROM -- 512 -- 512 512 512 512 2048
E SERIES BLOCK

M68HC11E SERIES TECHNICAL DATA

SECTION 2 PIN DESCRIPTIONS
M68HC11 E-series MCUs are available packaged in 52-pin PLCC, 52-pin windowed CLCC, 64-pin QFP, 52-pin thin QFP, 56-pin SDIP, and 48-pin DIP (MC68HC811E2 only). Most pins on these MCUs serve two or more functions, as described in the following paragraphs. Refer to Figure 2-1, Figure 2-2, Figure 2-3, Figure 2-4, and Figure 2-5, which show the M68HC11 E-series pin assignments for the PLCC/CLCC, QFP, and DIP packages.

2 MODB/VSTBY

6 STRB/R/W

3 MODA/LIR

4 STRA/AS

50 PE7/AN7

49 PE3/AN3

48 PE6/AN6

52 VRH

51 VRL

47 PE2/AN2

7 EXTAL

5 E

VSS

XTAL PC0/ADDR0/DATA0 PC1/ADDR1/DATA1 PC2/ADDR2/DATA2 PC3/ADDR3/DATA3 PC4/ADDR4/DATA4 PC5/ADDR5/DATA5 PC6/ADDR6/DATA6 PC7/ADDR7/DATA7 RESET * XIRQ/VPPE IRQ PD0/RxD

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

46 45 44 43 42 41 40 39 38 37 36 35 34

PE5/AN5 PE1/AN1 PE4/AN4 PE0/AN0 PB0/ADDR8 PB1/ADDR9 PB2/ADDR10 PB3/ADDR11 PB4/ADDR12 PB5/ADDR13 PB6/ADDR14 PB7/ADDR15 PA0/IC3

2

M68HC11 E SERIES

27

1 28 29

30

31 PA3/OC5/IC4/OC1

32 PA2/IC1

PA6/OC2/OC1

PA5/OC3/OC1

PA4/OC4/OC1

PA7/PAI/OC1

PD1/TxD

PD2/MISO

PD3/MOSI

PD4/SCK

* VPPE APPLIES ONLY TO DEVICES WITH EPROM/OTPROM.
E SERIES 52-PIN PLCC

Figure 2-1 Pin Assignments for 52-Pin PLCC and CLCC

M68HC11 E SERIES TECHNICAL DATA

PIN DESCRIPTIONS

PA1/IC2

PD5/SS VDD

33

MOTOROLA 2-1

2

* VPPE APPLIES ONLY TO DEVICES WITH EPROM/OTPROM.
E SERIES 64-PIN QFP

Figure 2-2 Pin Assignments for 64-Pin QFP

MOTOROLA 2-2

PE2/AN2 PE6/AN6 PE3/AN3 PE7/AN7 VRL VRH VSS VSS MODB/VSTBY NC MODA/LIR STRA/AS E STRB/R/W EXTAL NC

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

PA0/IC3 NC NC NC PB7/ADDR15 PB6/ADDR14 PB5/ADDR13 PB4/ADDR12 PB3/ADDR11 PB2/ADDR10 PB1/ADDR9 PB0/ADDR8 PE0/AN0 PE4/AN4 PE1/AN1 PE5/AN5

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49

PA1/IC2 PA2/IC1 PA3/OC5/IC4/OC1 NC NC PA4/OC4/OC1 PA5/OC3/OC1 PA6/OC2/OC1 PA7/PAI/OC1 VDD PD5/SS PD4/SCK PD3/MOSI PD2/MISO PD1/TxD VSS

M68HC11 E SERIES

48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33

NC PD0/RxD IRQ XIRQ/VPPE* NC RESET PC7/ADDR7/DATA7 PC6/ADDR6/DATA6 PC5/ADDR5/DATA5 PC4/ADDR4/DATA4 PC3/ADDR3/DATA3 PC2/ADDR2/DATA2 PC1/ADDR1/DATA1 NC PC0/ADDR0/DATA0 XTAL

PIN DESCRIPTIONS

M68HC11 E SERIES TECHNICAL DATA

PA0/IC3 PB7/ADDR15 PB6/ADDR14 PB5/ADDR13 PB4/ADDR12 PB3/ADDR11 PB2/ADDR10 PB1/ADDR9 PB0/ADDR8 PE0/AN0 PE4/AN4 PE1/AN1 PE5/AN5

1 2 3 4 5 6 7 8 9 10 11 12 13

52 51 50 49 48 47 46 45 44 43 42 41 40

PA1/IC2 PA2/IC1 PA3/OC5/IC4/OC1 PA4/OC4/OC1 PA5/OC3/OC1 PA6/OC2/OC1 PA7/PAI/OC1 VDD PD5/SS PD4/SCK PD3/MOSI PD2/MISO PD1/TxD

M68HC11 E SERIES

39 38 37 36 35 34 33 32 31 30 29 28 27

14 15 16 17 18 19 20 21 22 23 24 25 26

PD0/RxD IRQ XIRQ/VPPE* RESET PC7/ADDR7/DATA7 PC6/ADDR6/DATA6 PC5/ADDR5/DATA5 PC4/ADDR4/DATA4 PC3/ADDR3/DATA3 PC2/ADDR2/DATA2 PC1/ADDR1/DATA1 PC0/ADDR0/DATA0 XTAL

* VPPE APPLIES ONLY TO DEVICES WITH EPROM/OTPROM.
E SERIES 52-PIN QFP

Figure 2-3 Pin Assignments for 52-Pin Thin QFP

M68HC11 E SERIES TECHNICAL DATA

PE2/AN2 PE6/AN6 PE3/AN3 PE7/AN7 VRL VRH VSS MODB/VSTBY MODA/LIR STRA/AS E STRB/R/W EXTAL

2

PIN DESCRIPTIONS

MOTOROLA 2-3

VSS MODB/VSTBY MODA/LIR STRA/AS E STRB/R/W EXTAL XTAL PC0/ADDR0/DATA0 PC1/ADDR1/DATA1 PC2/ADDR2/DATA2 PC3/ADDR3/DATA3 PC4/ADDR4/DATA4 PC5/ADDR5/DATA5 PC6/ADDR6/DATA6 PC7/ADDR7/DATA7 RESET * XIRQ/VPPE IRQ PD0/RxD EVSS PD1/TxD PD2/MISO PD3/MOSI PD4/SCK PD5/SS VDD VSS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29

EVSS VRH VRL PE7/AN7 PE3/AN3 PE6/AN6 PE2/AN2 PE5/AN5 PE1/AN1 PE4/AN4 PE0/AN0 PB0/ADDR8 PB1/ADDR9 PB2/ADDR10 PB3/ADDR11 PB4/ADDR12 PB5/ADDR13 PB6/ADDR14 PB7/ADDR15 PA0/IC3 PA1/IC2 PA2/IC1 PA3/OC5/IC4/OC1 PA4/OC4/OC1 PA5/OC3/OC1 PA6/OC2/OC1 PA7/PAI/OC1 EVDD

M68HC11 E SERIES

2

* VPPE APPLIES ONLY TO DEVICES WITH EPROM/OTPROM.

E SERIES 56-PIN DIP

Figure 2-4 Pin Assignments for 56-Pin SDIP

MOTOROLA 2-4

PIN DESCRIPTIONS

M68HC11 E SERIES TECHNICAL DATA

PA7/PAI/OC1 PA6/OC2/OC1 PA5/OC3/OC1 PA4/OC4/OC1 PA3/OC5/IC4/OC1 PA2/IC1 PA1/IC2 PA0/IC3 PB7/ADDR15 PB6/ADDR14 PB5/ADDR13 PB4/ADDR12 PB3/ADDR11 PB2/ADDR10 PB1/ADDR9 PB0/ADDR8 PE0/AN0 PE1/AN1 PE2/AN2 PE3/AN3 VRL VRH VSS MODB/VSTBY

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

48 47 46 45 44 43 42 41 40 39 38

VDD PD5/SS PD4/SCK PD3/MOSI PD2/MISO PD1/TxD PD0/RxD IRQ XIRQ RESET PC7/ADDR7/DATA7 PC6/ADDR6/DATA6 PC5/ADDR5/DATA5 PC4/ADDR4/DATA4 PC3/ADDR3/DATA3 PC2/ADDR2/DATA2 PC1/ADDR1/DATA1 PC0/ADDR0/DATA0 XTAL EXTAL STRB/R/W E STRA/AS MODA/LIR
8E2 48-PIN DIP

MC68HC811E2

37 36 35 34 33 32 31 30 29 28 27 26 25

2

Figure 2-5 Pin Assignments for 48-Pin DIP (MC68HC811E2) 2.1 VDD and VSS Power is supplied to the MCU through VDD and VSS. VDD is the power supply, VSS is ground. The MCU operates from a single 5-volt (nominal) power supply. Low-voltage devices in the E series operate at either 3.0 ­ 5.5 volts or 2.7 ­ 5.5 volts. Very fast signal transitions occur on the MCU pins. The short rise and fall times place high, short duration current demands on the power supply. To prevent noise problems, provide good power supply bypassing at the MCU. Also, use bypass capacitors that have good high-frequency characteristics and situate them as close to the MCU as possible. Bypass requirements vary, depending on how heavily the MCU pins are loaded. 2.2 RESET A bidirectional control signal, RESET, acts as an input to initialize the MCU to a known start-up state. It also acts as an open-drain output to indicate that an internal failure has been detected in either the clock monitor or COP watchdog circuit. The CPU distinguishes between internal and external reset conditions by sensing whether the reset pin rises to a logic one in less than two E-clock cycles after a reset has occurred. Do
M68HC11 E SERIES TECHNICAL DATA PIN DESCRIPTIONS MOTOROLA 2-5

not connect an external resistor capacitor (RC) power-up delay circuit to the reset pin of M68HC11 devices because the circuit charge time constant can cause the device to misinterpret the type of reset that occurred. Refer to SECTION 5 RESETS AND INTERRUPTS for further information.
VDD VDD

2 IN RESET MC34(0/1)64 GND 3 1

4.7 k
TO RESET OF M68HC11

EXT RESET CIRCUIT

Figure 2-6 External Reset Circuit

2
VDD MANUAL RESET SWITCH 4.7 k 1.0 µF IN RESET MC34164 GND 4.7 k

VDD

VDD

IN RESET MC34064 GND TO RESET OF M68HC11

OPTIONAL POWER-ON DELAY AND MANUAL RESET SWITCH

EXT RESET CIRCUIT W/DELAY

Figure 2-7 External Reset Circuit with Delay 2.3 Crystal Driver and External Clock Input (XTAL, EXTAL) These two pins provide the interface for either a crystal or a CMOS compatible clock to control the internal clock generator circuitry. The frequency applied to these pins is four times higher than the desired E-clock rate.

MOTOROLA 2-6

PIN DESCRIPTIONS

M68HC11 E SERIES TECHNICAL DATA

The XTAL pin is normally left unterminated when an external CMOS compatible clock input is connected to the EXTAL pin. However, a 10 k to 100 k load resistor connected from XTAL to ground can be used to reduce RFI noise emission. The XTAL output is normally intended to drive only a crystal. The XTAL output can be buffered with a high-impedance buffer, or it can be used to drive the EXTAL input of another M68HC11 MCU. In all cases, use caution around the oscillator pins. Load capacitances shown in the oscillator circuits include all stray layout capacitances. Refer to Figure 2-8, Figure 29, and Figure 2-10.

25 pF * EXTAL

MCU
XTAL

10 M

4xE CRYSTAL 25 pF *

* THIS VALUE INCLUDES ALL STRAY CAPACITANCES.
COMMON XTAL CONN

2
4xE CMOS-COMPATIBLE EXTERNAL OSCILLATOR

Figure 2-8 Common Crystal Connections

EXTAL

MCU
XTAL NC
EXT EXTAL CONN

Figure 2-9 External Oscillator Connections

M68HC11 E SERIES TECHNICAL DATA

PIN DESCRIPTIONS

MOTOROLA 2-7

25 pF * EXTAL

220 EXTAL

FIRST MCU
XTAL

10 M

4xE CRYSTAL 25 pF * NC

SECOND MCU
XTAL

* THIS VALUE INCLUDES ALL STRAY CAPACITANCES.

DUAL-MCU XTAL CONN

Figure 2-10 One Crystal Driving Two MCUs 2.4 E-Clock Output (E) E is the output connection for the internally generated E clock. The signal from E is used as a timing reference. The frequency of the E-clock output is one fourth that of the input frequency at the XTAL and EXTAL pins. When E-clock output is low, an internal process 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 RFI 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.5 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 pull-up resistor, typically 4.7 k, to VDD. 2.6 Non-Maskable Interrupt (XIRQ/VPPE) 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 enables it. Because the XIRQ input is levelsensitive, it can be connected to a multiple-source wired-OR network with an external pull-up resistor to VDD. XIRQ is often used as a power loss detect interrupt. Whenever XIRQ or IRQ are used with multiple interrupt sources (IRQ must be configured for level-sensitive operation if there is more than one source of IRQ interrupt), each source must drive the interrupt input with an open-drain type of driver to avoid contention between outputs. There should be a single pull-up 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 acknowledges the interrupt request. If one or more interrupt sources are still pending after the MCU services a request, 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
MOTOROLA 2-8 PIN DESCRIPTIONS M68HC11 E SERIES TECHNICAL DATA

2

INTERRUPTS. VPPE is the input for the 12 volt nominal programming voltage required for EPROM/ OTPROM programming. On devices without EPROM/OTPROM this pin is only XIRQ input. 2.7 MODA and MODB (MODA/LIR and MODB/VSTBY) During reset, MODA and MODB select one of the four operating modes. Refer to SECTION 4 OPERATING MODES AND ON-CHIP MEMORY. After the operating mode has been selected, the load instruction register (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 instruction (opcode fetch). This output is provided for assistance in program debugging. The VSTBY pin is used to input RAM standby power. When the voltage on this pin is more than one MOS threshold (about 0.7 volts) above the VDD voltage, the internal RAM and part of 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 low before VDD is removed and must remain low until VDD has been restored to a valid level. 2.8 VRL and VRH These two inputs provide the reference voltages for the analog-to-digital converter circuitry. 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, and both VRL and VRH should be between VSS and VDD. 2.9 STRA/AS This pin performs either of two separate functions, depending on the operating mode. In single-chip mode, STRA performs an input handshake (strobe input) function. 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. 2.10 STRB/R/W The strobe B and read/write pin acts 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 programmable strobe for handshake with other parallel devices. Refer to SECTION 6 PARALLEL INPUT/OUTPUT 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 being written to the external data bus. A high on this pin 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 port C, if internal read visibility is enabled and an
M68HC11 E SERIES TECHNICAL DATA PIN DESCRIPTIONS MOTOROLA 2-9

2

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. 2.11 Port Signals Port pins have different functions in different operating modes. Pin functions for ports A, D, and E are independent of operating modes. Ports B and 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. Port C provides eight general-purpose input/output signals when the MCU is in the single-chip operating mode. When the microcontroller is in the expanded multiplexed operating mode, port C pins are a multiplexed address/data bus. Refer to Table 2-1 for details about functions of the 40 port signals within different operating modes. Terminate unused inputs and I/O pins configured as inputs high or low.

2

Table 2-1 Port Signal Functions
Port/Bit PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PD0 PD1 PD2 PD3 PD4 Single-Chip and Bootstrap Modes Expanded and Test Modes

PA0/IC3 PA1/IC2 PA2/IC1 PA3/OC5/IC4/OC1 PA4/OC4/OC1 PA5/OC3/OC1 PA6/OC2/OC1 PA7/PAI/OC1 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PD0/RxD PD1/TxD PD2/MISO PD3/MOSI PD4/SCK ADDR8 ADDR9 ADDR10 ADDR11 ADDR12 ADDR13 ADDR14 ADDR15 ADDR0/DATA0 ADDR1/DATA1 ADDR2/DATA2 ADDR3/DATA3 ADDR4/DATA4 ADDR5/DATA5 ADDR6/DATA6 ADDR7/DATA7

MOTOROLA 2-10

PIN DESCRIPTIONS

M68HC11 E SERIES TECHNICAL DATA

Table 2-1 Port Signal Functions
Port/Bit PD5 -- -- PE0 PE1 PE2 PE3 PE4 PE5 PE6 PE7 Single-Chip and Bootstrap Modes PD5/SS STRA STRB PE0/AN0 PE1/AN1 PE3/AN2 PE3/AN3 PE4/AN4 PE5/AN5 PE6/AN6 PE7/AN7 AS R/W Expanded and Test Modes

2.11.1 Port A In all operating modes, port A can be configured for three timer input capture (IC) functions and four timer output compare (OC) functions. An additional pin can be configured as either the fourth IC or the fifth OC. Any port A pin that is not currently being used 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, respectively. All other port A pins are fixed as either input or output. PA7 can function as general-purpose I/O or as timer output compare for OC1. PA7 is also the input to the pulse accumulator, even while functioning as a general-purpose I/O or an OC1 output. PA[6:4] serve as either general-purpose outputs, timer input captures or timer output compare 2­4. In addition, PA[6:4] 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 include OC1 and IC4/OC5. IC4/OC5 is software selectable as either a fourth input capture or a fifth output compare. PA3 can also be configured to allow OC1 edges to trigger IC4 captures. PA[2:0] serve as general-purpose inputs or as IC[1:3]. 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 internal latch, bits 7 and 3. It drives the pins only if they are configured as outputs. Writes to PORTA do not change the pin state when pins are configured for timer input captures or output compares. Refer to SECTION 6 PARALLEL INPUT/OUTPUT. 2.11.2 Port B During single-chip operating modes, all port B pins are general-purpose output pins. During MCU reads of this port, the level sensed at the input side of the port B output
M68HC11 E SERIES TECHNICAL DATA PIN DESCRIPTIONS MOTOROLA 2-11

2

drivers is read. Port B can also be used in simple strobed output mode. In this mode, an output pulse appears 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 address output signals. During each MCU cycle, bits [15:8] of the address bus are output on the PB[7:0] pins. The PORTB register is treated as an external address in expanded modes. 2.11.3 Port C While in single-chip operating modes, all port C pins are general-purpose input/output 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 parallel I/O where the STRA input and STRB output act as handshake control lines. When in expanded multiplexed modes, all port C pins are configured as multiplexed address/data signals. During the address portion of each MCU cycle, bits [7:0] of the address are output on the PC[7:0] pins. During the data portion of each MCU cycle (E high), PC[7:0] are bidirectional data signals, DATA[7:0]. The direction of data at the port C pins is indicated by the R/W signal. The CWOM control bit in the PIOC register disables the port C P-channel output driver. CWOM simultaneously affects all eight bits of port C. Because the N-channel driver is not affected 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 zero, it is driven low by the N-channel driver. When a port C bit is at logic level one, the associated pin has high-impedance, as neither the N- nor the P-channel devices are active. It is customary to have an external pull-up resistor on lines that 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/OUTPUT for additional information about port C functions. 2.11.4 Port D Pins PD[5:0] can be used for general-purpose I/O signals. These pins alternately serve as the serial communication interface (SCI) and serial peripheral interface (SPI) signals when those subsystems are enabled. Pin PD0 is the receive data input (RxD) signal for the SCI. Pin PD1 is the transmit data output (TxD) signal for the SCI. Pins PD[5:2] are dedicated to the serial peripheral interface (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 and PD5 is the slave select (SS) input. 2.11.5 Port E Use port E for general-purpose or analog-to-digital (A/D) inputs. If high accuracy is required for A/D conversions, avoid reading port E during sampling, as small disturbances can reduce the accuracy of that result.
MOTOROLA 2-12 PIN DESCRIPTIONS M68HC11 E SERIES TECHNICAL DATA

2

SECTION 3 CENTRAL PROCESSING UNIT
This section presents information on M68HC11 central processing unit (CPU) architecture, data types, addressing modes, the instruction set, and special operations such as subroutine calls and interrupts. The CPU is designed to treat all peripheral, I/O, and memory locations identically as addresses 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 also allows accessing an operand from an external memory location with no execution-time penalty. 3.1 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.

3

7 15

A

0 D IX IY SP PC

7

B

0 0

8-BIT ACCUMULATORS A & B OR 16-BIT DOUBLE ACCUMULATOR D INDEX REGISTER X INDEX REGISTER Y STACK POINTER PROGRAM COUNTER

7 S

0 X H I N Z V C CONDITION CODES

CARRY/BORROW FROM MSB OVERFLOW ZERO NEGATIVE I-INTERRUPT MASK HALF CARRY (FROM BIT 3) X-INTERRUPT MASK STOP DISABLE
HC11 PROG MODEL

Figure 3-1 Programming Model

M68HC11 E SERIES TECHNICAL DATA

CENTRAL PROCESSING UNIT

MOTOROLA 3-1

3.1.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, the following 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. The decimal adjust accumulator A (DAA) instruction is used after binary-coded decimal (BCD) arithmetic operations, but there is no equivalent BCD instruction to adjust accumulator B.

3

The add, subtract, and compare instructions associated 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.1.2 Index Register X (IX) The IX register provides a 16-bit indexing value that can be added to the 8-bit offset provided in an instruction to create an effective address. The IX register can also be used as a counter or as a temporary storage register. 3.1.3 Index Register Y (IY) The 16-bit IY register performs an indexed mode function similar to that 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.3 Opcodes and Operands for further information. 3.1.4 Stack Pointer (SP) The M68HC11 CPU has an automatic program stack. This stack can be located anywhere in the address space and can be any size up to the amount of memory available 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.

MOTOROLA 3-2

CENTRAL PROCESSING UNIT

M68HC11 E SERIES TECHNICAL DATA

JSR, JUMP TO SUBROUTINE MAIN PROGRAM
DIRECT 7 SP SP+1 SP+2 SP+3 SP+4 SP+5 SP+6 SP+7 SP+8

WAI, WAIT FOR INTERRUPT STACK CCR ACCB ACCA IXH IXL IYH IYL RTNH RTNL SWI, SOFTWARE INTERRUPT MAIN PROGRAM
PC 7 0 PC

INTERRUPT ROUTINE $3E = WAI
SP SP+1 SP+2 SP+3 SP+4 SP+5 SP+6 SP+7 SP+8

7

STACK CCR ACCB ACCA IXH IXL IYH IYL RTNH RTNL STACK CCR ACCB ACCA IXH IXL IYH IYL RTNH RTNL

0

$9D = JSR dd RTN NEXT MAIN INSTR. MAIN PROGRAM

PC

INDEXED, X

$AD = JSR ff RTN NEXT MAIN INSTR. MAIN PROGRAM

PC

INDEXED, Y

$18 = PRE $AD = JSR RTN ff NEXT MAIN INSTR. MAIN PROGRAM

PC

³ SP+9

³ SP+9

0

$3F = SWI

³ SP­9
SP­8 SP­7 SP­6 SP­5 SP­4 SP­3 SP­2 SP­1 SP

INDEXED, Y

$BD = PRE hh RTN ll NEXT MAIN INSTR.

PC

WAI, WAIT FOR INTERRUPT MAIN PROGRAM

JMP, JUMP MAIN PROGRAM
PC INDEXED, X X + ff NEXT MAIN INSTR.

PC

$3E = WAI

3
0 0

$6E = JMP ff

BSR, BRANCH TO SUBROUTINE MAIN PROGRAM
PC 7

STACK RTNH RTNL

$8D = BSR

³ SP­2
SP­1 SP

MAIN PROGRAM
PC

INDEXED, Y

$18 = PRE $6E = JMP ff

RTS, RETURN FROM SUBROUTINE MAIN PROGRAM
PC

7 SP SP+1

STACK RTNH RTNL

$39 = RTS

X + ff NEXT MAIN INSTR.

MAIN PROGRAM
PC

³ SP+2 LEGEND:

EXTENDED

$7E = JMP hh ll

hh ll NEXT MAIN INSTR.

RTN = ADDRESS OF NEXT INSTRUCTION IN MAIN PROGRAM TO BE EXECUTED UPON RETURN FROM SUBROUTINE RTNH = MOST SIGNIFICANT BYTE OF RETURN ADDRESS RTNL = LEAST SIGNIFICANT BYTE OF RETURN ADDRESS ³ = 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 (256) IS ADDED TO INDEX hh = HIGH-ORDER BYTE OF 16-BIT EXTENDED ADDRESS ll = LOW-ORDER BYTE OF 16-BIT EXTENDED ADDRESS rr= SIGNED RELATIVE OFFSET $80 (­128) TO $7F (+127) (OFFSET RELATIVE TO THE ADDRESS FOLLOWING THE MACHINE CODE OFFSET BYTE)
HC11 STACK OPERATIONS

Figure 3-2 Stacking Operations

M68HC11 E SERIES TECHNICAL DATA

CENTRAL PROCESSING UNIT

MOTOROLA 3-3

When a subroutine is called by a jump to subroutine (JSR) or branch to subroutine (BSR) instruction, 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 loads it into the program counter. Execution then continues at this recovered return address. 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 address specified by the vector for the interrupt. At the end of the interrupt service routine, an RTI 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. There are instructions that push and pull the A and B accumulators and the X and Y index registers. These instructions 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, ensures that the contents of a register will be the same after returning from the subroutine as it was before starting the subroutine. 3.1.5 Program Counter (PC) The program counter, a 16-bit register, contains the address of the next instruction to be executed. After reset, the program counter is initialized from one of six possible vectors, depending on operating mode and the cause of reset. Table 3-1 Reset Vector Comparison
Normal Test or Boot POR or RESET Pin $FFFE, F $BFFE, F Clock Monitor $FFFC, D $BFFC, D COP Watchdog $FFFA, B $BFFA, B

3

3.1.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) and a stop disable bit (S). In the M68HC11 CPU, condition codes are automatically updated by most instructions. For example, load accumulator A (LDAA) and store accumulator A (STAA) instructions automatically set or clear the N, Z, and V condition code flags. Pushes, pulls, 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. 3.1.6.1 Carry/Borrow (C) The C bit is set if the arithmetic logic unit (ALU) performs a carry or borrow during an arithmetic operation. 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 shift operations.
MOTOROLA 3-4 CENTRAL PROCESSING UNIT M68HC11 E SERIES TECHNICAL DATA

3.1.6.2 Overflow (V) The overflow bit is set if an operation causes an arithmetic overflow. Otherwise, the V bit is cleared. 3.1.6.3 Zero (Z) The Z bit is set if the result of an arithmetic, logic, or data manipulation operation is zero. Otherwise, the Z bit is cleared. Compare instructio