M68HC11E Family: Data Sheet
M68HC11E Family: Data Sheet
M68HC11E Family: Data Sheet
Data Sheet
HC11 Microcontrollers
freescale.com
MC68HC11E Family
Data Sheet
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 be an earlier revision. To verify you have the latest information available, refer to: http://freescale.com/ 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.
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. Freescale Semiconductor, Inc., 2005. All rights reserved. M68HC11E Family Data Sheet, Rev. 5.1 Freescale Semiconductor 3
Revision History
Revision History
Date May, 2001 June, 2001 December, 2001 Revision Level 3.1 3.2 3.3 Description 2.3.3.1 System Configuration Register Addition to NOCOP bit description Added 10.21 EPROM Characteristics 10.21 EPROM Characteristics For clarity, addition to note 2 following the table 7.7.2 Serial Communications Control Register 1 SCCR1 bit 4 (M) description corrected 10.7 MC68L11E9/E20 DC Electrical Characteristics Title changed to include the MC68L11E20 10.8 MC68L11E9/E20 Supply Currents and Power Dissipation Title changed to include the MC68L11E20 10.10 MC68L11E9/E20 Control Timing Title changed to include the MC68L11E20 10.12 MC68L11E9/E20 Peripheral Port Timing Title changed to include the MC68L11E20 July, 2002 4 10.14 MC68L11E9/E20 Analog-to-Digital Converter Characteristics Title changed to include the MC68L11E20 10.16 MC68L11E9/E20 Expansion Bus Timing Characteristics Title changed to include the MC68L11E20 10.18 MC68L11E9/E20 Serial Peirpheral Interface Characteristics Title changed to include the MC68L11E20 Title changed to include the MC68L11E20 11.4 Extended Voltage Device Ordering Information (3.0 Vdc to 5.5 Vdc) Updated table to include MC68L1120 Format updated to current publications standards 1.4.6 Non-Maskable Interrupt (XIRQ/VPPE) Added Caution note pertaining to EPROM programming of the MC68HC711E9 device only. 6.4 Port C Clarified description of DDRC[7:0] bits 10.21 EPROM Characteristics Added note pertaining to EPROM programming of the MC68HC711E9 device only. July, 2005 5.1 Updated to meet Freescale identity guidelines. Page Number(s) 44 175 175 110 153 154 157 163 167 169 172 175 181 Throughout 23 100 175 Throughout
June, 2003
List of Chapters
Chapter 1 General Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Chapter 2 Operating Modes and On-Chip Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 Chapter 3 Analog-to-Digital (A/D) Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Chapter 4 Central Processor Unit (CPU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Chapter 5 Resets and Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Chapter 6 Parallel Input/Output (I/O) Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Chapter 7 Serial Communications Interface (SCI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Chapter 8 Serial Peripheral Interface (SPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Chapter 9 Timing Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Chapter 10 Electrical Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 Chapter 11 Ordering Information and Mechanical Specifications . . . . . . . . . . . . . . . . . . 177 Appendix A Development Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Appendix B EVBU Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 AN1060 M68HC11 Bootstrap Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 EB184 Enabling the Security Feature on the MC68HC711E9 Devices with PCbug11 on the M68HC711E9PGMR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 EB188 Enabling the Security Feature on M68HC811E2 Devices with PCbug11 on the M68HC711E9PGMR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 EB296 Programming MC68HC711E9 Devices with PCbug11 and the M68HC11EVBU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
List of Chapters
Table of Contents
Chapter 1 General Description
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 VDD and VSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 Crystal Driver and External Clock Input (XTAL and EXTAL) . . . . . . . . . . . . . . . . . . . . . . . . 1.4.4 E-Clock Output (E) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.5 Interrupt Request (IRQ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.6 Non-Maskable Interrupt (XIRQ/VPPE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.7 MODA and MODB (MODA/LIR and MODB/VSTBY) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.7.1 VRL and VRH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.8 STRA/AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.9 STRB/R/W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.10 Port Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.10.1 Port A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.10.2 Port B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.10.3 Port C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.10.4 Port D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.10.5 Port E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 13 14 14 21 22 22 23 23 23 24 24 25 25 25 25 27 27 28 28
29 29 29 29 30 30 31 39 40 42 43 45 46 47 48 48
Table of Contents
2.4.3 EPROM and EEPROM Programming Control Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 EEPROM and CONFIG Programming and Erasure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1.1 Block Protect Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1.2 EPROM and EEPROM Programming Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1.3 EEPROM Bulk Erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1.4 EEPROM Row Erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1.5 EEPROM Byte Erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1.6 CONFIG Register Programming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.2 EEPROM Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49 51 51 51 53 54 54 55 55 55
65 65 66 66 66 66 68 68 68 68 68 68 69 69 69 69
4.3 4.4 4.5 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.5.6 4.6
Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Opcodes and Operands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Addressing Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Immediate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Extended . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Indexed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inherent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Relative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instruction Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69 70 70 70 70 71 71 71 71 71
Table of Contents
119 119 119 120 121 121 121 122 122 122 123 123 124 125
Table of Contents
Expansion Bus Timing Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MC68L11E9/E20 Expansion Bus Timing Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . Serial Peripheral Interface Timing Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MC68L11E9/E20 Serial Peirpheral Interface Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . EEPROM Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MC68L11E9/E20 EEPROM Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EPROM Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Features
Features of the E-series devices include: M68HC11 CPU Power-saving stop and wait modes Low-voltage devices available (3.05.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 the MC68HC811E2 Asynchronous non-return-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
M68HC11E Family Data Sheet, Rev. 5.1 Freescale Semiconductor 13
General Description
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 quad flat pack (QFP) 48-pin plastic dual in-line package (DIP), MC68HC811E2 only 56-pin plastic shrink dual in-line package, .070-inch lead spacing (SDIP)
1.3 Structure
See Figure 1-1 for a functional diagram of the E-series MCUs. Differences among devices are noted in the table accompanying Figure 1-1.
Pin Descriptions
MODA/ MODB/ LIR VSTBY
XTAL EXTAL
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
TIMER SYSTEM
M68HC11 CPU
R/W AS
ADDRESS/DATA
VDD VSS
STRB STRA
TxD RxD
STRA/AS
STRB/R/W
DEVICE MC68HC11E0 MC68HC11E1 MC68HC11E9 MC68HC711E9 MC68HC11E20 MC68HC711E20 MC68HC811E2 * VPPE applies only to devices with EPROM/OTPROM.
ROM 12 K 20 K
PE7/AN7 PE6/AN6 PE5/AN5 PE4/AN4 PE3/AN3 PE2/AN2 PE1/AN1 PE0/AN0 EPROM 12 K 20 K EEPROM 512 512 512 512 512 2048
General Description
2 MODB/VSTBY
6 STRB/R/W
3 MODA/LIR
4 STRA/AS
50 PE7/AN7
49 PE3/AN3
48 PE6/AN6
47 PE2/AN2 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 PA1/IC2 33
7 EXTAL
52 VRH 28
VSS 27 1
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
M68HC11 E SERIES
29
51 VRL
5 E
30 PA4/OC4/OC1
31 PA3/OC5/IC4/OC1
PD3/MOSI
PD2/MISO
PD1/TxD
PD4/SCK
PA7/PAI/OC1
PD5/SS VDD
PA6/OC2/OC1
PA5/OC3/OC1
PA2/IC1
32
Pin Descriptions
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 64 63 62 61 60 59 58 57 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 56 55 54 53 52 51 50 49
M68HC11 E SERIES
48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
Freescale Semiconductor
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
NC PD0/RxD IRQ XIRQ/VPPE(1) 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
General Description
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 52 51 50 49 48 47 46 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 14 15 16 17 18 45 44 43 42 41 40
M68HC11 E SERIES
39 38 37 36 35 34 33 32 31 30 29 28 27
PD0/RxD IRQ XIRQ/VPPE(1) 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
PE2/AN2 PE6/AN6 PE3/AN3 PE7/AN7 VRL VRH VSS MODB/VSTBY MODA/LIR STRA/AS E STRB/R/W EXTAL
19 20 21 22 23 24 25 26
Pin Descriptions
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
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 42
41 40 39 38 37 36 35 34 33 32 31 30 29
General Description
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
MC68HC811E2
37 36 35 34 33 32 31 30 29 28 27 26 25
Pin Descriptions
4.7 k
TO RESET OF M68HC11
4.7 k
TO RESET OF M68HC11
VDD
4.7 k
General Description
1.4.2 RESET
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 1-7 and Figure 1-8. CAUTION Do 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. Because the CPU is not able to fetch and execute instructions properly when VDD falls below the minimum operating voltage level, reset must 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. Presently, there are several economical ways to solve this problem. For example, two good external components for LVI reset are: 1. The Seiko S0854HN (or other S805 series devices): a. Extremely low power (2 A) a. TO-92 package a. Limited temperature range, 20C to +70C a. Available in various trip-point voltage ranges 2. The Freescale MC34064: a. TO-92 or SO-8 package a. Draws about 300 A a. Temperature range 40C to 85C a. Well controlled trip point a. Inexpensive Refer to Chapter 5 Resets and Interrupts for further information.
1.4.3 Crystal Driver and External Clock Input (XTAL and 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. The XTAL pin must be left unterminated when an external CMOS- compatible clock input is connected to the EXTAL pin. The XTAL output is normally intended to drive only a crystal. Refer to Figure 1-9 and Figure 1-10. 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.
Pin Descriptions
CL EXTAL
MCU
XTAL
10 M
4xE CRYSTAL CL
EXTAL
MCU
XTAL NC
General Description
NOTE IRQ must be configured for level-sensitive operation if there is more than one source of IRQ interrupt. 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 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 Chapter 5 Resets and 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 an XIRQ input. CAUTION During EPROM programming of the MC68HC711E9 device, the VPPE pin circuitry may latch-up and be damaged if the input current is not limited to 10 mA. For more information please refer to MC68HC711E9 8-Bit Microcontroller Unit Mask Set Errata 3 (Freescale document order number 68HC711E9MSE3.
Pin Descriptions
1.4.9 STRA/AS
The strobe A (STRA) and address strobe (AS) 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 Chapter 2 Operating Modes and On-Chip Memory.
1.4.10 STRB/R/W
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 programmable strobe for handshake with other parallel devices. Refer to Chapter 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 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 of port C, if internal read visibility (IRV) is enabled and an internal address is read, even though R/W is in a high-impedance state. Refer to Chapter 2 Operating Modes and On-Chip Memory for more information about IRVNE (internal read visibility not E).
1.4.12 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.
General Description
Pin Descriptions
PA6PA4 serve as either general-purpose outputs, timer input captures, or timer output compare 24. In addition, PA6PA4 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. PA2PA0 serve as general-purpose inputs or as IC1IC3. 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 Chapter 6 Parallel Input/Output (I/O) Ports.
1.4.13 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 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 158 of the address bus are output on the PB7PB0 pins. The PORTB register is treated as an external address in expanded modes.
1.4.14 Port C
While in single-chip operating modes, all port C pins are general-purpose 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 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 70 of the address are output on the PC7PC0 pins. During the data portion of each MCU cycle (E high), PC7PC0 are bidirectional data signals, DATA7DATA0. 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 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 external pullup 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 Chapter 6 Parallel Input/Output (I/O) Ports for additional information about port C functions.
General Description
1.4.15 Port D
Pins PD5PD0 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. PD0 is the receive data input (RxD) signal for the SCI. PD1 is the transmit data output (TxD) signal for the SCI. PD5PD2 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. PD5 is the slave select (SS) input.
1.4.16 Port E
Use port E for general-purpose or analog-to-digital (A/D) inputs. CAUTION 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.
The address, R/W, and AS signals are active and valid for all bus cycles, including accesses to internal memory locations. 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 transfers. 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 2-1. NOTE The write enable signal for an external memory is the NAND of the E clock and the inverted R/W signal.
PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0 HC373 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 AS R/W E D1 D2 D3 D4 D5 D6 D7 D8 LE Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 OE
ADDR15 ADDR14 ADDR13 ADDR12 ADDR11 ADDR10 ADDR9 ADDR8 ADDR7 ADDR6 ADDR5 ADDR4 ADDR3 ADDR2 ADDR1 ADDR0
MCU
Memory Map
located in this ROM at $BFC0$BFFF. The bootstrap ROM contains a small program which initializes the serial communications interface (SCI) and allows the user to download a program into on-chip RAM. The size of the downloaded program can be as large as the size of the on-chip RAM. After a 4-character delay, or after receiving the character for the highest address in RAM, control passes to the loaded program at $0000. Refer to Figure 2-2, Figure 2-3, Figure 2-4, Figure 2-5, and Figure 2-6. Use of an external pullup resistor is required when using the SCI transmitter pin because port D pins are configured for wired-OR operation by the bootloader. In bootstrap mode, the interrupt vectors are directed to RAM. This allows the use of interrupts through a jump table. Refer to the application note AN1060 entitled M68HC11 Bootstrap Mode, that is included in this data book.
$B600 EXT EXT BF00 BFFF $D000 BOOT ROM BFC0 BFFF SPECIAL MODES INTERRUPT VECTORS
B600 $B600 EXT EXT BFFF $D000 FFC0 FFFF EXPANDED BOOTSTRAP SPECIAL TEST B7FF BF00
BOOT ROM
BFC0 BFFF
$FFFF
BOOT ROM
BFC0 BFFF
FFFF
FFFF
Memory Map
$0000 EXT $1000 EXT $9000 EXT $B600 EXT EXT EXT EXT EXT
0000 768 BYTES RAM 02FF 1000 103F 9000 AFFF B600 B7FF BF00 BFFF BOOT ROM BFC0 SPECIAL MODES INTERRUPT VECTORS BFFF 512 BYTES EEPROM 8 KBYTES ROM/EPROM * 64-BYTE REGISTER BLOCK
$D000
D000 12 KBYTES ROM/EPROM * FFC0 FFFF FFFF NORMAL MODES INTERRUPT VECTORS
$FFFF
SINGLE BOOTSTRAP SPECIAL EXPANDED CHIP TEST * 20 Kbytes ROM/EPROM are contained in two segments of 8 Kbytes and 12 Kbytes each.
EXT
EXT BF00 BFFF BOOT ROM BFC0 SPECIAL MODES INTERRUPT VECTORS BFFF
2048 BYTES EEPROM $F800 F800 FFC0 FFFF NORMAL MODES INTERRUPT VECTORS
FFFF
Operating Modes and On-Chip Memory Addr. $1000 $1001 Register Name Port A Data Register (PORTA) Write: See page 98. Reset: Reserved Parallel I/O Control Register Read: (PIOC) Write: See page 102. Reset: Port C Data Register (PORTC) Write: See page 99. Reset: Read: Read: Bit 7 PA7 I R 6 PA6 0 R 5 PA5 0 R 4 PA4 0 R 3 PA3 I R 2 PA2 I R 1 PA1 I R Bit 0 PA0 I R
$1002
STAF 0 PC7
STAI 0 PC6
CWOM 0 PC5
HNDS 0 PC4
OIN 0 PC3
PLS U PC2
EGA 1 PC1
INVB 1 PC0
$1003
Indeterminate after reset PB7 0 PCL7 PB6 0 PCL6 PB5 0 PCL5 PB4 0 PCL4 PB3 0 PCL3 PB2 0 PCL2 PB1 0 PCL1 PB0 0 PCL0
$1004
Port B Data Register Read: (PORTB) Write: See page 99. Reset: Port C Latched Register Read: (PORTCL) Write: See page 99. Reset: Reserved
$1005 $1006
$1007
Port C Data Direction Register Read: DDRC7 (DDRC) Write: See page 100. Reset: 0 Port D Data Register Read: (PORTD) Write: See page 100. Reset: Port D Data Direction Register Read: (DDRD) Write: See page 100. Reset: Port E Data Register (PORTE) Write: See page 101. Reset: Read: 0 U
DDRC6 0 0 U
$1008
$1009
0 PE7
0 PE6
0 PE5
$100A
Indeterminate after reset FOC1 0 FOC2 0 OC1M6 0 FOC3 0 OC1M5 0 FOC4 0 OC1M4 0 R FOC5 0 OC1M3 0 = Reserved 0 0 0 0 0 0
$100B
Timer Compare Force Register Read: (CFORC) Write: See page 135. Reset:
Output Compare 1 Mask Register Read: OC1M7 $100C (OC1M) Write: See page 136. Reset: 0
U = Unaffected
Memory Map Addr. $100D Register Name Read: Bit 7 6 OC1D6 0 Bit 14 0 Bit 6 0 Bit 14 5 OC1D5 0 Bit 13 0 Bit 5 0 Bit 13 4 OC1D4 0 Bit 12 0 Bit 4 0 Bit 12 3 OC1D3 0 Bit 11 0 Bit 3 0 Bit 11 0 Bit 10 0 Bit 2 0 Bit 10 0 Bit 9 0 Bit 1 0 Bit 9 0 Bit 8 0 Bit 0 0 Bit 8 2 1 Bit 0
Output Compare 1 Data Register OC1D7 (OC1D) Write: See page 136. Reset: 0 Timer Counter Register High Read: (TCNTH) Write: See page 137. Reset: Timer Counter Register Low Read: (TCNTL) Write: See page 137. Reset: Timer Input Capture 1 Register Read: High (TIC1H) Write: See page 132. Reset: Timer Input Capture 1 Register Low (TIC1L) Write: See page 132. Reset: Read: Bit 15 0 Bit 7 0 Bit 15
$100E
$100F
$1010
Indeterminate after reset Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
$1011
Indeterminate after reset Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8
$1012
Timer Input Capture 2 Register Read: High (TIC2H) Write: See page 132. Reset: TImer Input Capture 2 Register Read: Low (TIC2L) Write: See page 132. Reset: Timer Input Capture 3 Register Read: High (TIC3H) Write: See page 132. Reset: Timer Input Capture 3 Register Low (TIC3L) Write: See page 132. Reset: Read:
Indeterminate after reset Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
$1013
Indeterminate after reset Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8
$1014
Indeterminate after reset Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
$1015
Indeterminate after reset Bit 15 1 Bit 7 1 Bit 15 1 Bit 14 1 Bit 6 1 Bit 14 1 Bit 13 1 Bit 5 1 Bit 13 1 Bit 12 1 Bit 4 1 Bit 12 1 R Bit 11 1 Bit 3 1 Bit 11 1 = Reserved Bit 10 1 Bit 2 1 Bit 10 1 Bit 9 1 Bit 1 1 Bit 9 1 Bit 8 1 Bit 0 1 Bit 8 1
$1016
Timer Output Compare 1 Register Read: High (TOC1H) Write: See page 134. Reset:
Timer Output Compare 1 Register Read: $1017 Low (TOC1L) Write: See page 134. Reset: Timer Output Compare 2 Register Read: $1018 High (TOC2H) Write: See page 134. Reset:
U = Unaffected
Operating Modes and On-Chip Memory Addr. $1019 Register Name Timer Output Compare 2 Register Low (TOC2L) Write: See page 134. Reset: Read: Bit 7 Bit 7 1 Bit 15 1 Bit 7 1 Bit 15 1 Bit 7 1 Bit 15 1 Bit 7 1 OM2 0 6 Bit 6 1 Bit 14 1 Bit 6 1 Bit 14 1 Bit 6 1 Bit 14 1 Bit 6 1 OL2 0 EDG4A 0 OC2I 0 OC2F 0 RTII 0 5 Bit 5 1 Bit 13 1 Bit 5 1 Bit 13 1 Bit 5 1 Bit 13 1 Bit 5 1 OM3 0 EDG1B 0 OC3I 0 OC3F 0 PAOVI 0 4 Bit 4 1 Bit 12 1 Bit 4 1 Bit 12 1 Bit 4 1 Bit 12 1 Bit 4 1 OL3 0 EDG1A 0 OC4I 0 OC4F 0 PAII 0 R 0 = Reserved 0 3 Bit 3 1 Bit 11 1 Bit 3 1 Bit 11 1 Bit 3 1 Bit 11 1 Bit 3 1 OM4 0 EDG2B 0 I4/O5I 0 I4/O5F 0 2 Bit 2 1 Bit 10 1 Bit 2 1 Bit 10 1 Bit 2 1 Bit 10 1 Bit 2 1 OL4 0 EDG2A 0 IC1I 0 IC1F 0 1 Bit 1 1 Bit 9 1 Bit 1 1 Bit 9 1 Bit 1 1 Bit 9 1 Bit 1 1 OM5 0 EDG3B 0 IC2I 0 IC2F 0 PR1 0 Bit 0 Bit 0 1 Bit 8 1 Bit 0 1 Bit 8 1 Bit 0 1 Bit 8 1 Bit 0 1 OL5 0 EDG3A 0 IC3I 0 IC3F 0 PR0 0
$101A
Timer Output Compare 3 Register Read: High (TOC3H) Write: See page 135. Reset:
Timer Output Compare 3 Register Read: $101B Low (TOC3L) Write: See page 135. Reset: Timer Output Compare 4 Register Read: $101C High (TOC4H) Write: See page 135. Reset: $101D Timer Output Compare 4 Register Low (TOC4L) Write: See page 135. Reset: Read:
$101E
Timer Input Capture 4/Output Read: Compare 5 Register High Write: (TI4/O5) See page 133. Reset: Timer Input Capture 4/Output Read: Compare 5 Register Low Write: (TI4/O5) See page 133. Reset: Timer Control Register 1 Read: (TCTL1) Write: See page 137. Reset: Read:
$101F
$1020
$1021
Timer Control Register 2 EDG4B (TCTL2) Write: See page 131. Reset: 0 Timer Interrupt Mask 1 Register Read: (TMSK1) Write: See page 138. Reset: Timer Interrupt Flag 1 Read: (TFLG1) Write: See page 138. Reset: Timer Interrupt Mask 2 Register Read: (TMSK2) Write: See page 139. Reset: OC1I 0 OC1F 0 TOI 0
$1022
$1023
$1024
U = Unaffected
Memory Map Addr. $1025 Register Name Timer Interrupt Flag 2 (TFLG2) Write: See page 142. Reset: Read: Bit 7 TOF 0 6 RTIF 0 PAEN 0 Bit 6 5 PAOVF 0 PAMOD 0 Bit 5 4 PAIF 0 PEDGE 0 Bit 4 0 DDRA3 0 Bit 3 0 I4/O5 0 Bit 2 0 RTR1 0 Bit 1 0 RTR0 0 Bit 0 3 2 1 Bit 0
$1026
Pulse Accumulator Control Regis- Read: DDRA7 ter (PACTL) Write: See page 142. Reset: 0 Pulse Accumulator Count Regis- Read: ter (PACNT) Write: See page 146. Reset: Bit 7
$1027
Indeterminate after reset SPIE 0 SPIF 0 Bit 7 SPE 0 WCOL 0 Bit 6 0 Bit 5 DWOM 0 MSTR 0 MODF 0 Bit 4 0 Bit 3 0 Bit 2 0 Bit 1 0 Bit 0 CPOL 0 CPHA 1 SPR1 U SPR0 U
Serial Peripheral Control Register Read: $1028 (SPCR) Write: See page 123. Reset: $1029 Serial Peripheral Status Register (SPSR) Write: See page 124. Reset: Read:
$102A
Serial Peripheral Data I/O Regis- Read: ter (SPDR) Write: See page 125. Reset: Baud Rate Register Read: (BAUD) Write: See page 113. Reset: Serial Communications Control Read: Register 1 (SCCR1) Write: See page 110. Reset: Serial Communications Control Register 2 (SCCR2) Write: See page 111. Reset: Read:
Indeterminate after reset TCLR 0 R8 I TIE 0 TDRE 1 SCP2(1) 0 T8 I TCIE 0 TC 1 0 RIE 0 RDRF 0 SCP1 0 SCP0 0 M 0 ILIE 0 IDLE 0 RCKB 0 WAKE 0 TE 0 OR 0 0 RE 0 NF 0 0 RWU 0 FE 0 0 0 SBK 0 SCR2 U SCR1 U SCR0 U
$102B
$102C
$102D
$102E
Serial Communications Status Read: Register (SCSR) Write: See page 112. Reset: Serial Communications Data Reg- Read: ister (SCDR) Write: See page 110. Reset: Analog-to-Digital Control Status Read: Register (ADCTL) Write: See page 62. Reset:
1. SCP2 adds 39 to SCI prescaler and is present only in MC68HC(7)11E20. $102F R7/T7 R6/T6 R5/T5 R4/T4 R3/T3 R2/T2 R1/T1 R0/T0
Indeterminate after reset CCF 0 0 = Unimplemented I = Indeterminate after reset R SCAN MULT CD CC CB CA
$1030
Operating Modes and On-Chip Memory Addr. $1031 Register Name Analog-to-Digital Results Register 1 (ADR1) Write: See page 64. Reset: Read: Bit 7 Bit 7 6 Bit 6 5 Bit 5 4 Bit 4 3 Bit 3 2 Bit 2 1 Bit 1 Bit 0 Bit 0
Indeterminate after reset Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
$1032
Analog-to-Digital Results Read: Register 2 (ADR2) Write: See page 64. Reset: Analog-to-Digital Results Read: Register 3 (ADR3) Write: See page 64. Reset: Analog-to-Digital Results Read: Register 4 (ADR4) Write: See page 64. Reset: Block Protect Register (BPROT) Write: See page 52. Reset: Read:
Indeterminate after reset Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
$1033
Indeterminate after reset Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
$1034
Indeterminate after reset PTCON 0 MBE 0 R 0 R 0 0 ELAT 0 R 1 EXCOL 0 R BPRT3 1 EXROW 0 R BPRT2 1 T1 0 R BPRT1 1 T0 0 R BPRT0 1 PGM 0 R
$1035
$1036 $1037
EPROM Programming Control Read: Register (EPROG)(1) Write: See page 53. Reset: Reserved
1. MC68HC711E20 only $1038 Reserved System Configuration Options Read: Register (OPTION) Write: See page 46. Reset: Arm/Reset COP Timer Circuitry Read: Register (COPRST) Write: See page 81. Reset: EPROM and EEPROM Program- Read: ming Control Register (PPROG) Write: See page 49. Reset: Read: R R R R R R R R
$1039
CME 0 Bit 3 0 ROW 0 PSEL3 0 REG3 0 = Reserved 0 Bit 2 0 ERASE 0 PSEL2 1 REG2 0
$103A
$103B
$103C
Highest Priority I Bit Interrupt and RBOOT Miscellaneous Register (HPRIO) Write: See page 41. Reset: 0 RAM and I/O Mapping Register Read: (INIT) Write: See page 45. Reset: RAM3 0
$103D
U = Unaffected
Memory Map Addr. $103E Register Name Reserved System Configuration Register Read: (CONFIG) Write: See page 43. Reset: System Configuration Register Read: (CONFIG)(3) Write: See page 43. Reset: Bit 7 R 6 R 5 R 4 R 3 R 2 R 1 R Bit 0 R
$103F
NOCOP U NOCOP U
ROMON 1
EEON U EEON
$103F
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 3. MC68HC811E2 only = Unimplemented I = Indeterminate after reset R = Reserved U = Unaffected
Figure 2-8. RAM Standby MODB/VSTBY Connections The bootloader program is contained in the internal bootstrap 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 ROMON bit in the CONFIG register is set. ROM or EPROM is enabled out of reset 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 MC68HC811E2, EEPROM is located at $F800$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 2.3.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, allowing EEPROM changes using the single VDD supply.
Memory Map
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 Chapter 5 Resets and Interrupts.
Address: Bit 7 Read: Write: Resets: Single chip: Expanded: Bootstrap: Test: 0 0 1 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 RBOOT(1) $103C 6 SMOD(1) 5 MDA(1) 4 IRV(NE)(1) 3 PSEL3 2 PSEL2 1 PSEL1 Bit 0 PSEL0
1. The reset values depend on the mode selected at the RESET pin rising edge.
Figure 2-9. Highest Priority I-Bit Interrupt and Miscellaneous Register (HPRIO) RBOOT Read Bootstrap ROM Bit Valid only when SMOD is set (bootstrap or special test mode); can 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 Select 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.
Input Mode MODB 1 1 MODA 0 1 Single chip Expanded SMOD 0 0 MDA 0 1 Latched at Reset
IRV(NE) Internal Read Visibility (Not E) Bit IRVNE can be written once in any mode. In expanded modes, IRVNE 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 MC68HC811E2, this bit has no meaning 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 chip Expanded Bootstrap Special test IRVNE Out of Reset 0 0 0 1 E Clock Out of Reset On On On On IRV Out of Reset Off Off Off On IRVNE Affects Only E IRV E IRV IRVNE Can Be Written Once Once Once Once
Memory Map
2.3.3.1 System Configuration Register The system configuration register (CONFIG) consists of an EEPROM byte and static latches that control the startup configuration of the MCU. The contents of the EEPROM byte are transferred into static working latches during reset sequences. The operation of the MCU is controlled 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 sequence. When programming, the CONFIG register itself is accessed. When the CONFIG register is read, the static latches are accessed. See 2.5.1 EEPROM and CONFIG Programming and Erasure for information on modifying CONFIG. To take full advantage of the MCUs 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, Freescale application note AN1060 entitled M68HC11 Bootstrap Mode 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 Freescale Web site at http://www.freescale.com. For more information on using PCbug11 to program an E-series device, Freescale engineering 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 2-10 and Figure 2-11.
Address: $103F Bit 7 Read: Write: Resets: Single chip: Bootstrap: Expanded: Test: 0 0 0 0 0 0 0 0 = 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. 0 0 0 0 0 0 0 0 U U 1 1 U U(L) U U(L) 1 U U U U U U U 6 5 4 3 NOSEC 2 NOCOP 1 ROMON Bit 0 EEON
$103F Bit 7 EE3 6 EE2 5 EE1 4 EE0 3 NOSEC 2 NOCOP 1 Bit 0 EEON
1 1 U U
1 1 U U = Unimplemented
1 1 U U
1 1 U U
U U 1 1
U U(L) U U(L)
1 1 1 1
1 1 U 0
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 2-11. MC68HC811E2 System Configuration Register (CONFIG) 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 2-3. Table 2-3. EEPROM Mapping
EE[3:0] 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 EEPROM Location $0800$0FFF $1800$1FFF $2800$2FFF $3800$3FFF $4800$4FFF $5800$5FFF $6800$6FFF $7800$7FFF $8800$8FFF $9800$9FFF $A800$AFFF $B800$BFFF $C800$CFFF $D800$DFFF $E800$EFFF $F800$FFFF
Memory Map
NOSEC Security Disable Bit NOSEC is invalid unless the security mask option is specified before the MCU is manufactured. If the security mask option is omitted NOSEC always reads 1. The enhanced security feature is available in the MC68S711E9 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 Chapter 5 Resets and Interrupts. 1 = COP disabled 0 = COP enabled ROMON ROM/EPROM/OTPROM Enable Bit When this bit is 0, the ROM or EPROM is disabled and that memory space becomes externally addressed. In single-chip mode, ROMON 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 2.3.3.2 RAM and I/O Mapping Register The internal registers used to control the operation of the MCU can be relocated on 4-Kbyte boundaries 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 within the first 64 E-clock cycles after a reset in normal modes, and then it becomes a read-only register.
Address: $103D Bit 7 Read: Write: Reset: RAM3 0 6 RAM2 0 5 RAM1 0 4 RAM0 0 3 REG3 0 2 REG2 0 1 REG1 0 Bit 0 REG0 1
Figure 2-12. RAM and I/O Mapping Register (INIT) RAM[3:0] RAM Map Position Bits These four bits, which specify the upper hexadecimal digit of the RAM address, control position of RAM in the memory map. RAM can be positioned at the beginning of any 4-Kbyte page in the memory map. It is initialized to address $0000 out of reset. Refer to Table 2-4. REG[3:0] 64-Byte Register Block Position These four bits specify the upper hexadecimal digit of the address for the 64-byte block of internal registers. The register block, positioned at the beginning of any 4-Kbyte page in the memory map, is initialized to address $1000 out of reset. Refer to Table 2-5.
2.3.3.3 System Configuration Options Register The 8-bit, special-purpose system configuration options register (OPTION) sets internal system configuration options during initialization. The time protected control bits, IRQE, DLY, and CR[1:0], can be written only once after a reset and then they become read-only. This minimizes the possibility of any accidental changes to the system configuration.
Address: $1039 Bit 7 Read: Write: Reset: ADPU 0 6 CSEL 0 5 IRQE(1) 0 4 DLY(1) 1 3 CME 0 0 2 1 CR1(1) 0 Bit 0 CR0(1) 0
1. Can be written only once in first 64 cycles out of reset in normal modes or at any time during special modes. = Unimplemented
Figure 2-13. System Configuration Options Register (OPTION) ADPU Analog-to-Digital Converter Power-Up Bit Refer to Chapter 3 Analog-to-Digital (A/D) Converter. CSEL Clock Select Bit Selects alternate clock source for on-chip EEPROM charge pump. Refer to 2.5.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 Chapter 3 Analog-to-Digital (A/D) Converter.
EPROM/OTPROM
IRQE Configure IRQ for Edge-Sensitive Only Operation Bit Refer to Chapter 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 processing within about four bus cycles. 1 = A delay of approximately 4000 E-clock cycles is imposed as the MCU is started up from the stop power-saving mode. This delay allows the crystal oscillator to stabilize. CME Clock Monitor Enable Bit Refer to Chapter 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 Chapter 5 Resets and Interrupts.
2.4 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 MC68HC71E9 and MC68HC711E20 devices are shipped with the EPROM/OTPROM contents erased (all 1s). The programming operation programs zeros. Windowed devices must be erased using a suitable ultraviolet light source before reprogramming. Depending on 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 (VPPE). Normal programming is accomplished using the EPROM/OTPROM programming register (PPROG). PPROG is the combined EPROM/OTPROM and EEPROM programming register on all devices with EPROM/OTPROM except the MC68HC711E20. For the MC68HC711E20, there is a separate register for EPROM/OTPROM programming called the EPROG register. As described in the following subsections, these two methods of programming and verifying EPROM are possible: 1. Programming an individual EPROM address 2. Programming the EPROM with downloaded data
EPROM/OTPROM
1. MC68HC711E9 only
Figure 2-14. EPROM and EEPROM Programming Control Register (PPROG) ODD Program Odd Rows in Half of EEPROM (Test) Bit Refer to 2.5 EEPROM. EVEN Program Even Rows in Half of EEPROM (Test) Bit Refer to 2.5 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 written 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 the 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 2.5 EEPROM. ROW Row/All EEPROM Erase Mode Bit Refer to 2.5 EEPROM. ERASE Erase Mode Select Bit Refer to 2.5 EEPROM. EELAT EEPROM Latch Control Bit Refer to 2.5 EEPROM. EPGM EPROM/OTPROM/EEPROM Programming Voltage Enable Bit EPGM can be read any time and 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
M68HC11E Family Data Sheet, Rev. 5.1 Freescale Semiconductor 49
Address: $1036 Bit 7 Read: Write: Reset: MBE 0 0 = Unimplemented 6 5 ELAT 0 4 EXCOL 0 3 EXROW 0 2 T1 0 1 T0 0 Bit 0 PGM 0
Figure 2-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 dont 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 0 in normal modes. MBE can be written 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 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/OTPROM address and data bus configured for normal reads 1 = EPROM/OTPROM address and data bus configured for programming EXCOL Select Extra Columns Bit 0 = User array selected 1 = User array is disabled and extra columns are accessed at bits [7:0]. Addresses use bits [13:5] and bits [4:0] are dont 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 selected 1 = User array is disabled and two extra rows are available. Addresses use bits [7:0] and bits [13:8] are dont 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.
T1 0 0 1 1 T0 0 1 0 1 Function Selected Normal mode Reserved Gate stress Drain stress
EEPROM
PGM EPROM Programming Voltage Enable Bit 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
2.5 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.
Address: $1035 Bit 7 Read: Write: Reset: 0 0 = Unimplemented 0 6 5 4 PTCON 1 3 BPRT3 1 2 BPRT2 1 1 BPRT1 1 Bit 0 BPRT0 1
Figure 2-16. Block Protect Register (BPROT) Bits [7:5] Unimplemented Always read 0 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 2-6 and Table 2-7. When cleared, BPRT[3:0] allow programming and erasure of the associated block. Table 2-6. EEPROM Block Protect
Bit Name BPRT0 BPRT1 BPRT2 BPRT3 Block Protected $B600$B61F $B620$B65F $B660$B6DF $B6E0$B7FF Block Size 32 bytes 64 bytes 128 bytes 288 bytes
EEPROM
2.5.1.2 EPROM and EEPROM Programming Control Register The EPROM and EEPROM programming control register (PPROG) selects and controls the EEPROM programming function. Bits in PPROG enable the programming voltage, control the latching of data to be programmed, and select the method of erasure (for example, byte, row, etc.).
Address: $103B Bit 7 Read: Write: Reset: ODD 0 6 EVEN 5 ELAT(1) 4 BYTE 3 ROW 2 ERASE 1 EELAT Bit 0 EPGM
1. MC68HC711E9 only
Figure 2-17. EPROM and EEPROM Programming Control Register (PPROG) ODD Program Odd Rows in Half of EEPROM (Test) Bit EVEN Program Even Rows in Half of EEPROM (Test) Bit ELAT EPROM/OTPROM Latch Control Bit For the MC68HC711E9, EPGM enables the high voltage necessary for both EPROM/OTPROM and EEPROM programming. For MC68HC711E9, ELAT and EELAT are mutually exclusive and cannot both equal 1. 0 = EPROM address and data bus configured for normal reads 1 = EPROM address and data bus configured for programming BYTE Byte/Other EEPROM Erase Mode Bit This bit overrides the ROW bit. 0 = Row or bulk erase 1 = Erase only one byte ROW Row/All EEPROM Erase Mode Bit If BYTE is 1, ROW has no meaning. 0 = Bulk erase 1 = Row erase Table 2-8. EEPROM Erase
BYTE 0 0 1 1 ROW 0 1 0 1 Action Bulk erase (entire array) Row erase (16 bytes) Byte erase Byte erase
ERASE Erase Mode Select Bit 0 = Normal read or program mode 1 = Erase mode EELAT EEPROM Latch Control Bit 0 = EEPROM address and data bus configured for normal reads and cannot be programmed 1 = EEPROM address and data bus configured for programming or erasing and cannot be read
EPGM EPROM/OTPROM/EEPROM Programming Voltage Enable Bit 0 = Programming voltage to EEPROM array switched off 1 = Programming voltage to EEPROM array switched on During EEPROM programming, the ROW and BYTE bits of PPROG are not used. If the frequency of the E clock is 1 MHz or less, set the CSEL bit in the OPTION register. Recall that 0s must be erased by a separate erase operation before programming. The following examples of how to program an EEPROM byte assume that the appropriate bits in BPROT are cleared.
PROG LDAB STAB STAA LDAB STAB JSR CLR #$02 $103B $XXXX #$03 $103B DLY10 $103B EELAT = 1 Set EELAT bit Store data to EEPROM address (for valid EEPROM address see memory map for each device) EELAT = 1, EPGM = 1 Turn on programming voltage Delay 10 ms Turn off high voltage and set to READ mode
2.5.1.3 EEPROM Bulk Erase This is an example of how to bulk erase the entire EEPROM. The CONFIG register is not affected in this example.
BULKE LDAB STAB STAA LDAB STAB JSR CLR #$06 $103B $XXXX #$07 $103B DLY10 $103B EELAT = 1, ERASE = 1 Set to BULK erase mode Store data to any EEPROM address (for valid EEPROM address see memory map for each device) EELAT = 1, EPGM = 1, ERASE = 1 Turn on high voltage Delay 10 ms Turn off high voltage and set to READ mode
2.5.1.4 EEPROM Row Erase This example shows how to perform a fast erase of large sections of EEPROM.
ROWE LDAB STAB STAB LDAB STAB JSR CLR #$0E $103B 0,X #$0F $103B DLY10 $103B ROW = 1, ERASE = 1, EELAT = 1 Set to ROW erase mode Write any data to any address in ROW ROW = 1, ERASE = 1, EELAT = 1, EPGM = 1 Turn on high voltage Delay 10 ms Turn off high voltage and set to READ mode
EEPROM
2.5.1.5 EEPROM Byte Erase This is an example of how to erase a single byte of EEPROM.
BYTEE LDAB STAB STAB LDAB STAB JSR CLR #$16 $103B 0,X #$17 $103B DLY10 $103B BYTE = 1, ERASE = 1, EELAT = 1 Set to BYTE erase mode Write any data to address to be erased BYTE = 1, ERASE = 1, EELAT = 1, EPGM = 1 Turn on high voltage Delay 10 ms Turn off high voltage and set to READ mode
2.5.1.6 CONFIG Register Programming Because the CONFIG register is implemented with EEPROM cells, use EEPROM procedures to erase and program this register. The procedure for programming is the same as for programming a byte in the EEPROM array, except that the CONFIG register address is used. CONFIG can be programmed or erased (including byte erase) while the MCU is operating in any mode, provided that PTCON in BPROT is clear. To change the value in the CONFIG register, complete this procedure. 1. Erase the CONFIG register. 2. Program the new value to the CONFIG address. 3. Initiate reset. NOTE Do not initiate a reset until the procedure is complete.
3.2 Overview
The A/D system is an 8-channel, 8-bit, multiplexed-input converter. The converter does not require external sample and hold circuits because of the type of charge redistribution technique used. A/D converter timing can be synchronized to the system E clock or to an internal resistor capacitor (RC) oscillator. The A/D converter system consists of four functional blocks: multiplexer, analog converter, digital control, and result storage. Refer to Figure 3-1.
3.2.1 Multiplexer
The multiplexer selects one of 16 inputs for conversion. Input selection is controlled by the value of bits CD:CA in the ADCTL register. The eight port E pins are fixed-direction analog inputs to the multiplexer, and additional internal analog signal lines are routed to it. Port E pins also can be used as digital inputs. Digital reads of port E pins are not recommended during the sample portion of an A/D conversion cycle, when the gate signal to the N-channel input gate is on. Because no P-channel devices are directly connected to either input pins or reference voltage pins, voltages above VDD do not cause a latchup problem, although current should be limited according to maximum ratings. Refer to Figure 3-2, which is a functional diagram of an input pin.
PE0 AN0 PE1 AN1 PE2 AN2 PE3 AN3 PE4 AN4 PE5 AN5 PE6 AN6 PE7 AN7
ANALOG MUX
RESULT
INTERNAL DATA BUS SCAN MULT CD CC CB CA ADCTL A/D CONTROL ADR4 A/D RESULT 4 DIFFUSION/POLY COUPLER + ~20 V ~0.7 V + ~12V ~0.7V
DUMMY N-CHANNEL OUTPUT DEVICE
CCF
*
~ 20 pF DAC CAPACITANCE
< 2 pF
VRL
* THIS ANALOG SWITCH IS CLOSED ONLY DURING THE 12-CYCLE SAMPLE TIME.
Overview
32
64
96
128 E CYCLES
SET CC FLAG
1. Can be written only once in first 64 cycles out of reset in normal modes or at any time in special modes
Figure 3-4. System Configuration Options Register (OPTION) ADPU A/D Power-Up Bit 0 = A/D powered down 1 = A/D powered up CSEL Clock Select Bit 0 = A/D and EEPROM use system E clock. 1 = A/D and EEPROM use internal RC clock. IRQE Configure IRQ for Edge-Sensitive Only Operation Refer to Chapter 5 Resets and Interrupts. DLY Enable Oscillator Startup Delay Bit 0 = The oscillator startup delay coming out of stop is bypassed and the MCU resumes processing within about four bus cycles. 1 = A delay of approximately 4000 E-clock cycles is imposed as the MCU is started up from the stop power-saving mode. This delay allows the crystal oscillator to stabilize. CME Clock Monitor Enable Bit Refer to Chapter 5 Resets and Interrupts. Bit 2 Not implemented Always reads 0 CR[1:0] COP Timer Rate Select Bits Refer to Chapter 5 Resets and Interrupts and Chapter 9 Timing Systems.
Conversion Process
Figure 3-5. A/D Control/Status Register (ADCTL) CCF Conversion Complete Flag A read-only status indicator, this bit is set when all four A/D result registers contain valid conversion results. Each time the ADCTL register is overwritten, this bit is automatically cleared to 0 and a conversion sequence is started. In the continuous mode, CCF is set at the end of the first conversion sequence. Bit 6 Unimplemented Always reads 0 SCAN Continuous Scan Control Bit
When this control bit is clear, the four requested conversions are performed once to fill the four result registers. When this control bit is set, conversions are performed continuously with the result registers updated as data becomes available. MULT Multiple Channel/Single Channel Control Bit When this bit is clear, the A/D converter system is configured to perform four consecutive conversions on the single channel specified by the four channel select bits CD:CA (bits [3:0] of the ADCTL register). When this bit is set, the A/D system is configured to perform a conversion on each of four channels where each result register corresponds to one channel. NOTE When the multiple-channel continuous scan mode is used, extra care is needed in the design of circuitry driving the A/D inputs. The charge on the capacitive DAC array before the sample time is related to the voltage on the previously converted channel. A charge share situation exists between the internal DAC capacitance and the external circuit capacitance. Although the amount of charge involved is small, the rate at which it is repeated is every 64 s for an E clock of 2 MHz. The RC charging rate of the external circuit must be balanced against this charge sharing effect to avoid errors in accuracy. Refer to M68HC11 Reference Manual, Freescale document order number M68HC11RM/AD, for further information. CD:CA Channel Selects D:A Bits Refer to Table 3-2. When a multiple channel mode is selected (MULT = 1), the two least significant channel select bits (CB and CA) have no meaning and the CD and CC bits specify which group of four channels is to be converted. Table 3-2. A/D Converter Channel Selection
Channel Select Control Bits CD:CC:CB:CA 0000 0001 0010 0011 0100 0101 0110 0111 10XX 1100 1101 1110 1111 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 Reserved VRH(1) VRL(1) (VRH)/2(1) Reserved(1) Channel Signal Result in ADRx if MULT = 1 ADR1 ADR2 ADR3 ADR4 ADR1 ADR2 ADR3 ADR4 ADR1 ADR2 ADR3 ADR4
CARRY/BORROW FROM MSB OVERFLOW ZERO NEGATIVE I-INTERRUPT MASK HALF CARRY (FROM BIT 3) X-INTERRUPT MASK STOP DISABLE
CPU Registers
At the end of the interrupt service routine, an return-from interrupt (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. 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 ensures that the contents of a register will be the same after returning from the subroutine as it was before starting the subroutine.
JSR, JUMP TO SUBROUTINE MAIN PROGRAM
DIRECT
STACK CCR ACCB ACCA IXH IXL IYH IYL RTNH RTNL STACK CCR ACCB ACCA IXH IXL IYH IYL RTNH RTNL
PC
$3B = RTI
INDEXED, X
PC
SP2
SP1 SP
INDEXED, Y
$18 = PRE $AD = JSR RTN ff NEXT MAIN INSTR. MAIN PROGRAM
PC
SP+9
SWI, SOFTWARE INTERRUPT MAIN PROGRAM
PC 7
$3F = SWI
SP9
SP8 SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP
INDEXED, Y
PC
$3E = WAI
$8D = BSR
SP2
SP1 SP
LEGEND:
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 (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 RELATIVE OFFSET $80 (128) TO $7F (+127) (OFFSET RELATIVE TO THE ADDRESS FOLLOWING THE MACHINE CODE OFFSET BYTE)
7 SP SP+1
$39 = RTS
SP+2
Data Types
4.2.6.5 Interrupt Mask (I) The interrupt request (IRQ) mask (I bit) is a global mask that disables all maskable interrupt sources. While the I bit is set, interrupts can become pending, but the operation of the CPU continues uninterrupted until the I bit is cleared. After any reset, the I bit is set by default and can only be cleared by a software instruction. When an interrupt is recognized, the I bit is set after the registers are stacked, but before the interrupt vector is fetched. After the interrupt has been serviced, a return-from-interrupt instruction is normally executed, restoring the registers 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 service routine, "nesting" interrupts in this way should only be done when there is a clear understanding of latency and of the arbitration mechanism. Refer to Chapter 5 Resets and Interrupts. 4.2.6.6 Half Carry (H) The H bit is set when a carry occurs between bits 3 and 4 of the arithmetic logic unit during an ADD, ABA, or ADC instruction. Otherwise, the H bit is cleared. Half carry is used during BCD operations. 4.2.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 before the interrupt vector is fetched. After 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 hardware (RESET or XIRQ acknowledge). X is cleared only by program 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 cleared). There is no hardware action for clearing X. 4.2.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.
4.5.1 Immediate
In the immediate addressing mode, an argument is contained in the byte(s) immediately following the opcode. The number 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 instructions. The effective address is the address of the byte following the instruction.
4.5.2 Direct
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 eliminating the additional memory access 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 configured for combinations of internal registers, RAM, or external memory to occupy these addresses.
Instruction Set
4.5.3 Extended
In the extended addressing mode, the effective address of the argument 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.
4.5.4 Indexed
In the indexed addressing mode, an 8-bit unsigned offset contained in the instruction is added to the value contained in an index register (IX or IY). The sum is the effective address. This addressing mode allows referencing any memory location in the 64-Kbyte address space. These are 2- to 5-byte instructions, depending on whether or not a prebyte is required.
4.5.5 Inherent
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.
4.5.6 Relative
The relative addressing mode is used only for branch instructions. If the branch condition is true, an 8-bit signed offset included in the instruction 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.
18
ADCB (opr)
B+M+CB
ADDA (opr)
Add Memory to A
A+MA
ADDB (opr)
Add Memory to B
B+MB
A A A A A B B B B B A A A A A B B B B B
18
18
18
18
ADDD (opr)
Add 16-Bit to D
D + (M : M + 1) D
18
ANDA (opr)
AMA
ANDB (opr)
BMB
A A A A A B B B B B
0
18
18
ASL (opr)
18
3A 3A 89 99 B9 A9 A9 C9 D9 F9 E9 E9 8B 9B BB AB AB CB DB FB EB EB C3 D3 F3 E3 E3 84 94 B4 A4 A4 C4 D4 F4 E4 E4 78 68 68 48
ll
ll
ll
ll
kk ll
ll
ll
ll
ASLA
A
0
ASLB
B
0
INH
58
ASLD
INH
0
05
ASR
ASRA
18
77 67 67 47
hh ff ff
ll
6 6 7 2
ASRB
INH
57
BCC (rel) BCLR (opr) (msk) BCS (rel) BEQ (rel) BGE (rel)
?C=0 M (mm) M
24 15 1D 1D 25 27 2C
rr dd ff ff rr rr rr mm mm mm
3 6 7 8 3 3 3
18
Instruction Set
ll
18
BITB (opr)
BM
ll
18
BLE (rel) BLO (rel) BLS (rel) BLT (rel) BMI (rel) BNE (rel) BPL (rel) BRA (rel) BRCLR(opr) (msk) (rel)
Branch if Zero Branch if Lower Branch if Lower or Same Branch if < Zero Branch if Minus Branch if not = Zero Branch if Plus Branch Always Branch if Bit(s) Clear
mm mm mm
18
?1=0 ? (M) mm = 0
18
21 12 1E 1E
mm mm mm mm mm mm
3 6 7 8
BSET (opr) (msk) BSR (rel) BVC (rel) BVS (rel) CBA CLC CLI CLR (opr)
Set Bit(s)
M + mm M
Branch to Subroutine Branch if Overflow Clear Branch if Overflow Set Compare A to B Clear Carry Bit Clear Interrupt Mask Clear Memory Byte Clear Accumulator A Clear Accumulator B Clear Overflow Flag Compare A to Memory
DIR IND,X IND,Y REL REL REL INH INH INH EXT IND,X IND,Y INH INH INH IMM DIR EXT IND,X IND,Y
18
14 1C 1C 8D 28 29 11 0C 0E 7F 6F 6F 4F 5F 0A 81 91 B1 A1 A1
6 7 8 6 3 3 2 2 2 6 6 7 2 2 2 2 3 4 4 5
0 0
18
A B
ii dd hh ff ff
0 0
1 1
0 0 0
0 0
ll
18
COM (opr)
COMA
COMB
CPD (opr)
Ones Complement Memory Byte Ones Complement A Ones Complement B Compare D to Memory 16-Bit
INH
53
DM:M +1
CPX (opr)
IX M : M + 1
CPY (opr)
IY M : M + 1
Decimal Adjust A Decrement Memory Byte Decrement Accumulator A Decrement Accumulator B Decrement Stack Pointer Decrement Index Register X Decrement Index Register Y Exclusive OR A with Memory
IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y INH EXT IND,X IND,Y INH
1A 1A 1A 1A CD
CD 18 18 18 1A 18
83 93 B3 A3 A3 8C 9C BC AC AC 8C 9C BC AC AC 19 7A 6A 6A 4A
jj dd hh ff ff jj dd hh ff ff jj dd hh ff ff
kk ll
kk ll
kk ll
hh ff ff ll
5 6 7 7 7 4 5 6 6 7 5 6 7 7 7 2 6 6 7 2
18
DECA
DECB
INH
5A
DES DEX
INH INH
34 09
3 3
DEY
INH
18
09
EORA (opr)
EORB (opr)
BMB
A A A A A B B B B B
IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y INH INH EXT IND,X IND,Y INH
18
18
88 98 B8 A8 A8 C8 D8 F8 E8 E8 03 02 7C 6C 6C 4C
ii dd hh ff ff ii dd hh ff ff
ll
ll
hh ff ff ll
2 3 4 4 5 2 3 4 4 5 41 41 6 6 7 2
18
INCA
Instruction Set
INS INX
INH INH
31 08
3 3
INY
INH
18
08
JMP (opr)
See Figure 32
JSR (opr)
Jump to Subroutine
See Figure 32
LDAA (opr)
Load Accumulator A
MA
LDAB (opr)
Load Accumulator B
MB
A A A A A B B B B B
LDD (opr)
M A,M + 1 B
LDS (opr)
M : M + 1 SP
LDX (opr)
M : M + 1 IX
LDY (opr)
M : M + 1 IY
LSL (opr)
LSLA
A
0
EXT IND,X IND,Y DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y EXT IND,X IND,Y INH
18
18
18
18
18
18
CD 18 18 18 1A 18
18
7E 6E 6E 9D BD AD AD 86 96 B6 A6 A6 C6 D6 F6 E6 E6 CC DC FC EC EC 8E 9E BE AE AE CE DE FE EE EE CE DE FE EE EE 78 68 68 48
hh ff ff dd hh ff ff ii dd hh ff ff ii dd hh ff ff jj dd hh ff ff jj dd hh ff ff jj dd hh ff ff jj dd hh ff ff hh ff ff
ll
ll
ll
ll
kk ll
kk ll
kk ll
kk ll
ll
3 3 4 5 6 6 7 2 3 4 4 5 2 3 4 4 5 3 4 5 5 6 3 4 5 5 6 3 4 5 5 6 4 5 6 6 6 6 6 7 2
LSLB
B
0
INH
58
LSLD
INH
0
05
LSR (opr)
b7
b0 C
LSRA
A
0 b7 b0 C
18
74 64 64 44
hh ff ff
ll
6 6 7 2
LSRB
B
0 b7 b0 C
INH
54
b7 A b0 b7 B b0 C
NEGA
18
3D 70 60 60 40
hh ff ff
ll
10 6 6 7 2
NEGB
INH
50
ORAB (opr)
OR Accumulator B (Inclusive)
PSHY
PULY
ROL (opr)
Push A onto Stack Push B onto Stack Push X onto Stack (Lo First) Push Y onto Stack (Lo First) Pull A from Stack Pull B from Stack Pull X From Stack (Hi First) Pull Y from Stack (Hi First) Rotate Left
No Operation A+MA
INH IMM DIR EXT IND,X IND,Y IMM DIR EXT IND,X IND,Y INH INH INH
18
18
01 8A 9A BA AA AA CA DA FA EA EA 36 37 3C
ii dd hh ff ff ii dd hh ff ff
ll
ll
2 2 3 4 4 5 2 3 4 4 5 3 3 4
INH
18
3C
32 33 38
4 4 5
INH
18
38
b7
b0
ROLA
Rotate Left A
C b7 b0
18
79 69 69 49
hh ff ff
ll
6 6 7 2
ROLB
Rotate Left B
C b7 b0
INH
59
ROR (opr)
Rotate Right
b7 b0 C
RORA
Rotate Right A
b7 b0 C
18
76 66 66 46
hh ff ff
ll
6 6 7 2
RORB
Rotate Right B
b7 b0 C
INH
56
3B 39 10
12 5 2
Instruction Set
SBCB (opr)
BMCB
Set Carry Set Interrupt Mask Set Overflow Flag Store Accumulator A Store Accumulator B Store Accumulator D Stop Internal Clocks Store Stack Pointer
1C 1I 1V AM
1 0
ll
18
STAB (opr)
BM
ll
18
STD (opr)
A M, B M + 1
ll
18
SP M : M + 1
dd hh ff ff dd hh ff ff dd hh ff ff ii dd hh ff ff ii dd hh ff ff jj dd hh ff ff
ll
18
STX (opr)
IX M : M + 1
ll
STY (opr)
IY M : M + 1
CD 18 18 1A 18
ll
SUBA (opr)
AMA
SUBB (opr)
BMB
A A A A A A A A A A
ll
18
ll
18
SUBD (opr)
DM:M+1D
kk ll
18
Software Interrupt Transfer A to B Transfer A to CC Register Transfer B to A TEST (Only in Test Modes) Transfer CC Register to A Test for Zero or Minus
ll
0 0 0
18
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 (twos complement) Condition Codes Bit not changed 0 Bit always cleared 1 Bit always set Bit cleared or set, depending on operation Bit can be cleared, cannot become set
5.2 Resets
The four possible sources of reset are: Power-on reset (POR) External reset (RESET) Computer operating properly (COP) reset Clock monitor reset POR and RESET share the normal reset vector. COP reset and the clock monitor reset each has its own vector.
Resets Address Read: Write: Reset: $103A Bit 7 BIT 7 0 6 BIT 6 5 BIT 5 4 BIT 4 3 BIT 3 2 BIT 2 1 BIT 1 Bit 0 BIT 0
Figure 5-1. Arm/Reset COP Timer Circuitry Register (COPRST) Complete this 2-step reset sequence to service the COP timer: 1. Write $55 to COPRST to arm the COP timer clearing mechanism. 2. Write $AA to COPRST to clear the COP timer. Performing instructions between these two steps is possible as long as both steps are completed in the correct sequence before the timer times out.
0
= Unimplemented
1. Can be written only once in first 64 cycles out of reset in normal mode or at any time in special modes
Figure 5-2. System Configuration Options Register (OPTION) ADPU Analog-to-Digital Converter Power-Up Bit Refer to Chapter 3 Analog-to-Digital (A/D) Converter. CSEL Clock Select Bit Refer to Chapter 3 Analog-to-Digital (A/D) Converter. IRQE Configure IRQ for Edge-Sensitive-Only Operation Bit 0 = IRQ is configured for level-sensitive operation. 1 = IRQ is configured for edge-sensitive-only operation. DLY Enable Oscillator Startup Delay Bit Refer to Chapter 2 Operating Modes and On-Chip Memory and Chapter 3 Analog-to-Digital (A/D) Converter. CME Clock Monitor Enable Bit This control bit can be read or written at any time and controls whether or not the internal clock monitor circuit triggers a reset sequence when the system clock is slow or absent. When it is clear, the clock monitor circuit is disabled, and when it is set, the clock monitor circuit is enabled. Reset clears the CME bit. 0 = Clock monitor circuit disabled 1 = Slow or stopped clocks cause reset Bit 2 Unimplemented Always reads 0 CR[1:0] COP Timer Rate Select Bit The internal E clock is first divided by 215 before it enters the COP watchdog system. These control bits determine a scaling factor for the watchdog timer. See Table 5-1 for specific timeout settings.
Effects of Reset
Figure 5-3. Configuration Control Register (CONFIG) EE[3:0] EEPROM Mapping Bits EE[3:0] apply only to MC68HC811E2. Refer to Chapter 2 Operating Modes and On-Chip Memory. NOSEC Security Mode Disable Bit Refer to Chapter 2 Operating Modes and On-Chip Memory. NOCOP COP System Disable Bit 0 = COP enabled (forces reset on timeout) 1 = COP disabled (does not force reset on timeout) ROMON ROM (EPROM) Enable Bit Refer to Chapter 2 Operating Modes and On-Chip Memory. EEON EEPROM Enable Bit Refer to Chapter 2 Operating Modes and On-Chip Memory.
These initial states then control on-chip peripheral systems to force them to known startup states, as described in the following subsections.
5.3.3 Timer
During reset, the timer system is initialized to a count of $0000. The prescaler bits are cleared, and all output compare registers are initialized to $FFFF. All input capture registers are indeterminate after reset. The output compare 1 mask (OC1M) register is cleared so that successful OC1 compares do not affect any I/O pins. The other four output compares are configured so that they do not affect any I/O pins on successful compares. All input capture edge-detector circuits are configured for capture disabled operation. The timer overflow interrupt flag and all eight timer function interrupt flags are cleared. All nine timer interrupts are disabled because their mask bits have been cleared. The I4/O5 bit in the PACTL register is cleared to configure the I4/O5 function as OC5; however, the OM5:OL5 control bits in the TCTL1 register are clear so OC5 does not control the PA3 pin.
5.3.10 System
The EEPROM programming controls are disabled, so the memory system is configured for normal read operation. PSEL[3:0] are initialized with the value %0110, causing the external IRQ pin to have the highest I-bit interrupt priority. The IRQ pin is configured for level-sensitive operation (for wired-OR systems). The RBOOT, SMOD, and MDA bits in the HPRIO register reflect the status of the MODB and MODA inputs at the rising edge of reset. MODA and MODB inputs select one of the four operating modes. After reset, writing SMOD and MDA in special modes causes the MCU to change operating modes. Refer to the description of HPRIO register in Chapter 2 Operating Modes and On-Chip Memory for a detailed description of SMOD and MDA. The DLY control bit is set to specify that an oscillator startup delay is imposed upon recovery from stop mode. The clock monitor system is disabled because CME is cleared.
Any one of these interrupts can be assigned the highest maskable interrupt priority by writing the appropriate value to the PSEL bits in the HPRIO register. Otherwise, the priority arrangement remains the same. An interrupt that is assigned highest priority is still subject to global masking by the I bit in the CCR, or by any associated local bits. Interrupt vectors are not affected by priority assignment. To avoid race conditions, HPRIO can be written only while I-bit interrupts are inhibited.
1. The values of the RBOOT, SMOD, and MDA reset bits depend on the mode selected at the RESET pin rising edge. Refer to Table 2-1. Hardware Mode Select Summary.
Figure 5-4. Highest Priority I-Bit Interrupt and Miscellaneous Register (HPRIO) RBOOT Read Bootstrap ROM Bit Has meaning only when the SMOD bit is a 1 (bootstrap mode or special test mode). At all other times this bit is clear and cannot be written. Refer to Chapter 2 Operating Modes and On-Chip Memory for more information. SMOD Special Mode Select Bit This bit reflects the inverse of the MODB input pin at the rising edge of reset. Refer to Chapter 2 Operating Modes and On-Chip Memory for more information. MDA Mode Select A Bit The mode select A bit reflects the status of the MODA input pin at the rising edge of reset. Refer to Chapter 2 Operating Modes and On-Chip Memory for more information. IRVNE Internal Read Visibility/Not E Bit The IRVNE control bit allows internal read accesses to be available on the external data bus during operation in expanded modes. In single-chip and bootstrap modes, IRVNE determines whether the E clock is driven out an external pin. For the MC68HC811E2, this bit is IRV and only controls internal read visibility. Refer to Chapter 2 Operating Modes and On-Chip Memory for more information. PSEL[3:0] Priority Select Bits These bits select one interrupt source to be elevated above all other I-bit-related sources and can be written only while the I bit in the CCR is set (interrupts disabled).
Interrupts
5.5 Interrupts
The MCU has 18 interrupt vectors that support 22 interrupt sources. The 15 maskable interrupts are generated by on-chip peripheral systems. These interrupts are recognized when the global interrupt mask bit (I) in the condition code register (CCR) is clear. The three non-maskable interrupt sources are illegal opcode trap, software interrupt, and XIRQ pin. Refer to Table 5-4, which shows the interrupt sources and vector assignments for each source. For some interrupt sources, such as the SCI interrupts, the flags are automatically cleared during the normal course of responding to the interrupt requests. For example, the RDRF flag in the SCI system is cleared by the automatic clearing mechanism consisting of a read of the SCI status register while RDRF is set, followed by a read of the SCI data register. The normal response to an RDRF interrupt request would be to read the SCI status register to check for receive errors, then to read the received data from the SCI data register. These steps satisfy the automatic clearing mechanism without requiring special instructions.
FFD6, D7
FFD8, D9 FFDA, DB FFDC, DD FFDE, DF FFE0, E1 FFE2, E3 FFE4, E5 FFE6, E7 FFE8, E9 FFEA, EB FFEC, ED FFEE, EF FFF0, F1 FFF2, F3 FFF4, F5 FFF6, F7 FFF8, F9 FFFA, FB FFFC, FD FFFE, FF
Interrupts
end of the interrupt service routine, the return-from-interrupt instruction is executed and the saved registers are pulled from the stack in reverse order so that normal program execution can resume. Refer to Chapter 4 Central Processor Unit (CPU). Table 5-5. Stacking Order on Entry to Interrupts
Memory Location SP SP1 SP2 SP3 SP4 SP5 SP6 SP7 SP8 CPU Registers PCL PCH IYL IYH IXL IXH ACCA ACCB CCR
LOWEST PRIORITY
COP WATCHDOG TIMEOUT (WITH NOCOP = 0) LOAD PROGRAM COUNTER WITH CONTENTS OF $FFFE, $FFFF (VECTOR FETCH) LOAD PROGRAM COUNTER WITH CONTENTS OF $FFFC, $FFFD (VECTOR FETCH) LOAD PROGRAM COUNTER WITH CONTENTS OF $FFFA, $FFFB (VECTOR FETCH)
1A
STACK CPU REGISTERS SET BITS I AND X FETCH VECTOR $FFF4, $FFF5
2A
2A
STACK CPU REGISTERS SET BIT I IN CCR FETCH VECTOR $FFF8, $FFF9
STACK CPU REGISTERS SET BIT I IN CCR FETCH VECTOR $FFF6, $FFF7 RESTORE CPU REGISTERS FROM STACK
SWI INSTRUCTION? N
RESOLVE INTERRUPT PRIORITY AND FETCH VECTOR FOR HIGHEST PENDING SOURCE SEE FIGURE 52
1A
Low-Power Operation
BEGIN
YES
YES
FETCH VECTOR
IRQ ? NO
YES
RTII = 1 ? NO
YES
REAL-TIME INTERRUPT ? NO
YES
YES IC1I = 1 ? NO
TIMER IC1F ? NO
YES
YES IC2I = 1 ? NO
TIMER IC2F ? NO
YES
YES IC3I = 1 ? NO
TIMER IC3F ? NO
YES
YES OC1I = 1 ? NO 2A
TIMER OC1F ? NO
YES
2B
Y OC2I = 1? N Y
FLAG OC2F = 1? N
OC3I = 1? N
FLAG OC3F = 1 N
OC4I = 1? N
FLAG OC4F = 1? N
I4/O5I = 1? N
FLAG I4/O5IF = 1? N
Y TOI = 1? N Y
FLAG TOF = 1? N
PAOVI = 1? N
FLAG PAOVF = 1 N
PAII = 1? N
FLAG PAIF = 1? N
Low-Power Operation
BEGIN
FLAG RDRF = 1? N
OR = 1? N
RIE = 1? N
RE = 1? N
TDRE = 1? N
TIE = 1? N
TE = 1? N
TC = 1? N
TCIE = 1? N
IDLE = 1? N
Y ILIE = 1? N
RE = 1? N
masked), the MCU starts up, beginning with the stacking sequence leading to normal service of the XIRQ request. If X is set to 1 (XIRQ masked or inhibited), then processing continues with the instruction that immediately follows the STOP instruction, and no XIRQ interrupt service is requested or pending. Because the oscillator is stopped in stop mode, a restart delay may be imposed to allow oscillator stabilization upon leaving stop. If the internal oscillator is being used, this delay is required; however, if a stable external oscillator is being used, the DLY control bit can be used to bypass this startup delay. The DLY control bit is set by reset and can be optionally cleared during initialization. If the DLY equal to 0 option is used to avoid startup delay on recovery from stop, then reset should not be used as the means of recovering from stop, as this causes DLY to be set again by reset, imposing the restart delay. This same delay also applies to power-on reset, regardless of the state of the DLY control bit, but does not apply to a reset while the clocks are running.
Port pin function is mode dependent. Do not confuse pin function with the electrical state of the pin at reset. Port pins are either driven to a specified logic level or are configured as high-impedance inputs. I/O pins configured as high-impedance inputs have port data that is indeterminate. In port descriptions, an I indicates this condition. Port pins that are driven to a known logic level during reset are shown with a value of either 1 or 0. Some control bits are unaffected by reset. Reset states for these bits are indicated with a U.
6.2 Port A
Port A shares functions with the timer system and has: Three input-only pins Three output-only pins Two bidirectional I/O pins
Address: Read: Write: Reset: Alternate function: And/or: $1000 Bit 7 PA7 6 PA6 5 PA5 4 PA4 0 OC4 OC1 3 PA3 I IC4/OC5 OC1 2 PA2 I IC1 1 PA1 I IC2 Bit 0 PA0 I IC3
6 PAEWN 0
5 PAMOD 0
4 PEDGE 0
3 DDRA3 0
2 I4/O5 0
1 RTR1 0
Bit 0 RTR0 0
Figure 6-2. Pulse Accumulator Control Register (PACTL) DDRA7 Data Direction for Port A Bit 7 Overridden if an output compare function is configured to control the PA7 pin 0 = Input 1 = Output The pulse accumulator uses port A bit 7 as the PAI input, but the pin can also be used as general-purpose I/O or as an output compare. NOTE Even when port A bit 7 is configured as an output, the pin still drives the input to the pulse accumulator. PAEN Pulse Accumulator System Enable Bit Refer to Chapter 9 Timing Systems. PAMOD Pulse Accumulator Mode Bit Refer to Chapter 9 Timing Systems. PEDGE Pulse Accumulator Edge Control Bit Refer to Chapter 9 Timing Systems. DDRA3 Data Direction for Port A Bit 3 This bit is overridden if an output compare function is configured to control the PA3 pin. 0 = Input 1 = Output I4/O5 Input Capture 4/Output Compare 5 Bit Refer to Chapter 9 Timing Systems. RTR[1:0] RTI Interrupt Rate Select Bits Refer to Chapter 9 Timing Systems.
M68HC11E Family Data Sheet, Rev. 5.1 98 Freescale Semiconductor
Port B
6.3 Port B
In single-chip or bootstrap modes, port B pins are general-purpose outputs. In expanded or special test modes, port B pins are high-order address outputs.
Address: $1004 Bit 7 Read: Write: Reset: Read: Write: Reset: 6 5 4 3 2 1 Bit 0
Single-chip or bootstrap modes: PB7 0 PB6 0 PB5 0 PB4 0 PB3 0 PB2 0 PB1 0 PB0 0
Expanded or special test modes: ADDR15 0 ADDR14 0 ADDR13 0 ADDR12 0 ADDR11 0 ADDR10 0 ADDR9 0 ADDR8 0
6.4 Port C
In single-chip and bootstrap modes, port C pins reset to high-impedance inputs. (DDRC bits are set to 0.) In expanded and special test modes, port C pins are multiplexed address/data bus and the port C register address is treated as an external memory location.
Address: $1003 Bit 7 Read: Write: Reset: Expanded or special test modes: Read: Write: Reset: ADDR7 DATA7 ADDR6 DATA6 ADDR5 DATA5 ADDR4 DATA4 ADDR3 DATA3 ADDR2 DATA2 ADDR1 DATA1 ADDR0 DATA0 6 5 4 3 2 1 Bit 0
Single-chip or bootstrap modes: PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0
PORTCL is used in the handshake clearing mechanism. When an active edge occurs on the STRA pin, port C data is latched into the PORTCL register. Reads of this register return the last value latched into PORTCL and clear STAF flag (following a read of PIOC with STAF set).
Address: Read: Write: Reset: $1007 Bit 7 DDRC7 0 6 DDRC6 0 5 DDRC5 0 4 DDRC4 0 3 DDRC3 0 2 DDRC2 0 1 DDRC1 0 Bit 0 DDRC0 0
Figure 6-6. Port C Data Direction Register (DDRC) DDRC[7:0] Port C Data Direction Bits In the 3-state variation of output handshake mode, clear the corresponding DDRC bits. Refer to Figure 10-13. 3-State Variation of Output Handshake Timing Diagram (STRA Enables Output Buffer). 0 = Input 1 = Output
6.5 Port D
In all modes, port D bits [5:0] can be used either for general-purpose I/O or with the serial communications interface (SCI) and serial peripheral interface (SPI) subsystems. During reset, port D pins PD[5:0] are configured as high-impedance inputs (DDRD bits cleared).
Address: Read: Write: Reset: Alternate Function: $1008 Bit 7 0 6 0 5 PD5 I PD5 SS 4 PD4 I PD4 SCK 3 PD3 I PD3 MOSI 2 PD2 I PD2 MISO 1 PD1 I PD1 Tx Bit 0 PD0 I PD0 RxD
Figure 6-8. Port D Data Direction Register (DDRD) Bits [7:6] Unimplemented Always read 0 DDRD[5:0] Port D Data Direction Bits When DDRD bit 5 is 1 and MSTR = 1 in SPCR, PD5/SS is a general-purpose output and mode fault logic is disabled. 0 = Input 1 = Output
Port E
6.6 Port E
Port E is used for general-purpose static inputs or pins that share functions with the analog-to-digital (A/D) converter system. When some port E pins are being used for general-purpose input and others are being used as A/D inputs, PORTE should not be read during the sample portion of an A/D conversion.
Address: Read: Write: Reset: Alternate Function: AN7 AN6 AN5 $100A Bit 7 PE7 6 PE6 5 PE5 4 PE4 3 PE3 2 PE2 1 PE1 Bit 0 PE0
0 1
1 0
Inputs latched into PORTCL on any active edge on STRA Driven as outputs if STRA at active level; follows DDRC if STRA not at active level
0 1 Port C Driven
$1002 Bit 7 STAF 0 U = Unaffected 6 STAI 0 5 CWOM 0 4 HNDS 0 3 OIN 0 2 PLS U 1 EGA 1 Bit 0 INVB 1
Figure 6-10. Parallel I/O Control Register (PIOC) STAF Strobe A Interrupt Status Flag STAF is set when the selected edge occurs on strobe A. This bit can be cleared by a read of PIOC with STAF set followed by a read of PORTCL (simple strobed or full input handshake mode) or a write to PORTCL (output handshake mode). 0 = No edge on strobe A 1 = Selected edge on strobe A STAI Strobe A Interrupt Enable Mask Bit 0 = STAF does not request interrupt 1 = STAF requests interrupt
CWOM Port C Wired-OR Mode Bit (affects all eight port C pins) It is customary to have an external pullup resistor on lines that are driven by open-drain devices. 0 = Port C outputs are normal CMOS outputs. 1 = Port C outputs are open-drain outputs. HNDS Handshake Mode Bit 0 = Simple strobe mode 1 = Full input or output handshake mode OIN Output or Input Handshake Select Bit HNDS must be set to 1 for this bit to have meaning. 0 = Input handshake 1 = Output handshake PLS Pulsed/Interlocked Handshake Operation Bit HNDS must be set to 1 for this bit to have meaning. When interlocked handshake is selected, strobe B is active until the selected edge of strobe A is detected. 0 = Interlocked handshake 1 = Pulsed handshake (Strobe B pulses high for two E-clock cycles.) EGA Active Edge for Strobe A Bit 0 = STRA falling edge selected, high level activates port C outputs (output handshake) 1 = STRA rising edge selected, low level activates port C outputs (output handshake) INVB Invert Strobe B Bit 0 = Active level is logic 0. 1 = Active level is logic 1.
TRANSFER Tx BUFFER
PREAMBLEJAM 1s
BREAKJAM 0s
SIZE 8/9
SHIFT ENABLE
JAM ENABLE
SCI Rx REQUESTS
SBK
ILIE
RIE
TIE
RE
TE
Note: Refer to Figure B-1. EVBU Schematic Diagram for an example of connecting TxD to a PC.
Receive Operation
MSB
WAKEUP LOGIC
RWU
OR
NF
TC
R8
FE
T8
SCDR Rx BUFFER
RWU
TCIE
SCI Tx REQUESTS
Note: Refer to Figure B-1. EVBU Schematic Diagram for an example of connecting RxD to a PC.
SBK
ILIE
RIE
TIE
RE
TE
Figure 7-4. Serial Communications Control Register 1 (SCCR1) R8 Receive Data Bit 8 If M bit is set, R8 stores the ninth bit in the receive data character. T8 Transmit Data Bit 8 If M bit is set, T8 stores the ninth bit in the transmit data character. Bit 5 Unimplemented Always reads 0 M Mode Bit (select character format) 0 = Start bit, 8 data bits, 1 stop bit 1 = Start bit, 9 data bits, 1 stop bit WAKE Wakeup by Address Mark/Idle Bit 0 = Wakeup by IDLE line recognition 1 = Wakeup by address mark (most significant data bit set) Bits [2:0] Unimplemented Always read 0
SCI Registers
Figure 7-5. Serial Communications Control Register 2 (SCCR2) TIE Transmit Interrupt Enable Bit 0 = TDRE interrupts disabled 1 = SCI interrupt requested when TDRE status flag is set TCIE Transmit Complete Interrupt Enable Bit 0 = TC interrupts disabled 1 = SCI interrupt requested when TC status flag is set RIE Receiver Interrupt Enable Bit 0 = RDRF and OR interrupts disabled 1 = SCI interrupt requested when RDRF flag or the OR status flag is set ILIE Idle-Line Interrupt Enable Bit 0 = IDLE interrupts disabled 1 = SCI interrupt requested when IDLE status flag is set TE Transmitter Enable Bit When TE goes from 0 to 1, one unit of idle character time (logic 1) is queued as a preamble. 0 = Transmitter disabled 1 = Transmitter enabled RE Receiver Enable Bit 0 = Receiver disabled 1 = Receiver enabled RWU Receiver Wakeup Control Bit 0 = Normal SCI receiver 1 = Wakeup enabled and receiver interrupts inhibited SBK Send Break At least one character time of break is queued and sent each time SBK is written to 1. As long as the SBK bit is set, break characters are queued and sent. More than one break may be sent if the transmitter is idle at the time the SBK bit is toggled on and off, as the baud rate clock edge could occur between writing the 1 and writing the 0 to SBK. 0 = Break generator off 1 = Break codes generated
Figure 7-6. Serial Communications Status Register (SCSR) TDRE Transmit Data Register Empty Flag This flag is set when SCDR is empty. Clear the TDRE flag by reading SCSR with TDRE set and then writing to SCDR. 0 = SCDR busy 0 = SCDR empty TC Transmit Complete Flag This flag is set when the transmitter is idle (no data, preamble, or break transmission in progress). Clear the TC flag by reading SCSR with TC set and then writing to SCDR. 0 = Transmitter busy 1 = Transmitter idle RDRF Receive Data Register Full Flag This flag is set if a received character is ready to be read from SCDR. Clear the RDRF flag by reading SCSR with RDRF set and then reading SCDR. 0 = SCDR empty 1 = SCDR full IDLE Idle Line Detected Flag This flag is set if the RxD line is idle. Once cleared, IDLE is not set again until the RxD line has been active and becomes idle again. The IDLE flag is inhibited when RWU = 1. Clear IDLE by reading SCSR with IDLE set and then reading SCDR. 0 = RxD line active 1 = RxD line idle OR Overrun Error Flag OR is set if a new character is received before a previously received character is read from SCDR. Clear the OR flag by reading SCSR with OR set and then reading SCDR. 0 = No overrun 1 = Overrun detected NF Noise Error Flag NF is set if majority sample logic detects anything other than a unanimous decision. Clear NF by reading SCSR with NF set and then reading SCDR. 0 = Unanimous decision 1 = Noise detected
SCI Registers
FE Framing Error Flag FE is set when a 0 is detected where a stop bit was expected. Clear the FE flag by reading SCSR with FE set and then reading SCDR. 0 = Stop bit detected 1 = Zero detected Bit 0 Unimplemented Always reads 0
Figure 7-7. Baud Rate Register (BAUD) TCLR Clear Baud Rate Counter Bit (Test) SCP[2:0] SCI Baud Rate Prescaler Select Bits NOTE SCP2 applies to MC68HC(7)11E20 only. When SCP2 = 1, SCP[1:0] must equal 0s. Any other values for SCP[1:0] are not decoded in the prescaler and the results are unpredictable. Refer to Figure 7-8 and Figure 7-9. RCKB SCI Baud Rate Clock Check Bit (Test) See Table 7-1.
Bus Frequency (MHz) 1.00 1.23 76800 38400 19200 9600 4800 2400 1200 600 25600 12800 6400 3200 1600 800 400 200 19200 9600 4800 2400 1200 600 300 150 5908 2954 1477 738 369 185 92 46 1969 985 492 246 123 62 31 15 2.00 2.50 3.00 187500 93750 46875 23438 11719 5859 2930 1465 62500 31250 15625 7813 3906 1953 977 488 46875 23438 11719 5859 2930 1465 732 366 14423 7212 3606 1803 901 451 225 113 4808 2404 1202 601 300 150 75 38 4.00 250000 125000 62500 31250 15625 7813 3906 1953 83333 41667 20833 10417 5208 2604 1302 651 62500 31250 15625 7813 3906 1953 977 488 19231 9615 4808 2404 1202 601 300 150 6410 3205 1603 801 401 200 100 50
1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 13 13 13 13 13 13 13 13 39 39 39 39 39 39 39 39
62500 31250 15625 7813 3906 1953 977 488 20833 10417 5208 2604 1302 651 326 163 15625 7813 3906 1953 977 488 244 122 4808 2404 1202 601 300 150 75 38 1603 801 401 200 100 50 25 13
125000 156250 62500 78125 31250 39063 15625 19531 7813 9766 3906 4883 1953 2441 977 1221 41667 20833 10417 5208 2604 1302 651 326 31250 15625 7813 3906 1953 977 488 244 9615 4808 2404 1202 601 300 150 75 3205 1603 801 401 200 100 50 25 52083 26042 13021 6510 3255 1628 814 407 39063 19531 9766 4883 2441 1221 610 305 12019 6010 3005 1502 751 376 188 94 4006 2003 1002 501 250 125 63 31
Shaded areas reflect standard baud rates. On MC68HC(7)11E20 do not set SCP1 or SCP0 when SCP2 is 1.
SCI Registers
SCR[2:0] SCI Baud Rate Select Bits Selects receiver and transmitter bit rate based on output from baud rate prescaler stage. Refer to Figure 7-8 and Figure 7-9. The prescaler bits, SCP[2:0], determine the highest baud rate, and the SCR[2:0] bits select an additional binary submultiple (1, 2, 4, through 128) of this highest baud rate. The result of these two dividers in series is the 16X receiver baud rate clock. The SCR[2:0] bits are not affected by reset and can be changed at any time, although they should not be changed when any SCI transfer is in progress. Figure 7-8 and Figure 7-9 illustrate the SCI baud rate timing chain. The prescaler select bits determine the highest baud rate. The rate select bits determine additional divide by two stages to arrive at the receiver timing (RT) clock rate. The baud rate clock is the result of dividing the RT clock by 16.
EXTAL OSCILLATOR AND CLOCK GENERATOR (4) XTAL E AS 0:0 0:1 1:0 INTERNAL BUS CLOCK (PH2)
13
SCP[1:0] 1:1
SCR[2:0] 0:0:0
2 2 2 2 2 2 2
0:0:1
0:1:0
0:1:1
16
1:0:0 SCI TRANSMIT BAUD RATE (1X)
1:0:1
1:1:0
1:1:1
13
39
SCP[2:0]* 1:0:0
SCR[2:0] 0:0:0
2 2 2 2 2 2 2
0:0:1
0:1:0
0:1:1
16
1:0:0 SCI TRANSMIT BAUD RATE (1X)
1:0:1
1:1:0
1:1:1
Receiver Flags
TDRE and TC flags are normally set when the transmitter is first enabled (TE set to 1). The TDRE flag indicates there is room in the transmit queue to store another data character in the TDR. The TIE bit is the local interrupt mask for TDRE. When TIE is 0, TDRE must be polled. When TIE and TDRE are 1, an interrupt is requested. The TC flag indicates the transmitter has completed the queue. The TCIE bit is the local interrupt mask for TC. When TCIE is 0, TC must be polled. When TCIE is 1 and TC is 1, an interrupt is requested. Writing a 0 to TE requests that the transmitter stop when it can. The transmitter completes any transmission in progress before actually shutting down. Only an MCU reset can cause the transmitter to stop and shut down immediately. If TE is written to 0 when the transmitter is already idle, the pin reverts to its general-purpose I/O function (synchronized to the bit-rate clock). If anything is being transmitted when TE is written to 0, that character is completed before the pin reverts to general-purpose I/O, but any other characters waiting in the transmit queue are lost. The TC and TDRE flags are set at the completion of this last character, even though TE has been disabled.
BEGIN
FLAG RDRF = 1? N
OR = 1? N
RIE = 1? N
RE = 1? N
TDRE = 1? N
TIE = 1? N
TE = 1? N
TC = 1? N
TCIE = 1? N
IDLE = 1? N
Y ILIE = 1? N
RE = 1? N
MISO PD2
MOSI PD3
MSTD
SPI CONTROL
MSTR SPE
MODE
WCOL
SPIF
DWOM
INSTR
SPRO
CPHA
CPOL
SPRI
SPIF
SPE
DWOM
SEC
SPI Signals
SCK CYCLE # SCK (CPOL = 0) SCK (CPOL = 1) SAMPLE INPUT (CPHA = 0) DATA OUT SAMPLE INPUT (CPHA = 1) DATA OUT SS (TO SLAVE) SLAVE CPHA = 1 TRANSFER IN PROGRESS 3 MASTER TRANSFER IN PROGRESS 2 1. SS ASSERTED 2. MASTER WRITES TO SPDR 3. FIRST SCK EDGE 4. SPIF SET 5. SS NEGATED 1 SLAVE CPHA = 0 TRANSFER IN PROGRESS 4 5 MSB 6 5 4 3 2 1 LSB MSB 6 5 4 3 2 1 LSB 1 2 3 4 5 6 7 8
SPI Registers
A write collision is normally a slave error because a slave has no control over when a master initiates a transfer. A master knows when a transfer is in progress, so there is no reason for a master to generate a write-collision error, although the SPI logic can detect write collisions in both master and slave devices. The SPI configuration determines the characteristics of a transfer in progress. For a master, a transfer begins when data is written to SPDR and ends when SPIF is set. For a slave with CPHA equal to 0, a transfer starts when SS goes low and ends when SS returns high. In this case, SPIF is set at the middle of the eighth SCK cycle when data is transferred from the shifter to the parallel data register, but the transfer is still in progress until SS goes high. For a slave with CPHA equal to 1, transfer begins when the SCK line goes to its active level, which is the edge at the beginning of the first SCK cycle. The transfer ends in a slave in which CPHA equals 1 when SPIF is set.
Figure 8-3. Serial Peripheral Control Register (SPCR) SPIE Serial Peripheral Interrupt Enable Bit Set the SPE bit to 1 to request a hardware interrupt sequence each time the SPIF or MODF status flag is set. SPI interrupts are inhibited if this bit is clear or if the I bit in the condition code register is 1. 0 = SPI system interrupts disabled 1 = SPI system interrupts enabled SPE Serial Peripheral System Enable Bit When the SPE bit is set, the port D bit 2, 3, 4, and 5 pins are dedicated to the SPI function. If the SPI is in the master mode and DDRD bit 5 is set, then the port D bit 5 pin becomes a general-purpose output instead of the SS input. 0 = SPI system disabled 1 = SPI system enabled DWOM Port D Wired-OR Mode Bit DWOM affects all port D pins. 0 = Normal CMOS outputs 1 = Open-drain outputs
MSTR Master Mode Select Bit It is customary to have an external pullup resistor on lines that are driven by open-drain devices. 0 = Slave mode 1 = Master mode CPOL Clock Polarity Bit When the clock polarity bit is cleared and data is not being transferred, the SCK pin of the master device has a steady state low value. When CPOL is set, SCK idles high. Refer to Figure 8-2 and 8.4 Clock Phase and Polarity Controls. CPHA Clock Phase Bit The clock phase bit, in conjunction with the CPOL bit, controls the clock-data relationship between master and slave. The CPHA bit selects one of two different clocking protocols. Refer to Figure 8-2 and 8.4 Clock Phase and Polarity Controls. SPR[1:0] SPI Clock Rate Select Bits These two bits select the SPI clock (SCK) rate when the device is configured as master. When the device is configured as slave, these bits have no effect. Refer to Table 8-1. Table 8-1. SPI Clock Rates
SPR[1:0] 00 01 10 11 Divide E Clock By 2 4 16 32 Frequency at E = 1 MHz (Baud) 500 kHz 250 kHz 62.5 kHz 31.3 kHz Frequency at E = 2 MHz (Baud) 1.0 MHz 500 kHz 125 kHz 62.5 kHz Frequency at E = 3 MHz ( Baud) 1.5 MHz 750 kHz 187.5 kHz 93.8 kHz Frequency at E = 4 MHz (Baud) 2 MHz 1 MHz 250 kHz 125 kHz
Figure 8-4. Serial Peripheral Status Register (SPSR) SPIF SPI Interrupt Complete Flag SPIF is set upon completion of data transfer between the processor and the external device. If SPIF goes high, and if SPIE is set, a serial peripheral interrupt is generated. To clear the SPIF bit, read the SPSR with SPIF set, then access the SPDR. Unless SPSR is read (with SPIF set) first, attempts to write SPDR are inhibited. WCOL Write Collision Bit Clearing the WCOL bit is accomplished by reading the SPSR (with WCOL set) followed by an access of SPDR. Refer to 8.5.4 Slave Select and 8.6 SPI System Errors. 0 = No write collision 1 = Write collision
M68HC11E Family Data Sheet, Rev. 5.1 124 Freescale Semiconductor
SPI Registers
Bit 5 Unimplemented Always reads 0 MODF Mode Fault Bit To clear the MODF bit, read the SPSR (with MODF set), then write to the SPCR. Refer to 8.5.4 Slave Select and 8.6 SPI System Errors. 0 = No mode fault 1 = Mode fault Bits [3:0] Unimplemented Always read 0
Figure 8-5. Serial Peripheral Data I/O Register (SPDR) SPI is double buffered in and single buffered out.
Timing Systems
SPI
39 SCP2*
E 213 4
REAL-TIME INTERRUPT
TCNT
IC/OC CLEAR COP TIMER * SCP2 present on MC68HC(7)11E20 only SYSTEM RESET
Timer Structure
Main Timer Count Rates 00 1 count overflow 01 1 count overflow 10 1 count overflow 11 1 count overflow 1000 ns 65.536 ms 4.0 s 262.14 ms 8.0 s 524.29 ms 16.0 s 1.049 s 500 ns 32.768 ms 2.0 s 131.07 ms 4.0 s 262.14 ms 8.0 s 524.29 ms 333 ns 21.845 ms 1.333 s 87.381 ms 2.667 s 174.76 ms 5.333 s 349.52 ms (E/1) (E/216) (E/4) (E/218) (E/8) (E/219) (E/16) (E/220)
Timing Systems
MCU E CLK
TCNT (HI)
TCNT (LO)
TOI TOF TAPS FOR RTI, COP WATCHDOG, AND PULSE ACCUMULATOR
16-BIT TIMER BUS OC1I 16-BIT COMPARATOR = TOC1 (HI) TOC1 (LO) OC1F FOC1 OC2I 16-BIT COMPARATOR = TOC2 (HI) TOC2 (LO) OC2F FOC2 OC3I 16-BIT COMPARATOR = TOC3 (HI) TOC3 (LO) OC3F FOC3 OC4I 16-BIT COMPARATOR = TOC4 (HI) TOC4 (LO) OC5 I4/O5F IC4 I4/O5 16-BIT LATCH TIC1 (HI) CLK IC1F IC2I IC2F IC3I IC3F TFLG 1 STATUS FLAGS TMSK 1 INTERRUPT ENABLES CFORC FORCE OUTPUT COMPARE IC1I FOC5 OC4F FOC4 I4/O5I 16-BIT COMPARATOR = TI4/O5 (HI) TI4/O5 (LO) CLK
INTERRUPT REQUESTS (FURTHER QUALIFIED BY I BIT IN CCR) TO PULSE ACCUMULATOR 8 BIT 7 7 BIT 6 6 BIT 5 5 BIT 4 4 BIT 3 PA3/OC5/ IC4/OC1 PA4/OC4/ OC1 PA5/OC3/ OC1 PA6/OC2/ OC1 PIN FUNCTIONS PA7/OC1/ PAI
16-BIT LATCH
Input Capture
The control and status bits that implement the input capture functions are contained in: Pulse accumulator control register (PACTL) Timer control 2 register (TCTL2) Timer interrupt mask 1 register (TMSK1) Timer interrupt flag 2 register (TFLG1) To configure port A bit 3 as an input capture, clear the DDRA3 bit of the PACTL register. Note that this bit is cleared out of reset. To enable PA3 as the fourth input capture, set the I4/O5 bit in the PACTL register. Otherwise, PA3 is configured as a fifth output compare out of reset, with bit I4/O5 being cleared. If the DDRA3 bit is set (configuring PA3 as an output), and IC4 is enabled, then writes to PA3 cause edges on the pin to result in input captures. Writing to TI4/O5 has no effect when the TI4/O5 register is acting as IC4.
Figure 9-3. Timer Control Register 2 (TCTL2) EDGxB and EDGxA Input Capture Edge Control Bits There are four pairs of these bits. Each pair is cleared to 0 by reset and must be encoded to configure the corresponding input capture edge detector circuit. IC4 functions only if the I4/O5 bit in the PACTL register is set. Refer to Table 9-2 for timer control configuration. Table 9-2. Timer Control Configuration
EDGxB 0 0 1 1 EDGxA 0 1 0 1 Configuration Capture disabled Capture on rising edges only Capture on falling edges only Capture on any edge
Timing Systems
input capture register pair inhibits a new capture transfer for one bus cycle. If a double-byte read instruction, such as load double accumulator D (LDD), is used to read the captured value, coherency is assured. When a new input capture occurs immediately after a high-order byte read, transfer is delayed for an additional cycle but the value is not lost.
Register name: Timer Input Capture 1 Register (High) Bit 7 Read: Write: Reset: Bit 7 Read: Write: Reset: Bit 7 6 Bit 6 5 Bit 5 Bit 15 6 Bit 14 5 Bit 13 Address: $1010 4 Bit 12 3 Bit 11 2 Bit 10 1 Bit 9 Bit 0 Bit 8
Indeterminate after reset Address: $1011 4 Bit 4 3 Bit 3 2 Bit 2 1 Bit 1 Bit 0 Bit 0
Indeterminate after reset Address: $1013 4 Bit 4 3 Bit 3 2 Bit 2 1 Bit 1 Bit 0 Bit 0
Indeterminate after reset Address: $1015 4 Bit 4 3 Bit 3 2 Bit 2 1 Bit 1 Bit 0 Bit 0
Output Compare
1
6 Bit 6
1
5 Bit 5
1
4 Bit 4
1
Address: $101F 3 Bit 3
1
2 Bit 2
1
1 Bit 1
1
Bit 0 Bit 0
Figure 9-7. Timer Input Capture 4/Output Compare 5 Register Pair (TI4/O5)
Timing Systems
OC1 is different from the other output compares in that a successful OC1 compare can affect any or all five of the OC pins. The OC1 output action taken when a match is found is controlled by two 8-bit registers with three bits unimplemented: the output compare 1 mask register, OC1M, and the output compare 1 data register, OC1D. OC1M specifies which port A outputs are to be used, and OC1D specifies what data is placed on these port pins.
1
6 Bit 6
1
5 Bit 5
1
4 Bit 4
1
Address: $1017 3 Bit 3
1
2 Bit 2
1
1 Bit 1
1
Bit 0 Bit 0
1
6 Bit 6
1
5 Bit 5
1
4 Bit 4
1
Address: $1019 3 Bit 3
1
2 Bit 2
1
1 Bit 1
1
Bit 0 Bit 0
Output Compare
Register name: Timer Output Compare 3 Register (High) Bit 7 Read: Write: Reset: Bit 15 1 Bit 7 Read: Write: Reset: Bit 7 1 6 Bit 14 5 Bit 13 4
Bit 12
1
6 Bit 6
1
5 Bit 5
1
4 Bit 4
1
Address: $101B 3 Bit 3
1
2 Bit 2
1
1 Bit 1
1
Bit 0 Bit 0
1
6 Bit 6
1
5 Bit 5
1
4 Bit 4
1
Address: $101D 3 Bit 3
1
2 Bit 2
1
1 Bit 1
1
Bit 0 Bit 0
Timing Systems
FOC[1:5] Force Output Comparison Bit When the FOC bit associated with an output compare circuit is set, the output compare circuit immediately performs the action it is programmed to do when an output match occurs. 0 = Not affected 1 = Output x action occurs Bits [2:0] Unimplemented Always read 0
Figure 9-13. Output Compare 1 Mask Register (OC1M) OC1M[7:3] Output Compare Masks 0 = OC1 disabled 1 = OC1 enabled to control the corresponding pin of port A Bits [2:0] Unimplemented Always read 0
Figure 9-14. Output Compare 1 Data Register (OC1D) If OC1Mx is set, data in OC1Dx is output to port A bit x on successful OC1 compares. Bits [2:0] Unimplemented Always read 0
Output Compare
0
6 Bit 6
0
5 Bit 5
0
Address: $100F 4 Bit 4
0
3 Bit 3
0
2 Bit 2
0
1 Bit 1
0
Bit 0 Bit 0
0
= Unimplemented
Figure 9-16. Timer Control Register 1 (TCTL1) OM[2:5] Output Mode Bits OL[2:5] Output Level Bits These control bit pairs are encoded to specify the action taken after a successful OCx compare. OC5 functions only if the I4/O5 bit in the PACTL register is clear. Refer to Table 9-3 for the coding. Table 9-3. Timer Output Compare Actions
OMx 0 0 1 1 OLx 0 1 0 1 Action Taken on Successful Compare Timer disconnected from output pin logic Toggle OCx output line Clear OCx output line to 0 Set OCx output line to 1
Timing Systems
Figure 9-17. Timer Interrupt Mask 1 Register (TMSK1) OC1IOC4I Output Compare x Interrupt Enable Bits If the OCxI enable bit is set when the OCxF flag bit is set, a hardware interrupt sequence is requested. I4/O5I Input Capture 4/Output Compare 5 Interrupt Enable Bit When I4/O5 in PACTL is 1, I4/O5I is the input capture 4 interrupt enable bit. When I4/O5 in PACTL is 0, I4/O5I is the output compare 5 interrupt enable bit. IC1IIC3I Input Capture x Interrupt Enable Bits If the ICxI enable bit is set when the ICxF flag bit is set, a hardware interrupt sequence is requested. NOTE Bits in TMSK1 correspond bit for bit with flag bits in TFLG1. Bits in TMSK1 enable the corresponding interrupt sources.
Figure 9-18. Timer Interrupt Flag 1 Register (TFLG1) Clear flags by writing a 1 to the corresponding bit position(s). OC1FOC4F Output Compare x Flag Set each time the counter matches output compare x value I4/O5F Input Capture 4/Output Compare 5 Flag Set by IC4 or OC5, depending on the function enabled by I4/O5 bit in PACTL IC1FIC3F Input Capture x Flag Set each time a selected active edge is detected on the ICx input line
Output Compare
Figure 9-19. Timer Interrupt Mask 2 Register (TMSK2) TOI Timer Overflow Interrupt Enable Bit 0 = TOF interrupts disabled 1 = Interrupt requested when TOF is set to 1 RTII Real-Time Interrupt Enable Bit Refer to 9.5 Real-Time Interrupt (RTI). PAOVI Pulse Accumulator Overflow Interrupt Enable Bit Refer to 9.7.3 Pulse Accumulator Status and Interrupt Bits. PAII Pulse Accumulator Input Edge Interrupt Enable Bit Refer to 9.7.3 Pulse Accumulator Status and Interrupt Bits. Bits [3:2] Unimplemented Always read 0 PR[1:0] Timer Prescaler Select Bits These bits are used to select the prescaler divide-by ratio. In normal modes, PR[1:0] can be written only once, and the write must be within 64 cycles after reset. Refer to Table 9-1 and Table 9-4 for specific timing values. Table 9-4. Timer Prescale
PR[1:0] 00 01 10 11 Prescaler 1 4 8 16
NOTE Bits in TMSK2 correspond bit for bit with flag bits in TFLG2. Bits in TMSK2 enable the corresponding interrupt sources.
Timing Systems
Figure 9-20. Timer Interrupt Flag 2 Register (TFLG2) Clear flags by writing a 1 to the corresponding bit position(s). TOF Timer Overflow Interrupt Flag Set when TCNT changes from $FFFF to $0000 RTIF Real-Time (Periodic) Interrupt Flag Refer to 9.5 Real-Time Interrupt (RTI). PAOVF Pulse Accumulator Overflow Interrupt Flag Refer to 9.7 Pulse Accumulator. PAIF Pulse Accumulator Input Edge Interrupt Flag Refer to 9.7 Pulse Accumulator. Bits [3:0] Unimplemented Always read 0
The clock source for the RTI function is a free-running clock that cannot be stopped or interrupted except by reset. This clock causes the time between successive RTI timeouts to be a constant that is
independent of the software latencies associated with flag clearing and service. For this reason, an RTI period starts from the previous timeout, not from when RTIF is cleared. Every timeout causes the RTIF bit in TFLG2 to be set, and if RTII is set, an interrupt request is generated. After reset, one entire RTI period elapses before the RTIF is set for the first time. Refer to the 9.4.9 Timer Interrupt Mask 2 Register, 9.5.2 Timer Interrupt Flag Register 2, and 9.5.3 Pulse Accumulator Control Register.
Figure 9-21. Timer Interrupt Mask 2 Register (TMSK2) TOI Timer Overflow Interrupt Enable Bit 0 = TOF interrupts disabled 1 = Interrupt requested when TOF is set to 1 RTII Real-Time Interrupt Enable Bit 0 = RTIF interrupts disabled 1 = Interrupt requested when RTIF set to 1 PAOVI Pulse Accumulator Overflow Interrupt Enable Bit Refer to 9.7 Pulse Accumulator. PAII Pulse Accumulator Input Edge Bit Refer to 9.7 Pulse Accumulator. Bits [3:2] Unimplemented Always read 0 PR[1:0] Timer Prescaler Select Bits Refer to Table 9-4. NOTE Bits in TMSK2 correspond bit for bit with flag bits in TFLG2. Bits in TMSK2 enable the corresponding interrupt sources.
Timing Systems
Figure 9-22. Timer Interrupt Flag 2 Register (TFLG2) Clear flags by writing a 1 to the corresponding bit position(s). TOF Timer Overflow Interrupt Flag Set when TCNT changes from $FFFF to $0000 RTIF Real-Time Interrupt Flag The RTIF status bit is automatically set to 1 at the end of every RTI period. To clear RTIF, write a byte to TFLG2 with bit 6 set. PAOVF Pulse Accumulator Overflow Interrupt Flag Refer to 9.7 Pulse Accumulator. PAIF Pulse Accumulator Input Edge Interrupt Flag Refer to 9.7 Pulse Accumulator. Bits [3:0] Unimplemented Always read 0
Figure 9-23. Pulse Accumulator Control Register (PACTL) DDRA7 Data Direction for Port A Bit 7 Refer to Chapter 6 Parallel Input/Output (I/O) Ports. PAEN Pulse Accumulator System Enable Bit Refer to 9.7 Pulse Accumulator. PAMOD Pulse Accumulator Mode Bit Refer to 9.7 Pulse Accumulator.
PEDGE Pulse Accumulator Edge Control Bit Refer to 9.7 Pulse Accumulator. DDRA3 Data Direction for Port A Bit 3 Refer to Chapter 6 Parallel Input/Output (I/O) Ports. I4/O5 Input Capture 4/Output Compare Bit Refer to 9.7 Pulse Accumulator. RTR[1:0] RTI Interrupt Rate Select Bits These two bits determine the rate at which the RTI system requests interrupts. The RTI system is driven by an E divided by 213 rate clock that is compensated so it is independent of the timer prescaler. These two control bits select an additional division factor. Refer to Table 9-5.
Pulse accumulator control bits are also located within two timer registers, TMSK2 and TFLG2, as described in the following paragraphs.
Timing Systems
PAOVI PAOVF 1 INTERRUPT REQUESTS 2
PAII PAIF PAOVF PAI EDGE PAEN DISABLE FLAG SETTING OVERFLOW MCU PIN PA7/ PAI/ OC1 INPUT BUFFER AND EDGE DETECTOR OUTPUT BUFFER FROM MAIN TIMER OC1 FROM DDRA7 2: 1 MUX DATA BUS PAEN CLOCK INTERNAL DATA BUS PAOVI E 64 CLOCK FROM MAIN TIMER
ENABLE
PAMOD
PACTL CONTROL
PEDGE
PAEN
PAII
Pulse Accumulator
Figure 9-25. Pulse Accumulator Control Register (PACTL) DDRA7 Data Direction for Port A Bit 7 Refer to Chapter 6 Parallel Input/Output (I/O) Ports. PAEN Pulse Accumulator System Enable Bit 0 = Pulse accumulator disabled 1 = Pulse accumulator enabled PAMOD Pulse Accumulator Mode Bit 0 = Event counter 1 = Gated time accumulation PEDGE Pulse Accumulator Edge Control Bit This bit has different meanings depending on the state of the PAMOD bit, as shown in Table 9-7. Table 9-7. Pulse Accumulator Edge Control
PAMOD 0 0 1 1 PEDGE 0 1 0 1 Action on Clock PAI falling edge increments the counter. PAI rising edge increments the counter. A 0 on PAI inhibits counting. A 1 on PAI inhibits counting.
DDRA3 Data Direction for Port A Bit 3 Refer to Chapter 6 Parallel Input/Output (I/O) Ports. I4/O5 Input Capture 4/Output Compare 5 Bit 0 = Output compare 5 function enable (no IC4) 1 = Input capture 4 function enable (no OC5) RTR[1:0] RTI Interrupt Rate Select Bits Refer to 9.5 Real-Time Interrupt (RTI).
Timing Systems
Figure 9-28. Timer Interrupt Flag 2 Register (TFLG2) PAOVI and PAOVF Pulse Accumulator Interrupt Enable and Overflow Flag The PAOVF status bit is set each time the pulse accumulator count rolls over from $FF to $00. To clear this status bit, write a 1 in the corresponding data bit position (bit 5) of the TFLG2 register. The PAOVI control bit allows configuring the pulse accumulator overflow for polled or interrupt-driven operation and does not affect the state of PAOVF. When PAOVI is 0, pulse accumulator overflow interrupts are inhibited, and the system operates in a polled mode, which requires that PAOVF be polled by user software to determine when an overflow has occurred. When the PAOVI control bit is set, a hardware interrupt request is generated each time PAOVF is set. Before leaving the interrupt service routine, software must clear PAOVF by writing to the TFLG2 register.
Pulse Accumulator
PAII and PAIF Pulse Accumulator Input Edge Interrupt Enable Bit and Flag The PAIF status bit is automatically set each time a selected edge is detected at the PA7/PAI/OC1 pin. To clear this status bit, write to the TFLG2 register with a 1 in the corresponding data bit position (bit 4). The PAII control bit allows configuring the pulse accumulator input edge detect for polled or interrupt-driven operation but does not affect setting or clearing the PAIF bit. When PAII is 0, pulse accumulator input interrupts are inhibited, and the system operates in a polled mode. In this mode, the PAIF bit must be polled by user software to determine when an edge has occurred. When the PAII control bit is set, a hardware interrupt request is generated each time PAIF is set. Before leaving the interrupt service routine, software must clear PAIF by writing to the TFLG2 register.
Timing Systems
NOTE This device contains circuitry to protect the inputs against damage due to high static voltages or electric fields; however, it is advised that normal precautions be taken to avoid application of any voltage higher than maximum-rated voltages to this high-impedance circuit. For proper operation, it is recommended that VIn and VOut be constrained to the range VSS (VIn or VOut) VDD. Reliability of operation is enhanced if unused inputs are connected to an appropriate logic voltage level (for example, either VSS or VDD).
Electrical Characteristics
TA
VDD
JA
C/W
PD PINT PI/O K
W W W W/C
1. This is an approximate value, neglecting PI/O. 2. For most applications, PI/O PINT and can be neglected. 3. K is a constant pertaining to the device. Solve for K with a known TA and a measured PD (at equilibrium). Use this value of K to solve for PD and TJ iteratively for any value of TA.
DC Electrical Characteristics
VOL, VOH
0.1
VOH
VOL
VIH VIL
0.7 VDD
0.8 VDD VSS 0.3
V V
IOZ
IIn
4.0
1 10 VDD 10 8 12 90 100
V A pF
CL
pF
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = TL to TH, unless otherwise noted 2. VOH specification for RESET and MODA is not applicable because they are open-drain pins. VOH specification not applicable to ports C and D in wired-OR mode. 3. Refer to 10.13 Analog-to-Digital Converter Characteristics and 10.14 MC68L11E9/E20 Analog-to-Digital Converter Characteristics for leakage current for port E.
Electrical Characteristics
IDD
mA
WIDD
6 15 10 20
mA
SIDD
PD
mW
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = TL to TH, unless otherwise noted 2. EXTAL is driven with a square wave, and tCYC= 500 ns for 2 MHz rating tCYC= 333 ns for 3 MHz rating VIL 0.2 V VIH VDD 0.2 V no dc loads
V OL, VOH
VDD 0.1
0.1
VOH
VDD 0.8
VOL
0.4
VIH VIL
0.7 VDD
0.8 VDD VSS 0.3
V V
IOZ
IIn
2.0
1 10 VDD 10 8 12 90 100
VSB ISB l
V A pF
CL
pF
1. VDD = 3.0 Vdc to 5.5 Vdc, VSS = 0 Vdc, TA = TL to TH, unless otherwise noted 2. VOH specification for RESET and MODA is not applicable because they are open-drain pins. VOH specification not applicable to ports C and D in wired-OR mode. 3. Refer to 10.13 Analog-to-Digital Converter Characteristics and 10.14 MC68L11E9/E20 Analog-to-Digital Converter Characteristics for leakage current for port E.
Electrical Characteristics
IDD
8 4 14 7
15 8 27 14
mA
WIDD
3 1.5 5 2.5
6 3 10 5
mA
SIDD
50 25
50 25
PD
44 12 77 21
85 24 150 42
mW
1. VDD = 3.0 Vdc to 5.5 Vdc, VSS = 0 Vdc, TA = TL to TH, unless otherwise noted 2. EXTAL is driven with a square wave, and tCYC= 500 ns for 2 MHz rating tCYC= 333 ns for 3 MHz rating VIL 0.2 V VIH VDD 0.2 V no dc loads
CLOCKS, STROBES
~ VDD
0.4 VOLTS
~ V SS
NOM 70% of V DD
~ VDD
OUTPUTS
~ VSS
DC TESTING
CLOCKS, STROBES
~ VDD
20% of VDD
70% of V DD
~ VSS
20% of V DD SPEC SPEC 70% of VDD 20% of V DD (NOTE 2) VDD 0.8 VOLTS 0.4 VOLTS
~ VDD
OUTPUTS
70% of V DD 20% of V DD
~ VSS
AC TESTING
Notes: 1. Full test loads are applied during all dc electrical tests and ac timing measurements. 2. During ac timing measurements, inputs are driven to 0.4 volts and VDD 0.8 volts while timing measurements are taken at 20% and 70% of VDD points.
Electrical Characteristics
8 1 2 10 102 0 102 0
8 1 2 10 520 520
8 1 2 10 353 353
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = TL to TH, all timing is shown with respect to 20% VDD and 70% VDD, unless otherwise noted 2. RESET is recognized during the first clock cycle it is held low. Internal circuitry then drives the pin low for four clock cycles, releases the pin, and samples the pin level two cycles later to determine the source of the interrupt. Refer to Chapter 5 Resets and Interrupts for further detail.
8 1 2 10 1020 1020
8 1 2 10 520 520
1. VDD = 3.0 Vdc to 5.5 Vdc, VSS = 0 Vdc, TA = TL to TH, all timing is shown with respect to 20% VDD and 70% VDD, unless otherwise noted 2. RESET is recognized during the first clock cycle it is held low. Internal circuitry then drives the pin low for four clock cycles, releases the pin, and samples the pin level two cycles later to determine the source of the interrupt. Refer to Chapter 5 Resets and Interrupts for further detail.
PWTIM PA7
(2) (3)
Notes: 1. Rising edge sensitive input 2. Falling edge sensitive input 3. Maximum pulse accumulator clocking rate is E-clock frequency divided by 2.
158
VDD
Electrical Characteristics
EXTAL 4064 tCYC E tPCSU PWRSTL RESET tMPS MODA, MODB NEW PC NEW PC tMPH
ADDRESS
FFFE
FFFE
FFFE
FFFE
FFFF
FFFE
FFFE
FFFE
FFFE
FFFE
FFFF
Freescale Semiconductor
INTERNAL CLOCKS IRQ1 PWIRQ IRQ or XIRQ tSTOPDELAY3 E
STOP ADDR + 1
ADDRESS4
STOP ADDR
STOP ADDR + 1
OPCODE Resume program with instruction which follows the STOP instruction.
ADDRESS5
STOP ADDR
STOP ADDR + 1
STOP ADDR + 1
STOP ADDR + 2
SPSP7
SP 8
SP 8
FFF2 (FFF4)
FFF3 (FFF5)
NEW PC
Notes: 1. Edge Sensitive IRQ pin (IRQE bit = 1) 2. Level sensitive IRQ pin (IRQE bit = 0) 3. tSTOPDELAY = 4064 tCYC if DLY bit = 1 or 4 tCYC if DLY = 0. 4. XIRQ with X bit in CCR = 1. 5. IRQ or (XIRQ with X bit in CCR = 0). MC68L11E9/E20 Control Timing
160
E
Electrical Characteristics
Freescale Semiconductor
E tPCSU IRQ 1
DATA
OP CODE
PCL
PCH
IYL
IYH
IXL
IXH
CCR
VECT MSB
VECT LSB
OP CODE
R/W
Notes: 1. Edge sensitive IRQ pin (IRQE bit = 1) 2. Level sensitive IRQ pin (IRQE bit = 0)
Electrical Characteristics
tPWD
60 100 0 10
60 100 0 10
60 100 0 10
ns
ns ns ns ns ns ns ns
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = TL to TH, all timing is shown with respect to 20% VDD and 70% VDD, unless otherwise noted 2. Ports C and D timing is valid for active drive. (CWOM and DWOM bits are not set in PIOC and SPCR registers, respectively.) 3. If this setup time is met, STRB acknowledges in the next cycle. If it is not met, the response may be delayed one more cycle.
tPWD
60 100 0 10
60 100 0 10
ns
ns ns ns ns ns ns ns
1. VDD = 3.0 Vdc to 5.5 Vdc, VSS = 0 Vdc, TA = TL to TH, all timing is shown with respect to 20% VDD and 70% VDD, unless otherwise noted 2. Ports C and D timing is valid for active drive. (CWOM and DWOM bits are not set in PIOC and SPCR registers, respectively.) 3. If this setup time is met, STRB acknowledges in the next cycle. If it is not met, the response may be delayed one more cycle.
Electrical Characteristics
E E
ttPWD PWD
PORT B PORT B PREVIOUS PORT DATA DATA PREVIOUS NEW DATA VALID NEW DATA VALID
ttDEB DEB
STRB (OUT) STRB (OUT)
E E READY "READY"
STRB STRB(OUT) (0UT)
tDEB DEB
tDEB DEB
tAES
STRA (IN) (IN) STRA ttIS IS PORT C (IN) PORT C (IN) Notes: 1. After reading PIOC with STAF set 1. After reading PIOC with STAF set 2. Figure shows rising edge STRA (EGA = 1) and high true STRB (INVB = 1). 2. Figure shows rising edge STRA (EGA = 1) and high true STRB (INVB = 1).
NOTES:
tIH IH
E E
ttPWD PWD
PORT C (OUT) PORT C (OUT) PREVIOUS PORT PREVIOUS PORT DATA
STRB (IN)
STRB (OUT)
ttDEB DEB
E E
ttPWD PWD
PORT C (OUT) PORT C (OUT) (DDR = 1) DDR = 1
READY "READY"
ttDEB DEB
ttAES AES
ttPCD PCD
PORT C (OUT) PORT C (OUT) (DDR = 0) DDR = 0 OLD DATA OLD DATA NEW DATA VALID NEW DATA VALID
ttPCH PCH
a) STRA ACTIVE BEFORE PORTCL WRITE a) STRA ACTIVE BEFORE PORTCL WRITE
ttPCZ
ttPCD PCD
PORT C (OUT) PORT C (OUT) (DDR = 0) DDR = 0 b) STRA ACTIVE AFTER PORTCL WRITE b) STRAACTIVE AFTER PORTCL WRITE NOTES:
tPCH PCH
NEW DATA VALID NEW DATA VALID ttPCZ PCZ
Notes: reading PIOC with STAF set 1. After 1. Figure shows rising PIOC with STAFand high true STRB (INVB = 1). 2. After reading edge STRA (EGA = 1) set 2. Figure shows rising edge STRA (EGA = 1) and high true STRB (INVB = 1).
Figure 10-13. 3-State Variation of Output Handshake Timing Diagram (STRA Enables Output Buffer)
Electrical Characteristics
Minimum difference between VRH and VRL(2) Total time to perform a single A/D conversion: E clock Internal RC oscillator Conversion result never decreases with an increase in input voltage; has no missing codes Conversion result when VIn = VRL Conversion result when VIn = VRH Analog input acquisition sampling time: E clock Internal RC oscillator Input capacitance during sample PE[7:0] Input leakage on A/D pins PE[7:0] VRL, VRH
00
32 Guaranteed
tCYC+32 FF
tCYC+32 FF
s Hex Hex
Monotonicity Zero input reading Full scale reading Sample acquisition time Sample/hold capacitance Input leakage
12 20 typical
12
12
tCY
C
s pF
400 1.0
400 1.0
nA A
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = TL to TH, 750 kHz E 3.0 MHz, unless otherwise noted 2. Source impedances greater than 10 k affect accuracy adversely because of input leakage. 3. Performance verified down to 2.5 V VR, but accuracy is tested and guaranteed at VR = 5 V 10%.
Conversion time
00
32 Guaranteed 12 20 typical
tCYC+ 32 FF 12
Monotonicity Zero input reading Full scale reading Sample acquisition time Sample/hold capacitance Input leakage
400 1.0
nA A
1. VDD = 3.0 Vdc to 5.5 Vdc, VSS = 0 Vdc, TA = TL to TH, 750 kHz E 2.0 MHz, unless otherwise noted 2. Source impedances greater than 10 k affect accuracy adversely because of input leakage.
Electrical Characteristics
Symbol fo tCYC
1.0 MHz Min dc 1000 477 472 95.5 281.5 30 0 95.5 271.5 151 95.5 115.5 221 115.5 744.5 145.5 Max 1.0 20 20 145.5 190.5 442
2.0 MHz
3.0 MHz
Min Max Min Max dc 500 227 222 33 94 30 0 33 84 26 33 53 96 53 307 83 2.0 20 20 83 128 192 51 26 54 13 31 31 63 31 196 dc 333 146 141 26 54 30 0 3.0 20 15 51 71 111
Unit MHz ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns
PWEL PWEH tr tf
Pulse width, E high(2), PWEH = 1/2 tCYC28 ns E and AS rise time E and AS fall time Address hold time
(2) (3)a
tAH tAV tDSR tDHR tDDW tDHW tAVM tASL tAHL tASD PWASH tASED tACCA tACCE tMAD
Non-multiplexed address valid time to E rise tAV = PWEL (tASD + 80 ns)(2) (3)a Read data setup time Read data hold time, max = tMAD Write data delay time, tDDW = 1/8 tCYC+ 65.5 ns(2) (3)a Write data hold time, tDHW = 1/8 tCYC29.5 ns(2) (3)a Multiplexed address valid time to E rise tAVM = PWEL (tASD + 90 ns)(2) (3)a Multiplexed address valid time to AS fall tASL = PWASH 70 ns(2) Multiplexed address hold time tAHL = 1/8 tCYC29.5 ns(2) (3)b Delay time, E to AS rise, tASD = 1/8 tCYC9.5 ns(2) (3)a Pulse width, AS high, PWASH = 1/4 tCYC29 ns(2) Delay time, AS to E rise, tASED = 1/8 tCYC9.5 MPU address access time(3)a tACCA = tCYC(PWELtAVM) tDSRtf MPU access time, tACCE = PWEH tDSR Multiplexed address delay (Previous cycle MPU read) tMAD = tASD + 30 ns(2) (3)a ns(2) (3)b
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = TL to TH, all timing is shown with respect to 20% VDD and 70% VDD, unless otherwise noted 2. Formula only for dc to 2 MHz 3. Input clocks with duty cycles other than 50% affect bus performance. Timing parameters affected by input clock duty cycle are identified by (a) and (b). To recalculate the approximate bus timing values, substitute the following expressions in place of 1/8 tCYCin the above formulas, where applicable: (a) (1dc) 1/4 tCYC (b) dc 1/4 tCYC Where: dc is the decimal value of duty cycle percentage (high time)
1. VDD = 3.0 Vdc to 5.5 Vdc, VSS = 0 Vdc, TA = TL to TH, all timing is shown with respect to 20% VDD and 70% VDD, unless otherwise noted 2. Input clocks with duty cycles other than 50% affect bus performance. Timing parameters affected by input clock duty cycle are identified by (a) and (b). To recalculate the approximate bus timing values, substitute the following expressions in place of 1/8 tCYCin the above formulas, where applicable: (a) (1dc) 1/4 tCYC (b) dc 1/4 tCYC Where: dc is the decimal value of duty cycle percentage (high time).
Electrical Characteristics
1 1 2 3 3 4B
E
4A
12 12
R/W, ADDRESS R/W, ADDRESS (NON-MUX) NON-MULTIPLEXED
9 9
22 22
36
35 35 29 29
17 17 18 18
DATA DATA
ADDRESS
19 19
21 21
ADDRESS
25
DATA DATA
4A 4A
AS AS 26 26
24 24
4B 4B
27 27
28 28
NOTE: Measurement points shown are 20% and 70% of VDD. DD. Note: Measurementpoints shown are 20% and 70% of V
tCYC
2 3
tCYC tCYC
tw(SCKH)m tw(SCKH)s
16 tCYC
64 tCYC
ns
tw(SCKL)m tw(SCKL)s
16 tCYC
64 tCYC
ns
40 40 50 50
40 40 50 50
ns
ns
ns
9 10 11
tdis tv tho
ns ns ns
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = TL to TH, all timing is shown with respect to 20% VDD and 70% VDD, unless otherwise noted 2. Time to data active from high-impedance state 3. Assumes 200 pF load on SCK, MOSI, and MISO pins
Electrical Characteristics
tCYC
2 3
tCYC tCYC
tw(SCKH)m tw(SCKH)s
16 tCYC
64 tCYC
ns
tw(SCKL)m tw(SCKL)s
16 tCYC
64 tCYC
ns
50 50 60 60
50 50 60 60
ns
ns
ns
9 10 11
tdis tv tho
ns ns ns
1. VDD = 3.0 Vdc to 5.5 Vdc, VSS = 0 Vdc, TA = TL to TH, all timing is shown with respect to 20% VDD and 70% VDD, unless otherwise noted 2. Time to data active from high-impedance state 3. Assumes 100 pF load on SCK, MOSI, and MISO pins
SS INPUT
1 SCK CPOL = 0 INPUT SCK CPOL = 1 OUTPUT 5 SEE NOTE 4 5 SEE NOTE 4 6 MISO INPUT MSB IN 7 BIT 6 . . . 1 11 MOSI OUTPUT MASTER MSB OUT BIT 6 . . . 1 10 MASTER LSB OUT LSB IN 11 (REF)
Note: This first clock edge is generated internally but is not seen at the SCK pin.
SS INPUT
5 SEE NOTE 4 5 SEE NOTE 4 6 7 LSB IN 10 BIT 6 . . . 1 MASTER LSB OUT 11 (REF)
MISO INPUT
MSB IN 10 (REF)
BIT 6 . . . 1 11
MOSI OUTPUT
Note: This first clock edge is generated internally but is not seen at the SCK pin.
Electrical Characteristics
SS INPUT 1 SCK CPOL = 0 INPUT 2 SCK CPOL = 1 INPUT 8 MISO OUTPUT 5 4 5 3
SLAVE 6
MSB OUT 7
BIT 6 . . . 1 10
MOSI INPUT
MSB IN
BIT 6 . . . 1
SS INPUT 1 SCK CPOL = 0 INPUT 2 SCK CPOL = 1 INPUT 8 MISO OUTPUT SEE NOTE 10 4 BIT 6 . . . 1 10 6 MOSI INPUT MSB IN 7 BIT 6 . . . 1 LSB IN 11 5 4 5 3
SLAVE
MSB OUT
EEPROM Characteristics
ms
ms Cycles Years
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = TL to TH 2. The RC oscillator (RCO) must be enabled (by setting the CSEL bit in the OPTION register) for EEPROM programming and erasure when the E-clock frequency is below 1.0 MHz.
ms
ms Cycles Years
1. VDD = 3.0 Vdc to 5.5 Vdc, VSS = 0 Vdc, TA = TL to TH 2. The RC oscillator (RCO) must be enabled (by setting the CSEL bit in the OPTION register) for EEPROM programming and erasure.
1. VDD = 5.0 Vdc 10% 2. During EPROM programming of the MC68HC711E9 device, the VPPE pin circuitry may latch-up and be damaged if the input current is not limited to 10 mA. For more information please refer to MC68HC711E9 8-Bit Microcontroller Unit Mask Set Errata 3 (Freescale document order number 68HC711E9MSE3. 3. Typically, a 1-k series resistor is sufficient to limit the programming current for the MC68HC711E9. A 100- series resistor is sufficient to limit the programming current for the MC68HC711E20.
Electrical Characteristics
Ordering Information and Mechanical Specifications Description CONFIG Temperature Frequency MC Order Number
52-pin plastic leaded chip carrier (PLCC) (Continued) 2 MHz 40C to +85C 3 MHz OTPROM $0F 40C to +105C 40C to +125C OTPROM, enhanced security feature $0F 40C to +85C 0C to +70C 40C to +85C 20 Kbytes OTPROM $0F 40C to +105C 40C to +125C 0C to +70C 40C to +85C No ROM, 2 Kbytes EEPROM $FF 40C to +105C 40C to +125C 64-pin quad flat pack (QFP) 2 MHz BUFFALO ROM $0F 40C to +85C 3 MHz 2 MHz 40C to +85C No ROM $0D 40C to +105C 40C to +85C No ROM, no EEPROM $0C 40C to +105C 0C to +70C 40C to +85C 20 Kbytes OTPROM $0F 40C to +105C 40C to +125C 52-pin thin quad flat pack (TQFP) 2 MHz BUFFALO ROM $0F 40C to +85C 3 MHz MC68HC11E9BCPB3 MC68HC11E9BCPB2 3 MHz 2 MHz 2 MHz MC68HC711E20CFU3 MC68HC711E20VFU2 MC68HC711E20MFU2 2 MHz 3 MHz 2 MHz MC68HC11E0VFU2 MC68HC711E20FU3 MC68HC711E20CFU2 3 MHz 2 MHz 2 MHz MC68HC11E1CFU3 MC68HC11E1VFU2 MC68HC11E0CFU2 MC68HC11E9BCFU3 MC68HC11E1CFU2 MC68HC11E9BCFU2 2 MHz 2 MHz MC68HC811E2VFN2 MC68HC811E2MFN2 3 MHz 2 MHz 2 MHz 2 MHz 2 MHz MC68HC711E20CFN3 MC68HC711E20VFN2 MC68HC711E20MFN2 MC68HC811E2FN2 MC68HC811E2CFN2 2 MHz 2 MHz 2 MHz 3 MHz 2 MHz MC68HC711E9VFN2 MC68HC711E9MFN2 MC68S711E9CFN2 MC68HC711E20FN3 MC68HC711E20CFN2 MC68HC711E9CFN3 MC68HC711E9CFN2
Custom ROM Device Ordering Information Description CONFIG Temperature Frequency MC Order Number
52-pin windowed ceramic leaded chip carrier (CLCC) 2 MHz 40C to +85C 3 MHz EPROM $0F 40C to +105C 40C to +125C 0C o +70C 40C to +85C 20 Kbytes EPROM $0F 40C to +105C 40C to +125C 48-pin dual in-line package (DIP) MC68HC811E2 only 0C to +70C 40C to +85C No ROM, 2 Kbytes EEPROM $FF 40C to +105C 40C to +125C 56-pin dual in-line package with 0.70-inch lead spacing (SDIP) 2 MHz BUFFALO ROM $0F 40C to +85C 3 MHz 2 MHz 40C to +85C 3 MHz No ROM $0D 40C to +105C 40C to +125C 40C to +85C 3 MHz No ROM, no EEPROM $0C 40C to +105C 40C to +125C 2 MHz 2 MHz MC68HC11E0VB2 MC68HC11E0MB2 MC68HC11E0CB3 2 MHz 2 MHz 2 MHz MC68HC11E1VB2 MC68HC11E1MB2 MC68HC11E0CB2 MC68HC11E1CB3 MC68HC11E9BCB3 MC68HC11E1CB2 MC68HC11E9BCB2 2 MHz 2 MHz MC68HC811E2VP2 MC68HC811E2MP2 2 MHz 2 MHz MC68HC811E2P2 MC68HC811E2CP2 3 MHz 2 MHz 2 MHz MC68HC711E20CFS3 MC68HC711E20VFS2 MC68HC711E20MFS2 2 MHz 2 MHz 3 MHz 2 MHz MC68HC711E9VFS2 MC68HC711E9VFS2 MC68HC711E20FS3 MC68HC711E20CFS2 MC68HC711E9CFS3 MC68HC711E9CFS2
Ordering Information and Mechanical Specifications Description Temperature 0C to +70C 20 Kbytes custom ROM 40C to +85C 40C to +105C 40C to +125C 64-pin quad flat pack (QFP) 0C to +70C Custom ROM 40C to +85C 40C to +105C 40C to +125C 64-pin quad flat pack (continued) 0C to +70C 20 Kbytes Custom ROM 40C to +85C 40C to +105C 40C to +125C 52-pin thin quad flat pack (10 mm x 10 mm) 0C to +70C Custom ROM 40C to +85C 40C to +105C 40C to +125C 56-pin dual in-line package with 0.70-inch lead spacing (SDIP) 0C to +70C Custom ROM 40C to +85C 40C to +105C 40C to +125C 3 MHz 2 MHz 3 MHz 2 MHz 2 MHz MC68HC11E9B3 MC68HC11E9CB2 MC68HC11E9CB3 MC68HC11E9VB2 MC68HC11E9MB2 3 MHz 2 MHz 3 MHz 2 MHz 2 MHz MC68HC11E9PB3 MC68HC11E9CPB2 MC68HC11E9CPB3 MC68HC11E9VPB2 MC68HC11E9MPB2 3 MHz 2 MHz 3 MHz 2 MHz 2 MHz MC68HC11E20FU3 MC68HC11E20CFU2 MC68HC11E20CFU3 MC68HC11E20VFU2 MC68HC11E20MFU2 3 MHz 2 MHz 3 MHz 2 MHz 2 MHz MC68HC11E9FU3 MC68HC11E9CFU2 MC68HC11E9CFU3 MC68HC11E9VFU2 MC68HC11E9MFU2 Frequency 3 MHz 2 MHz 3 MHz 2 MHz 2 MHz MC Order Number MC68HC11E20FN3 MC68HC11E20CFN2 MC68HC11E20CFN3 MC68HC11E20VFN2 MC68HC11E20MFN2
11.4 Extended Voltage Device Ordering Information (3.0 Vdc to 5.5 Vdc)
Description 52-pin plastic leaded chip carrier (PLCC) Custom ROM No ROM No ROM, no EEPROM 64-pin quad flat pack (QFP) Custom ROM No ROM No ROM, no EEPROM 52-pin thin quad flat pack (10 mm x 10 mm) Custom ROM No ROM No ROM, no EEPROM 56-pin dual in-line package with 0.70-inch lead spacing (SDIP) Custom ROM No ROM No ROM, no EEPROM 20C to +70C 2 MHz 2 MHz 2 MHz MC68L11E9B2 MC68L11E1B2 MC68L11E0B2 20C to +70C 2 MHz 2 MHz 2 MHz MC68L11E9PB2 MC68L11E1PB2 MC68L11E0PB2 20C to +70C 2 MHz 2 MHz 2 MHz MC68L11E9FU2 MC68L11E20FU2 MC68L11E1FU2 MC68L11E0FU2 20C to +70C 2 MHz 2 MHz 2 MHz MC68L11E9FN2 MC68L11E20FN2 MC68L11E1FN2 MC68L11E0FN2 Temperature Frequency MC Order Number
T LM
M
S S
0.007 (0.18)
T LM
W D
52 1
G1 0.010 (0.25)
T LM
A Z R
T LM T LM
N N
E C G G1 0.010 (0.25)
S
J VIEW S T LM N
H K1
0.007 (0.18)
T LM
NOTES: 1. DATUMS L, M, AND N DETERMINED WHERE TOP OF LEAD SHOULDER EXITS PLASTIC BODY AT MOLD PARTING LINE. 2. DIMENSION G1, TRUE POSITION TO BE MEASURED AT DATUM T, SEATING PLANE. 3. DIMENSIONS R AND U DO NOT INCLUDE MOLD FLASH. ALLOWABLE MOLD FLASH IS 0.010 (0.250) PER SIDE. 4. DIMENSIONING AND TOLERANCING PER ANSI Y14.5M, 1982. 5. CONTROLLING DIMENSION: INCH. 6. THE PACKAGE TOP MAY BE SMALLER THAN THE PACKAGE BOTTOM BY UP TO 0.012 (0.300). DIMENSIONS R AND U ARE DETERMINED AT THE OUTERMOST EXTREMES OF THE PLASTIC BODY EXCLUSIVE OF MOLD FLASH, TIE BAR BURRS, GATE BURRS AND INTERLEAD FLASH, BUT INCLUDING ANY MISMATCH BETWEEN THE TOP AND BOTTOM OF THE PLASTIC BODY. 7. DIMENSION H DOES NOT INCLUDE DAMBAR PROTRUSION OR INTRUSION. THE DAMBAR PROTRUSION(S) SHALL NOT CAUSE THE H DIMENSION TO BE GREATER THAN 0.037 (0.940). THE DAMBAR INTRUSION(S) SHALL NOT CAUSE THE H DIMENSION TO BE SMALLER THAN 0.025 (0.635). INCHES MIN MAX 0.785 0.795 0.785 0.795 0.165 0.180 0.090 0.110 0.013 0.019 0.050 BSC 0.026 0.032 0.020 0.025 0.750 0.756 0.750 0.756 0.042 0.048 0.042 0.048 0.042 0.056 0.020 2_ 10 _ 0.710 0.730 0.040 MILLIMETERS MIN MAX 19.94 20.19 19.94 20.19 4.20 4.57 2.29 2.79 0.33 0.48 1.27 BSC 0.66 0.81 0.51 0.64 19.05 19.20 19.05 19.20 1.07 1.21 1.07 1.21 1.07 1.42 0.50 2_ 10 _ 18.04 18.54 1.02
K VIEW S
0.007 (0.18)
T LM
DIM A B C E F G H J K R U V W X Y Z G1 K1
T A
-B-
0.51 (0.020) F
T A
DIM A B C D F G H J K N R S
K H
C J
-T-
SEATING PLANE
T A
A, B, D
H AB
C AB
P DETAIL A F J
BASE METAL
0.05 (0.002) D
0.20 (0.008)
64 1 16
17
H AB
C AB
C E
DATUM PLANE
G DETAIL C U M T
NOTES: 1. DIMENSIONING AND TOLERANCING PER ANSI Y14.5M, 1982. 2. CONTROLLING DIMENSION: MILLIMETER. 3. DATUM PLANE H IS LOCATED AT BOTTOM OF LEAD AND IS COINCIDENT WITH THE LEAD WHERE THE LEAD EXITS THE PLASTIC BODY AT THE BOTTOM OF THE PARTING LINE. 4. DATUMS AB AND D TO BE DETERMINED AT DATUM PLANE H. 5. DIMENSIONS S AND V TO BE DETERMINED AT SEATING PLANE C. 6. DIMENSIONS A AND B DO NOT INCLUDE MOLD PROTRUSION. ALLOWABLE PROTRUSION IS 0.25 (0.010) PER SIDE. DIMENSIONS A AND B DO INCLUDE MOLD MISMATCH AND ARE DETERMINED AT DATUM PLANE H. 7. DIMENSION D DOES NOT INCLUDE DAMBAR PROTRUSION. DAMBAR PROTRUSION SHALL NOT CAUSE THE D DIMENSION TO EXCEED 0.53 (0.021). DAMBAR CANNOT BE LOCATED ON THE LOWER RADIUS OR THE FOOT. 8. DIMENSION K IS TO BE MEASURED FROM THE THEORETICAL INTERSECTION OF LEAD FOOT AND LEG CENTERLINES. DIM A B C D E F G H J K L M N P Q R S T U V X MILLIMETERS MIN MAX 13.90 14.10 13.90 14.10 2.07 2.46 0.30 0.45 2.00 2.40 0.30 0.80 BSC 0.067 0.250 0.130 0.230 0.50 0.66 12.00 REF 5_ 10_ 0.130 0.170 0.40 BSC 2_ 8_ 0.13 0.30 16.20 16.60 0.20 REF 0_ 16.20 16.60 1.10 1.30 INCHES MIN MAX 0.547 0.555 0.547 0.555 0.081 0.097 0.012 0.018 0.079 0.094 0.012 0.031 BSC 0.003 0.010 0.005 0.090 0.020 0.026 0.472 REF 5_ 10_ 0.005 0.007 0.016 BSC 2_ 8_ 0.005 0.012 0.638 0.654 0.008 REF 0_ 0.638 0.654 0.043 0.051
Q
SEATING PLANE
K X M DETAIL C
D
M
DETAIL A
0.20 (0.008)
C AB
SECTION BB
0.20 (0.008) H LM N
52 1
40 39
C L AB G
3X VIEW
Y M B V AB VIEW Y F
BASE METAL
B1
13 14 26 27
V1
PLATING
A1 S1 A S
0.13 (0.005)
SECTION ABAB
C H T
SEATING PLANE
4X
2 0.10 (0.004) T
4X
3 VIEW AA
0.05 (0.002)
NOTES: 1. DIMENSIONING AND TOLERANCING PER ANSI Y14.5M, 1982. 2. CONTROLLING DIMENSION: MILLIMETER. 3. DATUM PLANE H IS LOCATED AT BOTTOM OF LEAD AND IS COINCIDENT WITH THE LEAD WHERE THE LEAD EXITS THE PLASTIC BODY AT THE BOTTOM OF THE PARTING LINE. 4. DATUMS L, M AND N TO BE DETERMINED AT DATUM PLANE H. 5. DIMENSIONS S AND V TO BE DETERMINED AT SEATING PLANE T. 6. DIMENSIONS A AND B DO NOT INCLUDE MOLD PROTRUSION. ALLOWABLE PROTRUSION IS 0.25 (0.010) PER SIDE. DIMENSIONS A AND B DO INCLUDE MOLD MISMATCH AND ARE DETERMINED AT DATUM PLANE -H-. 7. DIMENSION D DOES NOT INCLUDE DAMBAR PROTRUSION. DAMBAR PROTRUSION SHALL NOT CAUSE THE LEAD WIDTH TO EXCEED 0.46 (0.018). MINIMUM SPACE BETWEEN PROTRUSION AND ADJACENT LEAD OR PROTRUSION 0.07 (0.003). MILLIMETERS MIN MAX 10.00 BSC 5.00 BSC 10.00 BSC 5.00 BSC 1.70 0.05 0.20 1.30 1.50 0.20 0.40 0.45 0.75 0.22 0.35 0.65 BSC 0.07 0.20 0.50 REF 0.08 0.20 12.00 BSC 6.00 BSC 0.09 0.16 12.00 BSC 6.00 BSC 0.20 REF 1.00 REF 0_ 7_ 0_ 12 _ REF 5_ 13 _ INCHES MIN MAX 0.394 BSC 0.197 BSC 0.394 BSC 0.197 BSC 0.067 0.002 0.008 0.051 0.059 0.008 0.016 0.018 0.030 0.009 0.014 0.026 BSC 0.003 0.008 0.020 REF 0.003 0.008 0.472 BSC 0.236 BSC 0.004 0.006 0.472 BSC 0.236 BSC 0.008 REF 0.039 REF 0_ 7_ 0_ 12 _ REF 5_ 13 _
W 1 C2
2XR
R1
0.25 (0.010)
GAGE PLANE
K C1 E Z VIEW AA
DIM A A1 B B1 C C1 C2 D E F G J K R1 S S1 U V V1 W Z 1 2 3
D T LM
56
29
B
1 28
L C H
T
SEATING PLANE
K F D 56 PL 0.25 (0.010) E
M
N J
56 PL M
DIM A B C D E F G H J K L M N
T A
0.25 (0.010)
T B
-A48 25
-B1 24
DETAIL X
-TSEATING PLANE
N J
48 PL M
M 48 PL
DIM A B C D F G H J K L M N
T A
0.25 (0.010)
T B
Development Support
MS-DOS is a registered trademark of Microsoft Corporation. M68HC11E Family Data Sheet, Rev. 5.1
188
Freescale Semiconductor
Extensive on-line MCU information via the CHIPINFO command. View memory map, vectors, register, and pinout information pertaining to the device being emulated Host software supports: An editor An assembler and user interface Source-level debug Bus state analysis IBM mouse
IBM
is a registered trademark145 of International Business Machines Corporation. M68HC11E Family Data Sheet, Rev. 5.1
Freescale Semiconductor
189
Development Support
NOTE 1
192
VCC U3 25 C7 1 F C8 0.1 F MCU 34 MCU 33 MCU 32 MCU 31 MCU 30 MCU 29 MCU 28 MCU 27 MCU 20 MCU 21 MCU 22 MCU 23 MCU 24 MCU 25 MCU 43 MCU 45 MCU 47 MCU 49 MCU 44 MCU 46 MCU 48 MCU 50 MCU52 (VRH) C9 0.1 F GND MCU 52 MCU 51 34 33 32 31 30 29 28 27 20 21 22 23 24 25 43 45 47 49 44 46 48 50 52 51 1 VDD PA0/IC3 PA1/IC2 PA2/IC1 PA3/OC5 PA4/OC4 PA5/OC3 PA6/OC2 PA7/OC1 PD0/RXD PD1/TXD PD2/MISO PD3/MOSI PD4/SCK PD5/SS PE0 PE1 PE2 PE3 PE4 PE5 PE6 PE7 VRH VRL VSS PB0/A8 PB1/A9 PB2/A10 PB3/A11 PB4/A12 PB5/A13 PB6/A14 PB7/A15 PC0/AD0 PC1/AD1 PC2/AD2 PC3/AD3 PC4/AD4 PC5/AD5 PC6/AD6 PC7/AD7 E STRB/R/W STRA/AS RESET IRQ XIRQ MODA/LIR MODB/VSTBY 42 41 40 39 38 37 36 35 9 10 11 12 13 14 15 16 5 6 4 17 19 18 3 2 MCU42 MCU41 MCU40 MCU39 MCU38 MCU37 MCU36 MCU35 MCU9 MCU10 MCU11 MCU12 MCU13 MCU14 MCU15 MCU16 MCU5 MCU6 MCU4 MCU17 MCU19 MCU18 MCU3 MCU2 MCU18 (XIRQ) 5 1 J7 2 MCU31 (PA3/OC5) VCC 1 RN1D 47 K 4 VCC 1 RN1C 47 K 3 VCC 1 RN1B 47 K VCC 1 3 J2 2 R4 47 K MCU19 (IRQ) MCU43 (PE0) MCU3 MCU2 MCU8 MCU7 (MODA/LIR) (MODB/VSTBY) 2 2 J6 1 J5 1 J4 1 2
EVBU Schematic
VCC
2 J3 1
R3 1K
MASTER RESET
VCC 2 U2
VCC 1 RN1A 47 K 2 MCU17 (RESET) MCU21 (PD1/TXD) MCU20 (PD0/RXD) SW1 NOTE 1 2 1 NOTE 1 J9 1 J8 2
VCC 1 RN1E 47 K 6
VCC VCC NC
CONNECTOR DB25 13 25 12 24 11 USERS TERMINAL OR PC 23 10 22 9 VCC 21 DCD 8 C14 DTR 20 10 F 20 V + 7 U4 19 VDD 17 DSR 6 C1+ C13 18 C1 VSS 4 5 + C2+ 17 C2 CTS 6 4 TX1 DI1 16 J15 RX1 5 DD1 8 2 1 TXD 3 DI2 TX2 15 RX2 7 DD2 RXD 2 TX3 10 DI3 NOTE 1 14 RX3 9 DD3 1 2
VCC GND
NOTE 1
P2
0.1 F Notes: 1. Default cut traces installed from factory on bottom of the board. 2. X1 is shipped as a ceramic resonator with built-in capacitors. Holes are provided for a crystal and two capacitors.
C11 MC145407
Introduction
The M68HC11 Family of MCUs (microcontroller units) has a bootstrap mode that allows a user-defined program to be loaded into the internal random-access memory (RAM) by way of the serial communications interface (SCI); the M68HC11 then executes this loaded program. The loaded program can do anything a normal user program can do as well as anything a factory test program can do because protected control bits are accessible in bootstrap mode. Although the bootstrap mode is a single-chip mode of operation, expanded mode resources are accessible because the mode control bits can be changed while operating in the bootstrap mode. This application note explains the operation and application of the M68HC11 bootstrap mode. Although basic concepts associated with this mode are quite simple, the more subtle implications of these functions require careful consideration. Useful applications of this mode are overlooked due to an incomplete understanding of bootstrap mode. Also, common problems associated with bootstrap mode could be avoided by a more complete understanding of its operation and implications. Topics discussed in this application note include: Basic operation of the M68HC11 bootstrap mode General discussion of bootstrap mode uses Detailed explanation of on-chip bootstrap logic Detailed explanation of bootstrap firmware Bootstrap firmware vs. EEPROM security Incorporating the bootstrap mode into a system Driving bootstrap mode from another M68HC11 Driving bootstrap mode from a personal computer Common bootstrap mode problems Variations for specific versions of M68HC11 Commented listings for selected M68HC11 bootstrap ROMs
Bootstrap mode can also be used to interactively calibrate critical analog sensors. Since this calibration is done in the final assembled system, it can compensate for any errors in discrete interface circuitry and cabling between the sensor and the analog inputs to the MCU. Note that this calibration routine is a downloaded program that does not take up space in the normal application program.
The alternate vector locations are achieved by simply driving address bit A14 low during all vector fetches if SMOD = 1. For special test mode, the alternate vector locations assure that the reset vector can be fetched from external memory space so the test system can control MCU operation. In special bootstrap mode, the small boot ROM is enabled in the memory map by RBOOT = 1 so the reset vector will be fetched from this ROM and the bootloader firmware will control MCU operation. RBOOT is reset to 1 in bootstrap mode to enable the small boot ROM. In the other three modes, RBOOT is reset to 0 to keep the boot ROM out of the memory map. While in special test mode, SMOD = 1, which allows the RBOOT control bit to be written to 1 by software to enable the boot ROM for testing purposes.
NOTE
Software can change some aspects of the memory map after reset.
Figure 2 shows how the bootloader program differentiates between the default baud rate (7812 baud at a 2-MHz E-clock rate) and the alternate baud rate (1200 baud at a 2-MHz E-clock rate). The host computer sends an initial $FF character, which is used by the bootloader to determine the baud rate that will be used for the downloading operation. The top half of Figure 2 shows normal reception of $FF. Receive data samples at [1] detect the falling edge of the start bit and then verify the start bit by taking a sample at the center of the start bit time. Samples are then taken at the middle of each bit time [2] to reconstruct the value of the received character (all 1s in this case). A sample is then taken at the middle of the stop bit time as a framing check (a 1 is expected) [3]. Unless another character immediately follows this $FF character, the receive data line will idle in the high state as shown at [4]. The bottom half of Figure 2 shows how the receiver will incorrectly receive the $FF character that is sent from the host at 1200 baud. Because the receiver is set to 7812 baud, the receive data samples are taken at the same times as in the upper half of Figure 2. The start bit at 1200 baud [5] is 6.5 times as long as the start bit at 7812 baud [6].
$0000 $01FF EXTERNAL $1000 $103F EXTERNAL 64-BYTE REGISTER BLOCK 512-BYTE RAM
EXTERNAL
EXTERNAL
$B600 $B7FF
512-BYTE EEPROM
$BFC0 $BF00 $BFC0 $BFFF $D000 12K USER EPROM (or OTP) (MAY BE DISABLED BY AN EEPROM BIT) $FFC0 NORMAL MODE VECTORS SINGLE CHIP MODA = 0 MODB = 1 EXPANDED MULTIPLEXED MODA = 1 MODB = 1 SPECIAL BOOTSTRAP MODA = 0 MODB = 0 SPECIAL TEST MODA = 1 MODB = 0 $FFFF EXTERNAL EXTERNAL BOOT ROM SPECIAL MODE VECTORS $BFFF
$FFC0 $FFFF
NOTE: Software can change some aspects of the memory map after reset.
S [1]
[2] 1 $FF
[3]
START
[5]
BIT 0
BIT 1
0 [7]
[8]
? [9]
[11]
[12]
illustrates the extreme measures used in the bootloader firmware to minimize memory usage. However, such measures are not usually considered good programming technique because they are misleading to someone trying to understand the program or use it as an example. After initialization, a break character is transmitted [3] by the SCI. By connecting the TxD pin to the RxD pin (with a pullup because of port D wired-OR mode), this break will be received as a $00 character and cause an immediate jump [4] to the start of the on-chip EEPROM ($B600 in the MC68HC711E9). This feature is useful to pass control to a program in EEPROM essentially from reset. Refer to Common Bootstrap Mode Problems before using this feature. If the first character is received as $FF, the baud rate is assumed to be the default rate (7812 baud at a 2-MHz E-clock rate). If $FF was sent at 1200 baud by the host, the SCI will receive the character as $E0 or $C0 because of the baud rate mismatch, and the bootloader will switch to 1200 baud [5] for the rest of the download operation. When the baud rate is switched to 1200 baud, the delay constant used to monitor the intercharacter delay also must be changed to reflect the new character time. At [6], the Y index register is initialized to $0000 to point to the start of on-chip RAM. The index register Y is used to keep track of where the next received data byte will be stored in RAM. The main loop for loading begins at [7]. The number of data bytes in the downloaded program can be any number between 0 and 512 bytes (the size of on-chip RAM). This procedure is called "variable-length download" and is accomplished by ending the download sequence when an idle time of at least four character times occurs after the last character to be downloaded. In M68HC11 Family members which have 256 bytes of RAM, the download length is fixed at exactly 256 bytes plus the leading $FF character. The intercharacter delay counter is started [8] by loading the delay constant from TOC1 into the X index register. The 19-E-cycle wait loop is executed repeatedly until either a character is received [9] or the allowed intercharacter delay time expires [10]. For 7812 baud, the delay constant is 10,241 E cycles (539 x 19 E cycles per loop). Four character times at 7812 baud is 10,240 E cycles (baud prescale of 4 x baud divider of 4 x 16 internal SCI clocks/bit time x 10 bit times/character x 4 character times). The delay from reset to the initial $FF character is not critical since the delay counter is not started until after the first character ($FF) is received. To terminate the bootloading sequence and jump to the start of RAM without downloading any data to the on-chip RAM, simply send $FF and nothing else. This feature is similar to the jump to EEPROM at [4] except the $FF causes a jump to the start of RAM. This procedure requires that the RAM has been loaded with a valid program since it would make no sense to jump to a location in uninitialized memory. After receiving a character, the downloaded byte is stored in RAM [11]. The data is transmitted back to the host [12] as an indication that the download is progressing normally. At [13], the RAM pointer is incremented to the next RAM address. If the RAM pointer has not passed the end of RAM, the main download loop (from [7] to [14]) is repeated. When all data has been downloaded, the bootloader goes to [16] because of an intercharacter delay timeout [10] or because the entire 512-byte RAM has been filled [15]. At [16], the X and Y index registers are set up for calling the PROGRAM utility routine, which saves the user from having to do this in a downloaded program. The PROGRAM utility is fully explained in EPROM Programming Utility. The final step of the bootloader program is to jump to the start of RAM [17], which starts the users downloaded program.
[1]
START
[2] INITIALIZATION: SP = TOP OF RAM ($01FF) X = START OF REGS ($1000) SPCR = $20 (SET DWOM BIT) BAUD = $A2 ( 4; 4) (7812.5 BAUD @ 2 MHz) SCCR2 = $C0 (Tx & Rx ON) TOC1 = DELAY CONSTANT (539 = 4 SCI CHARACTER TIMES)
SEND BREAK NO
[3]
RECEIVED FIRST CHAR YET ? YES FIRST CHAR = $00 ? NO NOTZERO NO [5] YES
[4] JUMP TO START OF EEPROM ($B600) NOTE THAT A BREAK CHARACTER IS ALSO RECEIVED AS $00
YES
SWITCH TO SLOWER SCI RATE... BAUD = $33 (13; 8) (1200 BAUD @ 2 MHz) CHANGE DELAY CONSTANT... TOC1 = 3504 (4 SCI CHARACTER TIMES) BAUDOK POINT TO START OF RAM ( Y = $0000 ) [7] WAIT [8] [9] LOOP = 19 CYCLES [6]
INITIALIZE TIMEOUT COUNT WTLOOP RECEIVE DATA READY ? NO DECREMENT TIMEOUT COUNT NO TIMED OUT YET ? [10] YES YES
STORE RECEIVED DATA TO RAM ( ,Y ) TRANSMIT (ECHO) FOR VERIFY POINT AT NEXT RAM LOCATION PAST END OF RAM ? YES STAR [15] NO
[16]
[17]
UPLOAD Utility
UPLOAD Utility
The UPLOAD utility subroutine transfers data from the MCU to a host computer system over the SCI serial data link.
NOTE
Only EPROM versions of the M68HC11 include this utility. Verification of EPROM contents is one example of how the UPLOAD utility could be used. Before calling this program, the Y index register is loaded (by user firmware) with the address of the first data byte to be uploaded. If a baud rate other than the current SCI baud rate is to be used for the upload process, the users firmware must also write to the baud register. The UPLOAD program sends successive bytes of data out the SCI transmitter until a reset is issued (the upload loop is infinite). For a complete commented listing example of the UPLOAD utility, refer to Listing 3. MC68HC711E9 Bootloader ROM.
START [8]
$BF00 - PROGRAM
START SEND FIRST DATA BYTE DATA_LOOP NO MORE DATA TO SEND ? YES SEND NEXT DATA [4] [6] [3]
NO
[5] [7] READ PROGRAMMED DATA AND SEND TO VERIFY [11] [14] VERIFY DATA RECEIVED ? YES NO VERIFY DATA CORRECT ? YES YES MORE TO VERIFY ? NO NO
INDICATE ERROR
DONE
$FF [3]
V2
V3
D3
D4
D5
[14]
P3 [15] V2
P4
V3
After the MCU sends $FF [8], it enters the WAIT1 loop [9] and waits for the first data character from the host. When this character is received [10], the MCU programs it into the address pointed to by the Y index register. When the programming time delay is over, the MCU reads the programmed data, transmits it to the host for verification [11], and returns to the top of the WAIT1 loop to wait for the next data character [12]. Because the host previously sent the second data character, it is already waiting in the SCI receiver of the MCU. Steps [13], [14], and [15] correspond to the second pass through the WAIT1 loop. Back in the host, the first verify character is received, and the third data character is sent [6]. The host then waits for the second verify character [7] to come back from the MCU. The sequence continues as long as the host continues to send data to the MCU. Since the WAIT1 loop in the PROGRAM utility is an indefinite loop, reset is used to end the process in the MCU after the host has finished sending data to be programmed.
Mode Select Pins It must be possible to force the MODA and MODB pins to logic 0, which implies that these two pins should be pulled up to VDD through resistors rather than being tied directly to VDD. If mode pins are connected directly to VDD, it is not possible to force a mode other than the one the MCU is hard wired for. It is also good practice to use pulldown resistors to VSS rather than connecting mode pins directly to VSS because it is sometimes a useful debug aid to attempt reset in modes other than the one the system was primarily designed for. Physically, this requirement sometimes calls for the addition of a test point or a wire connected to one or both mode pins. Mode selection only uses the mode pins while RESET is active.
RESET It must be possible to initiate a reset while the mode select pins are held low. In systems where there is no provision for manual reset, it is usually possible to generate a reset by turning power off and back on.
RxD Pin It must be possible to drive the PD0/RxD pin with serial data from a host computer (or another MCU). In many systems, this pin is already used for SCI communications; thus no changes are required.
In systems where the PD0/RxD pin is normally used as a general-purpose output, a serial signal from the host can be connected to the pin without resulting in output driver conflicts. It may be important to consider what the existing logic will do with the SCI serial data instead of the signals that would have been produced by the PD0 pin. In systems where the PD0 pin is used normally as a general-purpose input, the driver circuit that drives the PD0 pin must be designed so that the serial data can override this driver, or the driver must be disconnected during the bootstrap download. A simple series resistor between the driver and the PD0 pin solves this problem as shown in Figure 5. The serial data from the host computer can then be connected to the PD0/RxD pin, and the series resistor will prevent direct conflict between the host driver and the normal PD0 driver.
FROM HOST SYSTEM RS232 LEVEL SHIFTER EXISTING CONTROL SIGNAL EXISTING DRIVER CONNECTED ONLY DURING BOOTLOADING MC68HC11
SERIES RESISTOR
TxD Pin The bootloader program uses the PD1/TxD pin to send verification data back to the host computer. To minimize the possibility of conflicts with circuitry connected to this pin, port D is configured for wire-OR mode by the bootloader program during initialization. Since the wire-OR configuration prevents the pin from driving active high levels, a pullup resistor to VDD is needed if the TxD signal is used. In systems where the PD1/TxD pin is normally used as a general-purpose output, there are no output driver conflicts. It may be important to consider what the existing logic will do with the SCI serial data instead of the signals that would have been produced by the PD1 pin. In systems where the PD1 pin is normally used as a general-purpose input, the driver circuit that drives the PD1 pin must be designed so that the PD1/TxD pin driver in the MCU can override this driver. A simple series resistor between the driver and the PD1 pin can solve this problem. The TxD pin can then be configured as an output, and the series resistor will prevent direct conflict between the internal TxD driver and the external driver connected to PD1 through the series resistor.
Other The bootloader firmware sets the DWOM control bit, which configures all port D pins for wire-OR operation. During the bootloading process, all port D pins except the PD1/TxD pin are configured as high-impedance inputs. Any port D pin that normally is used as an output should have a pullup resistor so it does not float during the bootloading process.
P4
P5
50
50
50
MC68HC711E9 18 PB7 35 35 35 R8 3.3K V DD PB1 PB0 41 42 41 42 41 R12 1K 42 R13 1K J6 XTAL MODB 8 2 J3 TxD 21 21 21 [1] RxD 20 20 20 [2] J8 J9 8 8 V DD V DD 35 R10 15K R9 10K 21 3 2 TxD MODA MODB R7 10K 20 PB7 7 EXTAL D5 RED D6 GREEN 26 C17 0.1 F 1 VDD VSS TARGET MCU U6 17 XIRQ/V PPE RESET
RxD
The duplicator program in EEPROM clears the DWOM control bit to change port D (thus, TxD) of U3 to normal driven outputs. This configuration will prevent interference due to R9 when TxD from the target MCU (U6) becomes active. Series resistor R9 demonstrates how TxD of U3 can drive RxD of U3[1] and later TxD of U6 can drive RxD of U3 without a destructive conflict between the TxD output buffers. As the target MCU (U6) leaves reset, its mode pins select bootstrap mode so the bootloader firmware begins executing. A break is sent out the TxD pin of U6. At this time, the TxD pin of U3 is at a driven high so R9 acts as a pullup resistor for TxD of the target MCU (U6). The break character sent from U6 is received by U3 so the duplicator program that is running in the EEPROM of the master MCU knows that the target MCU is ready to accept a bootloaded program. The master MCU sends a leading $FF character to set the baud rate in the target MCU. Next, the master MCU passes a 3-instruction program to the target MCU and pauses so the bootstrap program in the target MCU will stop the loading process and jump to the start of the downloaded program. This sequence demonstrates the variable-length download feature of the MC68HC711E9 bootloader. The short program downloaded to the target MCU clears the DWOM bit to change its TxD pin to a normal driven CMOS output and jumps to the EPROM programming utility in the bootstrap ROM of the target MCU. Note that the small downloaded program did not have to set up the SCI or initialize any parameters for the EPROM programming process. The bootstrap software that ran prior to the loaded program left the SCI turned on and configured in a way that was compatible with the SCI in the master MCU (the duplicator program in the master MCU also did not have to set up the SCI for the same reason). The programming time and starting address for EPROM programming in the target MCU were also set to default values by the bootloader software before jumping to the start of the downloaded program. Before the EPROM in the target MCU can be programmed, the VPP power supply must be available at the XIRQ/VPPE pin of the target MCU. The duplicator program running in the master MCU monitors this voltage (for presence or absence, not level) at PE7 through resistor divider R14Rl5. The PE7 input was chosen because the internal circuitry for port E pins can tolerate voltages slightly higher than VDD; therefore, resistors R14 and R15 are less critical. No data to be programmed is passed to the target MCU until the master MCU senses that VPP has been stable for about 200 ms. When VPP is ready, the master MCU turns on the red LED (light-emitting diode) and begins passing data to the target MCU. EPROM Programming Utility explains the activity as data is sent from the master MCU to the target MCU and programmed into the EPROM of the target. The master MCU in the EVBU corresponds to the HOST in the programming utility description and the "PROGRAM utility in MCU" is running in the bootstrap ROM of the target MCU. Each byte of data sent to the target is programmed and then the programmed location is read and sent back to the master for verification. If any byte fails, the red and green LEDs are turned off, and the programming operation is aborted. If the entire 12 Kbytes are programmed and verified successfully, the red LED is turned off, and the green LED is turned on to indicate success. The programming of all 12 Kbytes takes about 30 seconds. After a programming operation, the VPP switch (S2) should be turned off before the EVBU power is turned off.
DD RN1D 47K
P4-18 J7 FROM OC5 PIN OF MCU REMOVE J7 JUMPER J14 TO MC68HC68T1 BE SURE NO JUMPER IS ON J14 P5-18
1 48 46 44 38 28 34 35 33 27 19 47 45 41 2 15
7 9 8 10 1
3 1
42
13
20 21 1
25
103D 0028 0004 0080 0002 0001 000A 002E 0080 0020 002F BF00 D000 B600
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
************************************************** * B600 7F103D BEGIN CLR INIT Moves Registers to $0000-3F B603 8604 LDAA #$04 Pattern for DWOM off, no SPI B605 9728 STAA SPCR Turns off DWOM in EVBU MCU B607 8680 LDAA #RESET B609 9704 STAA PORTB Release reset to target MCU B60B 132E20FC WT4BRK BRCLR SCSR RDRF WT4BRK Loop till char received B60F 86FF LDAA #$FF Leading char for bootload ... B611 972F STAA SCDR to target MCU B613 CEB675 LDX #BLPROG Point at program for target B616 8D53 BLLOOP BSR SEND1 Bootload to target B618 8CB67D CPX #ENDBPR Past end ? B61B 26F9 BNE BLLOOP Continue till all sent ***** * Delay for about 4 char times to allow boot related * SCI communications to finish before clearing * Rx related flags B61D CE06A7 LDX #1703 # of 6 cyc loops B620 09 DLYLP DEX [3] B621 26FD BNE DLYLP [3] Total loop time = 6 cyc B623 962E LDAA SCSR Read status (RDRF will be set) B625 962F LDAA SCDR Read SCI data reg to clear RDRF ***** * Now wait for character from target to indicate it's ready for * data to be programmed into EPROM B627 132E20FC WT4FF BRCLR SCSR RDRF WT4FF Wait for RDRF B62B 962F LDAA SCDR Clear RDRF, don't need data B62D CED000 LDX #EPSTRT Point at start of EPROM * Handle turn-on of Vpp B630 18CE523D WT4VPP LDY #21053 Delay counter (about 200ms) B634 150402 BCLR PORTB RED Turn off RED LED B637 960A DLYLP2 LDAA PORTE [3] Wait for Vpp to be ON B639 2AF5 BPL WT4VPP [3] Vpp sense is on port E MSB B63B 140402 BSET PORTB RED [6] Turn on RED LED B63E 1809 DEY [4] B640 26F5 BNE DLYLP2 [3] Total loop time = 19 cyc * Vpp has been stable for 200ms B642 B646 B648 B64B B64D B64F B653 B655 B658 B65A B65D B65F B65F B661 B663 B663 18CED000 8D23 8C0000 DATALP 2702 8D1C 132E20FC VERF 962F 18A100 2705 150403 2007 1808 26E5 140401 VERFOK LDY BSR CPX BEQ BSR BRCLR LDAA CMPA BEQ BCLR BRA INY BNE BSET #EPSTRT X=Tx pointer, Y=verify pointer SEND1 Send first data to target #0 X points at $0000 after last VERF Skip send if no more SEND1 Send another data char SCSR RDRF VERF Wait for Rx ready SCDR Get char and clr RDRF 0,Y Does char verify ? VERFOK Skip error if OK PORTB (RED+GREEN) Turn off LEDs DUNPRG Done (programming failed) Advance verify pointer Continue till all done Grn LED ON
DUNPRG
BCLR BRA
************************************************** * Subroutine to get & send an SCI char. Also * advances pointer (X). ************************************************** B66B A600 SEND1 LDAA 0,X Get a character B66D 132E80FC TRDYLP BRCLR SCSR TDRE TRDYLP Wait for TDRE B671 972F STAA SCDR Send character B673 08 INX Advance pointer B674 39 RTS ** Return ** ************************************************** * Program to be bootloaded to target '711E9 ************************************************** BLPROG LDAA #$04 Pattern for DWOM off, no SPI STAA $1028 Turns off DWOM in target MCU * NOTE: Can't use direct addressing in target MCU because * regs are located at $1000. JMP PROGRAM Jumps to EPROM prog routine ENDBPR EQU *
Symbol Table: Symbol Name BEGIN BLLOOP BLPROG DATALP DLYLP DLYLP2 DUNPRG ENDBPR EPSTRT GREEN INIT PORTB PORTE PROGRAM RDRF RED RESET SCDR SCSR SEND1 SPCR TDRE TRDYLP VERF VERFOK WT4BRK WT4FF WT4VPP
Value B600 B616 B675 B648 B620 B637 B666 B67D D000 0001 103D 0004 000A BF00 0020 0002 0080 002F 002E B66B 0028 0080 B66D B64F B65F B60B B627 B630
Def.# *00029 *00038 *00099 *00068 *00046 *00059 *00083 *00104 *00023 *00015 *00009 *00011 *00016 *00022 *00020 *00014 *00013 *00021 *00017 *00090 *00010 *00019 *00091 *00071 *00078 *00034 *00053 *00057
00040 00037 00079 00047 00063 00076 00039 00055 00075 00029 00033 00059 00103 00034 00058 00032 00036 00034 00038 00031 00091 00091 00069 00074 00034 00053 00060
00071 00075 00083 00054 00072 00092 00053 00071 00091 00070
00071
Errors: Labels: Last Program Address: Last Storage Address: Program Bytes: Storage Bytes:
125 0
Hardware Figure 7 shows a small modification to the EVBU to accommodate the 12-volt (nominal) EPROM programming voltage. The XIRQ pin is connected to a pullup resistor, two jumpers, and the 60-pin connectors, P4 and P5. The object of the modification is to isolate the XIRQ pin and then connect it to the programming power supply. Carefully cut the trace on the solder side of the EVBU as indicated in Figure 7. This disconnects the pullup resistor RN1 D from XIRQ but leaves P418, P518, and jumpers J7 and J14 connected so the EVBU can still be used for other purposes after programming is done. Remove any fabricated jumpers from J7 and J14. The EVBU normally has a jumper at J7 to support the trace function Figure 8 shows a small circuit that is added to the wire-wrap area of the EVBU. The 3-terminal jumper allows the XIRQ line to be connected to either the programming power supply or to a substitute pullup resistor for XIRQ. The 100-ohm resistor is a current limiter to protect the 12-volt input of the MCU. The resistor and LED connected to P5 pin 9 (port C bit 0) is an optional indicator that lights when programming is complete.
Software BASIC was chosen as the programming language due to its readability and availability in parallel versions on both the IBM PC and the Macintosh. The program demonstrates several programming techniques for use with an M68HC11 and is not necessarily intended to be a finished, commercial program. For example, there is little error checking, and the user interface is elementary. A complete listing of the BASIC program is included in Listing 2. BASIC Program for Personal Computer with moderate comments. The following paragraphs include a more detailed discussion of the program as it pertains to communicating with and programming the target MC68HC711E9. Lines 2545 initialize and define the variables and array used in the program. Changes to this section would allow for other programs to be downloaded.
Macintosh
IBM is a registered trademark of International Business Machines. is a registered trademark of Apple Computers, Inc.
47K NORMAL EVBU OPERATION 100 +12.25 V + PROGRAMMING POWER COMMON 20 F PROGRAM EPROM JUMPER
Figure 8. PC-to-MCU Programming Circuit Lines 5095 read in the small bootloader from DATA statements at the end of the listing. The source code for this bootloader is presented in the DATA statements. The bootloaded code makes port C bit 0 low, initializes the X and Y registers for use by the EPROM programming utility routine contained in the boot ROM, and then jumps to that routine. The hexadecimal values read in from the DATA statements are converted to binary values by a subroutine. The binary values are then saved as one string (BOOTCODE$). The next long section of code (lines 971250) reads in the S records from an external disk file (in this case, BUF34.S19), converts them to integer, and saves them in an array. The techniques used in this section show how to convert ASCII S records to binary form that can be sent (bootloaded) to an M68HC11. This S-record translator only looks for the S1 records that contain the actual object code. All other S-record types are ignored. When an S1 record is found (lines 10001024), the next two characters form the hex byte giving the number of hex bytes to follow. This byte is converted to integer by the same subroutine that converted the bootloaded code from the DATA statements. This BYTECOUNT is adjusted by subtracting 3, which accounts for the address and checksum bytes and leaves just the number of object-code bytes in the record. Starting at line 1100, the 2-byte (4-character) starting address is converted to decimal. This address is the starting address for the object code bytes to follow. An index into the CODE% array is formed by subtracting the base address initialized at the start of the program from the starting address for this S record. A FOR-NEXT loop starting at line 1130 converts the object code bytes to decimal and saves them in the CODE% array. When all the object code bytes have been converted from the current S record, the program loops back to find the next S1 record.
A problem arose with the BASIC programming technique used. The draft versions of this program tried saving the object code bytes directly as binary in a string array. This caused "Out of Memory" or "Out of String Space" errors on both a 2-Mbyte Macintosh and a 640-Kbyte PC. The solution was to make the array an integer array and perform the integer-to-binary conversion on each byte as it is sent to the target part. The one compromise made to accommodate both Macintosh and PC versions of BASIC is in lines 1500 and 1505. Use line 1500 and comment out line 1505 if the program is to be run on a Macintosh, and, conversely, use line 1505 and comment out line 1500 if a PC is used. After the COM port is opened, the code to be bootloaded is modified by adding the $FF to the start of the string. $FF synchronizes the bootloader in the MC68HC711E9 to 1200 baud. The entire string is simply sent to the COM port by PRINTing the string. This is possible since the string is actually queued in BASICs COM buffer, and the operating system takes care of sending the bytes out one at a time. The M68HC11 echoes the data received for verification. No automatic verification is provided, though the data is printed to the screen for manual verification. Once the MCU has received this bootloaded code, the bootloader automatically jumps to it. The small bootloaded program in turn includes a jump to the EPROM programming routine in the boot ROM. Refer to the previous explanation of the EPROM Programming Utility for the following discussion. The host system sends the first byte to be programmed through the COM port to the SCI of the MCU. The SCI port on the MCU buffers one byte while receiving another byte, increasing the throughput of the EPROM programming operation by sending the second byte while the first is being programmed. When the first byte has been programmed, the MCU reads the EPROM location and sends the result back to the host system. The host then compares what was actually programmed to what was originally sent. A message indicating which byte is being verified is displayed in the lower half of the screen. If there is an error, it is displayed at the top of the screen. As soon as the first byte is verified, the third byte is sent. In the meantime, the MCU has already started programming the second byte. This process of verifying and queueing a byte continues until the host finishes sending data. If the programming is completely successful, no error messages will have been displayed at the top of the screen. Subroutines follow the end of the program to handle some of the repetitive tasks. These routines are short, and the commenting in the source code should be sufficient explanation. Modifications This example programmed version 3.4 of the BUFFALO monitor into the EPROM of an MC68HC711E9; the changes to the BASIC program to download some other program are minor. The necessary changes are: 1. In line 30, the length of the program to be downloaded must be assigned to the variable CODESIZE%. 2. Also in line 30, the starting address of the program is assigned to the variable ADRSTART. 3. In line 9570, the start address of the program is stored in the third and fourth items in that DATA statement in hexadecimal. 4. If any changes are made to the number of bytes in the boot code in the DATA statements in lines 95009580, then the new count must be set in the variable "BOOTCOUNT" in line 25.
M68HC11 Bootstrap Mode, Rev. 1.1 Freescale Semiconductor 213
Operation Configure the EVBU for boot mode operation by putting a jumper at J3. Ensure that the trace command jumper at J7 is not installed because this would connect the 12-V programming voltage to the OC5 output of the MCU. Connect the EVBU to its dc power supply. When it is time to program the MCU EPROM, turn on the 12-volt programming power supply to the new circuitry in the wire-wrap area. Connect the EVBU serial port to the appropriate serial port on the host system. For the Macintosh, this is the modem port with a modem cable. For the MS-DOS computer, it is connected to COM1 with a straight through or modem cable. Power up the host system and start the BASIC program. If the program has not been compiled, this is accomplished from within the appropriate BASIC compiler or interpreter. Power up the EVBU. Answer the prompt for filename with either a [RETURN] to accept the default shown or by typing in a new filename and pressing [RETURN]. The program will inform the user that it is working on converting the file from S records to binary. This process will take from 30 seconds to a few minutes, depending on the computer. A prompt reading, "Comm port open?" will appear at the end of the file conversion. This is the last chance to ensure that everything is properly configured on the EVBU. Pressing [RETURN] will send the bootcode to the target MC68HC711E9. The program then informs the user that the bootload code is being sent to the target, and the results of the echoing of this code are displayed on the screen. Another prompt reading "Programming is ready to begin. Are you?" will appear. Turn on the 12-volt programming power supply and press [RETURN] to start the actual programming of the target EPROM. A count of the byte being verified will be updated continually on the screen as the programming progresses. Any failures will be flagged as they occur. When programming is complete, a message will be displayed as well as a prompt requesting the user to press [RETURN] to quit. Turn off the 12-volt programming power supply before turning off 5 volts to the EVBU.
MS-DOS is a registered trademark of Microsoft Corporation in the United States and oth175190er countries.
1090 1099 1100 1102 1104 1106 1108 1110 1112 1114 1116 1118 1120 1122 1124 1129 1130 1140 1150 1160 1170 1180 1190 1200 1210 1220 1230 1250 1499 1500 1505 1510 1512 1513 1514 1515 1520 1530 1540 1550 1560 1564 1565 1570 1590 1595 1597 1598 1599 1600 1610 1620 1625 1630 1635
BYTECOUNT = BYTECOUNT - 3 'ADJUST FOR ADDRESS + CHECKSUM REM ***** NEXT 4 HEX DIGITS BECOME THE STARTING ADDRESS FOR THE DATA ***** GOSUB 6000 'GET FIRST NIBBLE OF ADDRESS GOSUB 7000 'CONVERT TO DECIMAL ADDRESS= 4096 * X GOSUB 6000 'GET NEXT NIBBLE GOSUB 7000 ADDRESS= ADDRESS+ 256 * X GOSUB 6000 GOSUB 7000 ADDRESS= ADDRESS+ 16 * X GOSUB 6000 GOSUB 7000 ADDRESS= ADDRESS+ X ARRAYCNT = ADDRESS-ADRSTART 'INDEX INTO ARRAY REM ***** CONVERT THE DATA DIGITS TO BINARY AND SAVE IN THE ARRAY ***** FOR I = 1 TO BYTECOUNT GOSUB 6000 GOSUB 7000 Y = 16 * X 'SAVE UPPER NIBBLE OF BYTE GOSUB 6000 GOSUB 7000 Y = Y + X 'ADD LOWER NIBBLE CODE%(ARRAYCNT) = Y 'SAVE BYTE IN ARRAY ARRAYCNT = ARRAYCNT + 1 'INCREMENT ARRAY INDEX NEXT I GOTO 1000 CLOSE 1 REM ***** DUMP BOOTLOAD CODE TO PART ***** 'OPEN "R",#2,"COM1:1200,N,8,1" 'Macintosh COM statement OPEN "COM1:1200,N,8,1,CD0,CS0,DS0,RS" FOR RANDOM AS #2 'DOS COM statement INPUT "Comm port open"; Q$ WHILE LOC(2) >0 'FLUSH INPUT BUFFER GOSUB 8020 WEND PRINT : PRINT "Sending bootload code to target part..." A$ = CHR$(255) + BOOTCODE$ 'ADD HEX FF TO SET BAUD RATE ON TARGET HC11 GOSUB 6500 PRINT FOR I = 1 TO BOOTCOUNT '# OF BYTES IN BOOT CODE BEING ECHOED GOSUB 8000 K=ASC(B$):GOSUB 8500 PRINT "Character #"; I; " received = "; HX$ NEXT I PRINT "Programming is ready to begin.": INPUT "Are you ready"; Q$ CLS WHILE LOC(2) > 0 'FLUSH INPUT BUFFER GOSUB 8020 WEND XMT = 0: RCV = 0 'POINTERS TO XMIT AND RECEIVE BYTES A$ = CHR$(CODE%(XMT)) GOSUB 6500 'SEND FIRST BYTE FOR I = 1 TO CODESIZE% - 1 'ZERO BASED ARRAY 0 -> CODESIZE-1 A$ = CHR$(CODE%(I)) 'SEND SECOND BYTE TO GET ONE IN QUEUE GOSUB 6500 'SEND IT
M68HC11 Bootstrap Mode, Rev. 1.1
216
Freescale Semiconductor
1640 1650 1660 1664 1665 1666 1668 1669 1670 1680 1690 1700 1710 1713 1714 1715 1716 1720 4900 4910 5000 5900 5910 5930 5940 6000 6010 6020 6030 6490 6492 6494 6496 6500 6510 6590 6594 6596 7000 7010 7020 7030 7990 7992 7994 7996 7998 7999 8000 8005 8010 8020 8030 8490
GOSUB 8000 'GET BYTE FOR VERIFICATION RCV = I - 1 LOCATE 10,1:PRINT "Verifying byte #"; I; " " IF CHR$(CODE%(RCV)) = B$ THEN 1670 K=CODE%(RCV):GOSUB 8500 LOCATE 1,1:PRINT "Byte #"; I; " ", " - Sent "; HX$; K=ASC(B$):GOSUB 8500 PRINT " Received "; HX$; NEXT I GOSUB 8000 'GET BYTE FOR VERIFICATION RCV = CODESIZE% - 1 LOCATE 10,1:PRINT "Verifying byte #"; CODESIZE%; " " IF CHR$(CODE%(RCV)) = B$ THEN 1720 K=CODE(RCV):GOSUB 8500 LOCATE 1,1:PRINT "Byte #"; CODESIZE%; " ", " - Sent "; HX$; K=ASC(B$):GOSUB 8500 PRINT " Received "; HX$; LOCATE 8, 1: PRINT : PRINT "Done!!!!" CLOSE INPUT "Press [RETURN] to quit...", Q$ END '*********************************************************************** '* SUBROUTINE TO READ IN ONE BYTE FROM A DISK FILE '* RETURNS BYTE IN A$ '*********************************************************************** FLAG = 0 IF EOF(1) THEN FLAG = 1: RETURN A$ = INPUT$(1, #1) RETURN '*********************************************************************** '* SUBROUTINE TO SEND THE STRING IN A$ OUT TO THE DEVICE '* OPENED AS FILE #2. '*********************************************************************** PRINT #2, A$; RETURN '*********************************************************************** '* SUBROUTINE THAT CONVERTS THE HEX DIGIT IN A$ TO AN INTEGER '*********************************************************************** X = INSTR(H$, A$) IF X = 0 THEN FLAG = 1 X = X - 1 RETURN '********************************************************************** '* SUBROUTINE TO READ IN ONE BYTE THROUGH THE COMM PORT OPENED '* AS FILE #2. WAITS INDEFINITELY FOR THE BYTE TO BE '* RECEIVED. SUBROUTINE WILL BE ABORTED BY ANY '* KEYBOARD INPUT. RETURNS BYTE IN B$. USES Q$. '********************************************************************** WHILE LOC(2) = 0 'WAIT FOR COMM PORT INPUT Q$ = INKEY$: IF Q$ <> "" THEN 4900 'IF ANY KEY PRESSED, THEN ABORT WEND B$ = INPUT$(1, #2) RETURN '************************************************************************
8491 8492 8493 8494 8500 8510 8520 8530 9499 9500 9510 9520 9530 9540 9550 9560 9570 9580 9590
'* DECIMAL TO HEX CONVERSION '* INPUT: K - INTEGER TO BE CONVERTED '* OUTPUT: HX$ - TWO CHARACTER STRING WITH HEX CONVERSION '************************************************************************ IF K > 255 THEN HX$="Too big":GOTO 8530 HX$=MID$(H$,K\16+1,1) 'UPPER NIBBLE HX$=HX$+MID$(H$,(K MOD 16)+1,1) 'LOWER NIBBLE RETURN '******************** BOOT CODE **************************************** DATA 86, 23 'LDAA #$23 DATA B7, 10, 02 'STAA OPT2 make port C wire or DATA 86, FE 'LDAA #$FE DATA B7, 10, 03 'STAA PORTC light 1 LED on port C bit 0 DATA C6, FF 'LDAB #$FF DATA F7, 10, 07 'STAB DDRC make port C outputs DATA CE, 0F, A0 'LDX #4000 2msec at 2MHz DATA 18, CE, E0, 00 'LDY #$E000 Start of BUFFALO 3.4 DATA 7E, BF, 00 'JMP $BF00 EPROM routine start address '***********************************************************************
Reset Conditions vs. Conditions as Bootloaded Program Starts It is common to confuse the reset state of systems and control bits with the state of these systems and control bits when a bootloaded program in RAM starts. Between these times, the bootloader program is executed, which changes the states of some systems and control bits: The SCI system is initialized and turned on (Rx and Tx). The SCI system has control of the PD0 and PD1 pins. Port D outputs are configured for wire-OR operation. The stack pointer is initialized to the top of RAM. Time has passed (two or more SCI character times). Timer has advanced from its reset count value. Users also forget that bootstrap mode is a special mode. Thus, privileged control bits are accessible, and write protection for some registers is not in effect. The bootstrap ROM is in the memory map. The DISR bit in the TEST1 control register is set, which disables resets from the COP and clock monitor systems. Since bootstrap is a special mode, these conditions can be changed by software. The bus can even be switched from single-chip mode to expanded mode to gain access to external memories and peripherals.
MC68HC11A0 MC68HC11A1 MC68HC11A8 MC68SEC11A8 MC68HC11D3 MC68HC711D3 MC68HC811E2 MC68SEC811E2 MC68HC11E0 MC68HC11E1 MC68HC11E9 MC68SEC11E9 MC68HC711E9 MC68HC11F1 MC68HC11K4 MC68HC711K4
NOTES:
1. By sending $00 or a break as the first SCI character after reset in bootstrap mode, a jump (JMP) is executed to the address in this table rather than doing a download. Unless otherwise noted, this address is the start of EEPROM. Tying RxD to TxD and using a pullup resistor from TxD to VDD will cause the SCI to see a break as the first received character. 2. If $55 is received as the first character after reset in bootstrap mode, a jump (JMP) is executed to the start of on-chip RAM rather than doing a download. This $55 character must be sent at the default baud rate (7812 baud @ E = 2 MHz). For devices with variable-length download, the same effect can be achieved by sending $FF and no other SCI characters. After four SCI character times, the download terminates, and a jump (JMP) to the start of RAM is executed. The jump to RAM feature is only useful if the RAM was previously loaded with a meaningful program. 3. A callable utility subroutine is included in the bootstrap ROM of the indicated versions to program bytes of on-chip EPROM with data received via the SCI. 4. A callable utility subroutine is included in the bootstrap ROM of the indicated versions to upload contents of on-chip memory to a host computer via the SCI. 5. The complete listing for this bootstrap ROM may be found in the M68HC11 Reference Manual, Freescale document order number M68HC11RM/AD. 6. The complete listing for this bootstrap ROM is available in the freeware area of the Freescale Web site. 7. Due to the extra program space needed for EEPROM security on this device, there are no pseudo-vectors for SCI, SPI, PAIF, PAOVF, TOF, OC5F, or OC4F interrupts. 8. This bootloader extends the automatic software detection of baud rates to include 9600 baud at 2-MHz E-clock rate.
219
Connecting RxD to VSS Does Not Cause the SCI to Receive a Break To force an immediate jump to the start of EEPROM, the bootstrap firmware looks for the first received character to be $00 (or break). The data reception logic in the SCI looks for a 1-to-0 transition on the RxD pin to synchronize to the beginning of a receive character. If the RxD pin is tied to ground, no 1-to-0 transition occurs. The SCI transmitter sends a break character when the bootloader firmware starts, and this break character can be fed back to the RxD pin to cause the jump to EEPROM. Since TxD is configured as an open-drain output, a pullup resistor is required.
$FF Character Is Required before Loading into RAM The initial character (usually $FF) that sets the download baud rate is often forgotten.
Original M68HC11 Versions Required Exactly 256 Bytes to be Downloaded to RAM Even users that know about the 256 bytes of download data sometimes forget the initial $FF that makes the total number of bytes required for the entire download operation equal to 256 + 1 or 257 bytes.
Variable-Length Download When on-chip RAM surpassed 256 bytes, the time required to serially load this many characters became more significant. The variable-length download feature allows shorter programs to be loaded without sacrificing compatibility with earlier fixed-length download versions of the bootloader. The end of a download is indicated by an idle RxD line for at least four character times. If a personal computer is being used to send the download data to the MCU, there can be problems keeping characters close enough together to avoid tripping the end-of-download detect mechanism. Using 1200 as the baud rate rather than the faster default rate may help this problem. Assemblers often produce S-record encoded programs which must be converted to binary before bootloading them to the MCU. The process of reading S-record data from a file and translating it to binary can be slow, depending on the personal computer and the programming language used for the translation. One strategy that can be used to overcome this problem is to translate the file into binary and store it into a RAM array before starting the download process. Data can then be read and downloaded without the translation or file-read delays. The end-of-download mechanism goes into effect when the initial $FF is received to set the baud rate. Any amount of time may pass between reset and when the $FF is sent to start the download process.
EPROM/OTP Versions of M68HC11 Have an EPROM Emulation Mode The conditions that configure the MCU for EPROM emulation mode are essentially the same as those for resetting the MCU in bootstrap mode. While RESET is low and mode select pins are configured for bootstrap mode (low), the MCU is configured for EPROM emulation mode. The port pins that are used for EPROM data I/O lines may be inputs or outputs, depending on the pin that is emulating the EPROM output enable pin (OE). To make these data pins appear as high-impedance inputs as they would on a non-EPROM part in reset, connect the PB7/(OE) pin to a pullup resistor.
M68HC11 Bootstrap Mode, Rev. 1.1 220 Freescale Semiconductor
Bootloading a Program to Performa ROM Checksum The bootloader ROM must be turned off before performing the checksum program. To remove the boot ROM from the memory map, clear the RBOOT bit in the HPRIO register. This is normally a write-protected bit that is 0, but in bootstrap mode it is reset to 1 and can be written. If the boot ROM is not disabled, the checksum routine will read the contents of the boot ROM rather than the users mask ROM or EPROM at the same addresses. Inherent Delays Caused by Double Buffering of SCI Data This problem is troublesome in cases where one MCU is bootloading to another MCU. Because of transmitter double buffering, there may be one character in the serial shifter as a new character is written into the transmit data register. In cases such as downloading in which this 2-character pipeline is kept full, a 2-character time delay occurs between when a character is written to the transmit data register and when that character finishes transmitting. A little more than one more character time delay occurs between the target MCU receiving the character and echoing it back. If the master MCU waits for the echo of each downloaded character before sending the next one, the download process takes about twice as long as it would if transmission is treated as a separate process or if verify data is ignored.
10,080 14,400
0008 000E 0016 0023 0080 0028 002B 002D 002E 002F 003B 0020 0001
B600 B7FF
* DELAY CONSTANTS * DELAYS EQU 3504 DELAYF EQU 539 * PROGDEL EQU 4200 *
Delay at slow baud Delay at fast baud 2 ms programming delay At 2.1 MHz
BF00
**************************************************** ORG $BF00 **************************************************** * Next two instructions provide a predictable place * to call PROGRAM and UPLOAD even if the routines * change size in future versions. * PROGRAM JMP PRGROUT EPROM programming utility UPLOAD EQU * Upload utility
**************************************************** * UPLOAD - Utility subroutine to send data from * inside the MCU to the host via the SCI interface. * Prior to calling UPLOAD set baud rate, turn on SCI * and set Y=first address to upload. * Bootloader leaves baud set, SCI enabled, and * Y pointing at EPROM start ($D000) so these default * values do not have to be changed typically. * Consecutive locations are sent via SCI in an * infinite loop. Reset stops the upload process. **************************************************** BF03 CE1000 LDX #$1000 Point to internal registers BF06 18A600 UPLOOP LDAA 0,Y Read byte BF09 1F2E80FC BRCLR SCSR,X $80 * Wait for TDRE BF0D A72F STAA SCDAT,X Send it BF0F 1808 INY BF11 20F3 BRA UPLOOP Next... **************************************************** * PROGRAM - Utility subroutine to program EPROM. * Prior to calling PROGRAM set baud rate, turn on SCI * set X=2ms prog delay constant, and set Y=first * address to program. SP must point to RAM. * Bootloader leaves baud set, SCI enabled, X=4200 * and Y pointing at EPROM start ($D000) so these * default values don't have to be changed typically. * Delay constant in X should be equivalent to 2 ms * at 2.1 MHz X=4200; at 1 MHz X=2000. * An external voltage source is required for EPROM * programming.
M68HC11 Bootstrap Mode, Rev. 1.1
Freescale Semiconductor
223
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
* This routine uses 2 bytes of stack space * Routine does not return. Reset to exit. **************************************************** PRGROUT EQU * PSHX Save program delay constant LDX #$1000 Point to internal registers * Send $FF to indicate ready for program data
BF17 1F2E80FC BF1B 86FF BF1D A72F BF1F BF1F BF23 BF25 BF28 BF2A BF2C BF2E BF31 BF33 BF35 BF36 BF37 BF38 BF39 BF3B BF3D BF3F WAIT1 1F2E20FC E62F 18E100 271D 8620 A73B 18E700 8621 A73B 32 33 37 36 E30E ED16 8680 A723
BRCLR LDAA STAA EQU BRCLR LDAB CMPB BEQ LDAA STAA STAB LDAA STAA PULA PULB PSHB PSHA ADDD STD LDAA STAA BRCLR CLR * DONEIT
SCSR,X $80 * #$FF SCDAT,X * SCSR,X $20 * SCDAT,X $0,Y DONEIT #ELAT PPROG,X 0,Y #ELAT+EPGM PPROG,X
Wait for RDRF Get received byte See if already programmed If so, skip prog cycle Put EPROM in prog mode Write the data Turn on prog voltage Pull delay constant into D-reg But also keep delay keep delay on stack Delay const + present TCNT Schedule OC1 (2ms delay) Clear any previous flag
BF41 1F2380FC BF45 6F3B BF47 BF47 BF4B BF4E BF50 BF52
TFLG1,X OC1F * Wait for delay to expire PPROG,X Turn off prog voltage
EQU * BRCLR SCSR,X $80 * Wait for TDRE LDAA $0,Y Read from EPROM and... STAA SCDAT,X Xmit for verify INY Point at next location BRA WAIT1 Back to top for next * Loops indefinitely as long as more data sent. **************************************************** * Main bootloader starts here **************************************************** * RESET vector points to here
EQU * LDS #RAMEND Initialize stack pntr LDX #$1000 Point at internal regs BSET SPCR,X $20 Select port D wire-OR mode LDD #$A20C BAUD in A, SCCR2 in B STAA BAUD,X SCPx = 4, SCRx = 4 * Writing 1 to MSB of BAUD resets count chain
M68HC11 Bootstrap Mode, Rev. 1.1
224
Freescale Semiconductor
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
Rx and Tx Enabled Delay for fast baud rate Set as default delay
BF69 BF6C BF70 BF73 BF73 BF77 BF79 BF7B BF7E BF7E BF80 BF82 BF85 BF88 BF8A BF8A BF8E BF8E BF90 BF90 BF94 BF95 BF96 BF97 BF99 BF9B BF9B BF9D BFA0 BFA2 BFA4 BFA8
signal ready for download SCCR2,X $01 Set send break bit PORTD,X $01 * Wait for RxD pin to go low SCCR2,X $01 Clear send break bit
BRCLR SCSR,X $20 * Wait for RDRF LDAA SCDAT,X Read data * Data will be $00 if BREAK OR $00 received 2603 BNE NOTZERO Bypass JMP if not 0 7EB600 JMP EEPMSTR Jump to EEPROM if it was 0 NOTZERO EQU * 81FF CMPA #$FF $FF will be seen as $FF 2708 BEQ BAUDOK If baud was correct * Or else change to 104 (13 & 8) 1200 @ 2MHZ 1C2B33 BSET BAUD,X $33 Works because $22 -> $33 CC0DB0 LDD #DELAYS And switch to slower... ED16 STD TOC1,X delay constant BAUDOK EQU * 18CE0000 LDY #RAMSTR Point at start of RAM WAIT EC16 WTLOOP 1E2E2007 8F 09 8F 26F7 200F NEWONE A62F 18A700 A72F 1808 188C0200 26E4 EQU LDD EQU BRSET XGDX DEX XGDX BNE BRA EQU LDAA STAA STAA INY CPY BNE * TOC1,X Move delay constant to D * SCSR,X $20 NEWONE Exit loop if RDRF set Swap delay count to X Decrement count Swap back to D WTLOOP Loop if not timed out STAR Quit download on timeout * SCDAT,X $00,Y SCDAT,X #RAMEND+1 WAIT
Get received data Store to next RAM location Transmit it for handshake Point at next RAM location See if past end If not, Get another
BFAA STAR EQU * BFAA CE1068 LDX #PROGDEL Init X with programming delay BFAD 18CED000 LDY #EPRMSTR Init Y with EPROM start addr BFB1 7E0000 JMP RAMSTR ** EXIT to start of RAM ** BFB4 **************************************************** * Block fill unused bytes with zeros BFB4 000000000000 000000000000 000000000000 000000000000 0000000000 BSZ $BFD1-*
213 214 215 216 217 BFD1 41 218 219 220 221 BFD2 0000 222 223 224 225 BFD4 71E9 226 227 228 229 230 BFD6 00C4 231 BFD8 00C7 232 BFDA 00CA 233 BFDC 00CD 234 BFDE 00D0 235 BFE0 00D3 236 BFE2 00D6 237 BFE4 00D9 238 BFE6 00DC 239 BFE8 00DF 240 BFEA 00E2 241 BFEC 00E5 242 BFEE 00E8 243 BFF0 00EB 244 BFF2 00EE 245 BFF4 00F1 246 BFF6 00F4 247 BFF8 00F7 248 BFFA 00FA 249 BFFC 00FD 250 BFFE BF54 251 C000 Symbol Table: Symbol Name BAUD BAUDOK BEGIN DELAYF DELAYS DONEIT EEPMEND EEPMSTR ELAT EPGM EPRMEND EPRMSTR
**************************************************** * Boot ROM revision level in ASCII * (ORG $BFD1) FCC "A" **************************************************** * Mask set I.D. ($0000 FOR EPROM PARTS) * (ORG $BFD2) FDB $0000 **************************************************** * '711E9 I.D. - Can be used to determine MCU type * (ORG $BFD4) FDB $71E9 **************************************************** * VECTORS - point to RAM for pseudo-vector JUMPs FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB FDB END $100-60 $100-57 $100-54 $100-51 $100-48 $100-45 $100-42 $100-39 $100-36 $100-33 $100-30 $100-27 $100-24 $100-21 $100-18 $100-15 $100-12 $100-9 $100-6 $100-3 BEGIN SCI SPI PULSE ACCUM INPUT EDGE PULSE ACCUM OVERFLOW TIMER OVERFLOW TIMER OUTPUT COMPARE 5 TIMER OUTPUT COMPARE 4 TIMER OUTPUT COMPARE 3 TIMER OUTPUT COMPARE 2 TIMER OUTPUT COMPARE 1 TIMER INPUT CAPTURE 3 TIMER INPUT CAPTURE 2 TIMER INPUT CAPTURE 1 REAL TIME INT IRQ XIRQ SWI ILLEGAL OP-CODE COP FAIL CLOCK MONITOR RESET
Value 002B BF8A BF54 021B 0DB0 BF47 B7FF B600 0020 0001 FFFF D000
Def.# *00037 *00183 *00155 *00061 *00060 *00142 *00050 *00049 *00043 *00044 *00053 *00052
Line Number Cross Reference 00160 00180 00178 00250 00163 00181 00124 00175 00125 00128 00128 00206
M68HC11 Bootstrap Mode, Rev. 1.1
226
Freescale Semiconductor
NEWONE NOTZERO OC1F PORTD PPROG PRGROUT PROGDEL PROGRAM RAMEND RAMSTR SCCR2 SCDAT SCSR SPCR STAR TCNT TFLG1 TOC1 UPLOAD UPLOOP WAIT WAIT1 WTLOOP
BF9B BF7E 0080 0008 003B BF13 1068 BF00 01FF 0000 002D 002F 002E 0028 BFAA 000E 0023 0016 BF03 BF06 BF8E BF1F BF90
*00196 *00176 *00034 *00029 *00041 *00110 *00063 *00074 *00056 *00055 *00038 *00040 *00039 *00036 *00204 *00030 *00032 *00031 *00075 *00089 *00186 *00120 *00188
00189 00174 00136 00139 00168 00126 00129 00140 00074 00205 00156 00184 00162 00091 00090 00158 00194 00134 00137 00135 00093 00202 00147 00193 00201 00207 00167 00169 00118 00122 00145 00172 00197 00199 00116 00121 00143 00171 00189
Errors: Labels: Last Program Address: Last Storage Address: Program Bytes: Storage Bytes:
256 0
Enabling the Security Feature on the MC68HC711E9 Devices with PCbug11 on the M68HC711E9PGMR
By Edgar Saenz Austin, Texas
Introduction
The PCbug11 software, needed along with the M68HC711E9PGMR to program MC68HC711E9 devices, is available from the download section of the Microcontroller Worldwide Web site: http://www.freescale.com Retrieve the file pcbug342.exe (a self-extracting archive) from the MCU11 directory. Some Freescale evaluation board products also are shipped with PCbug11.
NOTE
For specific information about any of the PCbug11 commands, see the appropriate sections in the PCbug11 User's Manual (part number M68PCBUG11/D2), which is available from the Freescale Literature Distribution Center, as well as the Worldwide Web at http://www.freescale.com. The file is also on the software download system and is called pcbug11.pdf.
Step 2 Apply power to the programmer board by moving the +5-V switch to the ON position. From a DOS command line prompt, start PCbug11this way: C:\PCBUG11\ > PCBUG11 E PORT = 1 with the E9PGMR connected to COM1 or C:\PCBUG11\ > PCBUG11 E PORT = 2 with the E9PGMR connected to COM2 PCbug11 only supports COM ports 1 and 2. If the proper connections are made and you have a high-quality cable, you should quickly get a PCbug11 command prompt. If you do receive a Comms fault error, check the cable and board connections. Most PCbug11 communications problems can be traced to poorly made cables or bad board connections. Step 3 PCbug11 defaults to base 10 for its input parameters. Change this to hexadecimal by typing: CONTROL BASE HEX. Step 4 Clear the block protect register (BPROT) to allow programming of the MC68HC711E9 EEPROM. At the PCbug11 command prompt, type: MS 1035 00.
Enabling the Security Feature on the MC68HC711E9 Devices with PCbug11 on the M68HC711E9PGMR, Rev. 0.1 230 Freescale Semiconductor
Step 5 The CONFIG register defaults to hexadecimal 103F on the MC68HC711E9. PCBUG11 needs adressing parameters to allow programming of a specific block of memory so the following parameter must be given. At the PCbug11 command prompt, type: EEPROM 0. Then type: EEPROM 103F 103F. Step 6 Erase the CONFIG to allow byte programming. At the PCbug11 command prompt, type: EEPROM ERASE BULK 103F. Step 7 You are now ready to download the program into the EEPROM and EPROM. At the PCbug11command prompt, type: LOADSC:\MYPROG\MYPROG.S19. For more details on programming the EPROM, read the engineering bulletin Programming MC68HC711E9 Devices with PCbug11 and the M68HC11EVB, Freescale document number EB187. Step 8 You are now ready to enable the security feature on the MCHC711E9. At the PCbug11 command prompt type: MS 103F 05. Step 9 After the programming operation is complete, verifyng the CONFIG on the MCHC711E9 is not possible because in bootstrap mode the default value is always forced. Step 10 The part is now in secure mode and whatever code you loaded into EEPROM will be erased if you tried to bring the microcontroller up in either expanded mode or bootstrap mode.
NOTE
It is important to note that the microcontroller will work properly in secure mode only in single chip mode.
NOTE
If the part is placed in bootstrap or expanded, the code in EEPROM and RAM will be erased and the microcontroller cannot be reused. The security software will constantly read the NOSEC bit and lock the part.
Enabling the Security Feature on the MC68HC711E9 Devices with PCbug11 on the M68HC711E9PGMR, Rev. 0.1 Freescale Semiconductor 231
Enabling the Security Feature on the MC68HC711E9 Devices with PCbug11 on the M68HC711E9PGMR, Rev. 0.1 232 Freescale Semiconductor
Enabling the Security Feature on M68HC811E2 Devices with PCbug11 on the M68HC711E9PGMR
By Edgar Saenz Austin, Texas
Introduction
The PCbug11 software, needed along with the M68HC711E9PGMR to program MC68HC811E2 devices, is available from the download section of the Microcontroller Worldwide Web site http://www.freescale.com Retrieve the file pcbug342.exe (a self-extracting archive) from the MCU11 directory. Some Freescale evaluation board products also are shipped with PCbug11.
NOTE
For specific information about any of the PCbug11 commands, see the appropriate sections in the PCbug11 User's Manual (part number M68PCBUG11/D2), which is available from the Freescale Literature http://www.freescale.com. The file is also on the software download system and is called pcbug11.pdf.
Step 2 Apply power to the programmer board by moving the +5-volt switch to the ON position. From a DOS command line prompt, start PCbug11 this way: C:\PCBUG11\> PCBUG11 A PORT = 1 when the E9PGMR connected to COM1 or C:\PCBUG11\> PCBUG11 A PORT = 2 when the E9PGMR connected to COM2
PCbug11only supports COM ports 1 and 2. Step 3 PCbug11 defaults to base ten for its input parameters. Change this to hexadecimal by typing: CONTROL BASE HEX Step 4 Clear the block protect register (BPROT) to allow programming of the MC68HC811E2 EEPROM. At the PCbug11 command prompt, type: MS 1035 00 Step 5 PCbug11 defaults to a 512-byte EEPROM array located at $B600. This must be changed since the EEPROM is, by default, located at $F800 on the MC68HC811E2. At the PCbug11 command prompt, type: EEPROM 0 Then type: EEPROM F800 FFFF Then type: EEPROM 103F 103F This assumes you have not relocated the EEPROM by previously reprogramming the upper 4 bits of the CONFIG register. But if you have done this and your S records reside in an address range other than $F800 to $FFFF, you will need to first relocate the EEPROM.
Enabling the Security Feature on M68HC811E2 Devices with PCbug11 on the M68HC711E9PGMR, Rev. 0.1 234 Freescale Semiconductor
Step 6 Erase the CONFIG to allow programming of NOSEC bit (bit 3). It is also recommended to program the EEPROM at this point before programming the CONFIG register. Refer to the engineering bulletin Programming MC68HC811E2 Devices with PCbug11 and the M68HC711E9PGMR, Freescale document number EB184. At the PCbug11command prompt, type: EEPROM ERASE BULK 103F Step 7 You are now ready to enable the security feature on the MCHC811E2. At the PCbug11 command prompt, type: MS 103F 05 The value $05 assumes the EEPROM is to be mapped from $0800 to $0FFF. Step 8 After the programming operation is complete, verifying the CONFIG on the MCHC811E2 is not possible because in bootstrap mode the default value is always forced. Step 9 The part is now in secure mode and whatever code you loaded into EEPROM will be erased if you tried to bring the microcontroller up in either expanded mode or bootstrap mode. The microcontroller will work properly in the secure mode only in single chip mode.
NOTE
If the part is placed in bootstrap mode or expanded mode, the code in EEPROM and RAM will be erased the microcontroller can be reused.
Enabling the Security Feature on M68HC811E2 Devices with PCbug11 on the M68HC711E9PGMR, Rev. 0.1 Freescale Semiconductor 235
Enabling the Security Feature on M68HC811E2 Devices with PCbug11 on the M68HC711E9PGMR, Rev. 0.1 236 Freescale Semiconductor
Introduction
The PCbug1software, needed along with the M68HC11EVBU to program MC68HC711E9 devices, is available from the download section of the Microcontroller Worldwide Web site http://www.freescale.com Retrieve the file pcbug342.exe (a self-extracting archive) from the MCU11 directory. Some Freescale evaluation board products also are shipped with PCbug11.
NOTE
For specific information about any of the PCbug11 commands, see the appropriate sections in the PCbug11 User's Manual (part number M68PCBUG11/D2), which is available from the Freescale Literature Distribution Center, as well as the Worldwide Web at http://www.freescale.com. The file is also on the software download system and is called pcbug11.pdf.
Programming Procedure
Programming Procedure
Once you have obtained PCbug11, use this step-by-step procedure to program your MC68HC711E9 part. Step 1 Before applying power to the EVBU, remove the jumper from J7 and place it across J3 to ground the MODB pin. Place a jumper across J4 to ground the MODA pin. This will force the EVBU into special bootstrap mode on power up. Remove the resident MC68HC11E9 MCU from the EVBU. Place your MC68HC711E9 in the open socket with the notched corner of the part aligned with the notch on the PLCC socket. Connect the EVBU to one of your PC COM ports. Apply +5 volts to VDD and ground to GND on the power connector of your EVBU. Also take note of P4 connector pin 18. In step 5, you will connect a +12-volt (at most +12.5 volts) programming voltage through a 100- current limiting resistor to the XIRQ pin. Do not connect this programming voltage until you are instructed to do so in step 5. Step 2 From a DOS command line prompt, start PCbug11 with C:\PCBUG11\> PCBUG11 E PORT = 1 with the EVBU connected to COM1 C:\PCBUG11\> PCBUG11 E PORT = 2 with the EVBU connected to COM2
PCbug11 only supports COM ports 1 and 2. If you have made the proper connections and have a high quality cable, you should quickly get a PCbug11 command prompt. If you do receive a Comms fault error, check your cable and board connections. Most PCbug11 communications problems can be traced to poorly made cables or bad board connections. Step 3 PCbug11 defaults to base 10 for its input parameters; change this to hexadecimal by typing
CONTROL BASE HEX Step 4 You must declare the addresses of the EPROM array to PCbug11. To do this, type: EPROM D000 FFFF
Step 5 You are now ready to download your program into the EPROM. Connect +12 volts (at most +12.5 volts) through a 100- current limiting resistor to P4 connector pin 18, the XIRQ* pin. At the PCbug11 command prompt type: LOADS C:\MYPROG\ISHERE.S19
Substitute the name of your program into the command above. Use a full path name if your program is not located in the same directory as PCbug11.
Programming MC68HC711E9 Devices with PCbug11 and the M68HC11EVBU, Rev. 0.1 238 Freescale Semiconductor
Programming Procedure
Step 6 After the programming operation is complete, PCbug11 will display this message Total bytes loaded: $xxxx Total bytes programmed: $yyyy You should now remove the programming voltage from P4 connector pin 18, the XIRQ* pin. Each ORG directive in your assembly language source will cause a pair of these lines to be generated. For this operation, $yyyy will be incremented by the size of each block of code programmed into the EPROM of the MC68HC711E9. PCbug11 will display the above message whether or not the programming operation was successful. As a precaution, you should have PCbug11 verify your code. At the PCbug11 command prompt type: VERF C:\MYPROG\ISHERE.S19
Substitute the name of your program into the command above. Use a full path name if your program is not located in the same directory as PCbug11. If the verify operation fails, a list of addresses which did not program correctly is displayed. Should this occur, you probably need to erase your part more completely. To do so, allow the MC68HC711E9 to sit for at least 45 minutes under an ultraviolet light source. Attempt the programming operation again. If you have purchased devices in plastic packages (one-time programmable parts), you will need to try again with a new, unprogrammed device.
Programming MC68HC711E9 Devices with PCbug11 and the M68HC11EVBU, Rev. 0.1 Freescale Semiconductor 239
Programming Procedure
Programming MC68HC711E9 Devices with PCbug11 and the M68HC11EVBU, Rev. 0.1 240 Freescale Semiconductor
RoHS-compliant and/or Pb- free versions of Freescale products have the functionality and electrical characteristics of their non-RoHS-compliant and/or non-Pb- free counterparts. For further information, see http://www.freescale.com or contact your Freescale sales representative. For information on Freescale.s Environmental Products program, go to http://www.freescale.com/epp.
Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor 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 that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including Typicals, must be validated for each customer application by customers technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor 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 Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor 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 Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2005. All rights reserved.