Pub. Date:
Prentice Hall Professional Technical Reference
Microcontroller Technology: The 68HC11 / Edition 3

Microcontroller Technology: The 68HC11 / Edition 3

by Peter Spasov


Current price is , Original price is $120.0. You
Select a Purchase Option (Older Edition)
  • purchase options

Product Details

ISBN-13: 9780139012402
Publisher: Prentice Hall Professional Technical Reference
Publication date: 06/15/1998
Edition description: Older Edition
Pages: 690
Product dimensions: 7.23(w) x 9.56(h) x 1.62(d)

Table of Contents

Part 1Introducing Microcontroller Technology1
1Microcontroller Concepts1
1.1What Is a Microcontroller? and What Is It Used For?1
1.3Top-Down View of Microcontroller Systems8
1.4Memory Concepts13
1.5Microcontroller Memory Map16
Part 2Software18
2.1Assembly and Other Programming Languages19
2.2Source Code, Object Code, and the Assembler21
2.3Using High-Level Languages28
2.4Fetch/Execute Operation of the Central Processing Unit (CPU)31
2.5The Instruction Set and Addressing Modes36
2.6Basic Operations65
2.7Microcontroller Arithmetic and the Condition Code Register74
2.8Program Flow Control Using Looping and Branching90
3The Stack, Subroutines, Interrupts, and Resets112
3.1Introducing the Stack112
3.2Using the Stack to Store Data114
3.3Using Subroutines117
3.4Modular Programming Using Subroutines124
3.5Subroutine Operation132
3.6Concept of Interrupts137
3.7Interrupt Vectors141
3.8Interrupt Operation144
3.9Hardware Interrupts and Resets146
3.10Software and CPU Control Interrupts155
3.11The Kiss of Death: Stack Overflow156
4Cross Assembly and Program Development162
4.1Introduction to Program Development162
4.2Format of the Source Code163
4.3Code and Data Segments167
4.5The Assembly Two-Pass Process177
4.6Assembler Options and Preprocessor Directives180
4.7Hex and Binary Files185
4.8Documentation Files188
4.10Evaluation Boards and Emulation191
Part 3Hardware197
5Bus Concepts and Modes of Operation197
5.2The Bus198
5.4Address Decoding203
5.5Modes of Operation207
5.6Single-Chip Operating Mode207
5.7Expanded Multiplexed Operating Mode208
5.8Special Bootstrap Mode209
5.9Special Test Operating Mode211
5.10System Circuit211
6Microcontroller Hardware216
6.1Semiconductor Technology216
6.2Chip Specifications223
6.3Memory Technology228
6.4Erasable Programmable Read-Only Memory (EPROM)230
6.5Flash Memory233
6.6Electrically Erasable Programmable Read-Only Memory (EEPROM)233
6.7Configuration Control Register (CONFIG)239
6.8RAM and I/O Mapping Register (INIT)240
7Clocked Operation243
7.1Timing Diagrams243
7.2System Clock245
7.3Bus Operations247
7.4Cycle-by-Cycle Operation253
7.5Oscilloscope Test Loops255
7.6Logic Analyzer257
7.7Transmission Line Effects260
Part 4Interfacing266
8Interfacing Concepts266
8.2Input/Output Subsystems and Registers268
8.3Memory or Input/Output Mapping271
8.4Interfacing Using Polling or Interrupts274
8.5The Parallel I/O Subsystem276
8.6Serial Systems277
8.7Programmable Timer I/O Subsystem280
8.8Analog/Digital I/O Subsystem282
8.9The I/O Subsystem Registers284
8.10Interface Standards289
9Parallel Input/Output293
9.1Introduction to the Subsystem294
9.2Seven-Segment (LED) Display Output297
9.3Liquid-Crystal Displays (LCDs)304
9.4Keyboard Interfacing311
9.5Other User Input/Output324
9.6Strobed Input/Output324
9.7Full Handshake Input/Output330
9.8Parallel Interface Standards338
10The Serial Subsystems358
10.1Asynchronous Communications Systems359
10.2The Serial Communications Interface (SCI)370
10.3SCI Registers380
10.4Synchronous Serial Input/Output391
10.5The Serial Peripheral Interface (SPI)393
10.6SPI Topologies and Applications393
10.7SPI Software399
10.8SPI Error Handling408
10.9Network Communications409
11Programmable Timer Operations417
11.2Output Compare423
11.3Input Capture440
11.4Pulse Accumulator451
11.5Real-Time Interrupt459
12The Analog Converter Subsystem465
12.1Concepts and Terminology466
12.3Digital-to-Analog Converters478
12.4Analog-to-Digital Converters484
12.5The Built-in A/D Subsystem488
Part 5The Microcontroller World497
13Application Control Software497
13.1Boolean Logic Control498
13.3Sequential Machines503
13.4Feedback Control of the Analog World511
13.5Digital Signal Processors517
13.6Using the C Language524
13.8Fuzzy Logic554
14.1Automotive-Engine Control575
14.2Consumer Electronics: Automatic Camera582
14.3Computer Peripherals: Dot Matrix Printer590
14.4Society and Microcontroller Technology601
15Eight-Bit Microcontroller Families602
15.1Microcontrollers and the Semiconductor Industry603
15.2Motorola Families604
15.3The Intel 8051 Core615
15.4Survey of Other Families624
15.5Choosing a Microcontroller624
AInstruction Set Summary630
BQuick Reference638
MC68HC11E9 Block Diagram639
Data Book and Programming Reference Guide Tables and Figures641
Cross-References to Other Data646
CFurther Information647
Some Trade Magazines648
C Conventions651
Logic Levels for Digital Signals652
Numbering Systems652
Cross Assembly654
Data Manipulation656
Measurement Quantities656
EHeader and Library File Source Listings658
FDigital Logic and Binary Codes662
A Digital Logic Primer662
Number Systems666
Number Conversions668
Binary Ranges670
Other Codes676
GBasic Waveforms677
HInternet and Disk Resources679
Disk Resources679


Microcontrollers are used in the industrial world to control many types of equipment, ranging from consumer to specialized devices. They have replaced older types of controllers, including microprocessors. Also, there is a growing need for off-line support of a computer's main processor. The demand will grow as more and more equipment uses more intelligence. Applications range from controlling engines in modern automobiles to controlling laser printers and other computer peripherals. One consumer application is a washing machine controller that adjusts the wash cycle based on load size, fabric type, and amount of dirt.

This book illustrates how to use a popular microcontroller, the Motorola 68HC11. The 68HC11 is relatively easy to work with, yet it has most of the features essential for a complete control system. Thus the student of control automation can use it to work with control systems at the component level. The interested layperson can also use it as a tool to understand and experiment with computer and data communications systems.

The goals of the fourth edition remain the same as those of earlier editions. The book provides the background knowledge needed to understand and use microcontrollers in general as well as the 68HC11 specifically. It starts at an introductory level, explaining the applications and origins of microcontrollers. Next, a programmer's view of the machine is developed. Finally, we describe machine hardware and how to connect it to the outside world for control applications.

You will find the book useful in learning how to use the 68HC11. Original manufacturers' data books do not provide the background explanations that anovice needs. Experienced users will find the book to be a useful accompaniment to the manufacturer's original documentation.

The book can be used as a textbook in introductory, interfacing, and industrial control courses. To use the book, you should have a background understanding of digital logic and numbering systems. Some computer programming knowledge is useful but not absolutely essential. Although this book was written to be used in college courses, the interested hacker or hobbyist should find the material useful for self-study. Others with a formal education from the past should also find useful information. The book can accompany hands-on exercises using a microcontroller training kit or simulation software. Where possible, concepts are presented generically, to help you understand other microcontrollers and related devices.

To permit flexible use of the book, we have organized it into five parts:

Part 1. Microcontroller technology is introduced in Chapter 1: what it is, how it evolved, and how to use it. The chapter continues with explanations of terminology and parts of the microcontroller. Finally, essential memory concepts are reviewed.
Part 2. Chapters 2 to 4 cover programming concepts, the language used to instruct the microcontroller, and how to use registers and memory. Also covered is how to produce, use, and document programs.
Part 3. Chapters 5 to 7 cover operation of the chip itself. Topics include the system bus, operating modes, clocked operation, and memory technology.
Part 4. Chapters 8 to 12 deal with the subsystems for parallel, serial, programmable timer, and analog interfacing. The basic software techniques to use these systems are presented. Also introduced are some common hardware designs used to connect the microcontroller to sensors and actuators. An overview of all subsystems without the processor-specific details is presented in Chapter 8.
Part 5. Control methods are illustrated in Chapter 13, where it is shown how programs use the subsystems for control applications. Chapters 14 and 15 cover the industry to date, presenting a survey of typical applications, choices in choosing microcontrollers, and characteristics of other microcontrollers.

Typically, an introductory course would include Parts 1 and 2. We also recommend including Chapter 8. Advanced or more intensive courses would include Parts 3 and 4. Either type of course can use Part 5, provided that Chapter 8 is also covered.

Although the book contains some data sheets, it is not a complete reference. The reader should refer to the literature listed in Appendix C for complete data.


To acknowledge the prominence of C programming, this edition introduces C programming earlier and uses C program examples throughout. These changes also reflect the use of version 6 of the ICC11 cross compiler. There is more coverage of the 68HCI 1E9 with a de-emphasis on the `A' type parts because Motorola has discontinued their production. This edition also includes a CD-ROM (described in Appendix H) with source code, a special demo version of the THRSim11 simulator, ICC11 demo C compiler, cross assembler, fuzzy logic tools, and assorted electronic design tools. The simulator is a welcome addition because it provides a handy way to explore programming and interfacing concepts. Appendix H includes an introductory tutorial for using the simulator. Appendix C lists EVBU substitutes. Note that Motorola has discontinued its educational discount for the 68HC 11 EVBU (replacing it with the 68HC 12 EVBU). The chapters now list objectives, a long overdue pedagogical improvement.


Most important to success when using this book is an enthusiasm for computer and related technology. If you are already familiar with assembly language programming, you may wish to skim Chapters 1 and 2 for new information instead of reading them in detail. If you are not familiar with digital logic and binary numbers, you should also read Appendix F.

We use generic principles whenever possible. After studying this book, you should be able to work with any microcontroller, but it is necessary to cover a specific microcontroller in depth in order to understand them all in general. We have chosen the 68HC11; however, there are many variations of the 68HC 11. When explaining specific details, we generally refer to the 68HC11E9, unless we state otherwise.

To understand microcontrollers, you also have to know a lot of jargon. You cannot understand the concepts without knowing the jargon—but you cannot understand the jargon without knowing the concepts. We get around this dilemma by introducing details step by step.

The appendices provide references and further clarification of terms used in the book. Appendix A lists the details of the 68HC 11 instructions used throughout the book. You will probably use it often. Appendix B is the quick reference section. Use it as a cross-reference to look up other 68HC 11 details as needed. Appendices A and B are necessary if you do not have 68HC 11 data sheets or a manual.

Most terms are explained in the text as required. New terms are indicated in italic type when they first occur in the text. You may wish to reread earlier sections of the book to review terms when used in another context. The glossary provides an additional reference.

A lot of abbreviations are used in the technical literature. Unfortunately, these frustrate many readers. In practice, most technical data books use abbreviations, often without explanation. In this book each abbreviation is defined the first time it is used, and many are redefined upon subsequent appearances. You can also find a list of abbreviations after the glossary.

Sources of further information on some topics are listed in Appendix C. Also listed are suppliers for some of the commercially available products mentioned in the book. We encourage you to use the bulletin board mentioned in Appendix C.

Some conventions are defined in Appendix D. Since there are many ways to do the same thing, we felt it necessary to define a standard way. The conventions are those used by many in the industry. For example, we use Motorola's dollar sign ($) convention to refer to a method of coding numbers (in this case the sign does not indicate dollars). This ensures that we all understand the sign to have the same meaning.

The header files used by some program examples are listed in Appendix E. Note that a header file is explained in Appendix E.

The basics of digital logic and number conversions are explained in Appendix F. You should read this section early if you are not already familiar with these topics.

If you need basic information about waveforms, refer to Appendix G.

Finally, we included a reference to Internet resources and the enclosed CD-ROM in Appendix H.


Prentice Hall also offers a lab manual, written by Robert John Dirkman and John Leonard of the University of Massachusetts, that can be used with this book. It is called the Microprocessor Applications Laboratory Workbook. Instructors can contact Prentice Hall for a copy of the Instructor's Solutions Manual with Powerpoints to accompany this book.


I would like to thank Hugh K. McGugan of Motorola Training Organization, Canada, for technical literature, review of some chapters, and the assistance he always gave willingly and promptly. Without his help this book would not exist. I thank also Alan D. Niemi of Lake Superior State University, Sault Sainte Marie, Michigan, for his valuable comments and advice when reviewing sections of the preliminary manuscript. Helpful advice was also received from V. S. Anandu of Southwest Texas State University, San Antonio, Texas, and from Jeffrey Rankinen of Pennsylvania College of Technology during review of the manuscript. Also, I thank my students and teaching colleagues whose experiences led me to make some of the changes in this edition. Any deficiencies are mine because I did not always follow their advice.

I am grateful to Hitoshi Doi and Chuck Westfall of Canon Incorporated, Japan, for valuable information about their model EOS cameras. In addition, I thank Richard Man of ImageCraft, USA, for providing information as well as the demo version of the ICC11 C cross compiler. Similarly, Harry Broeders of Rijswijk Institute of Technology, Netherlands, provided a special version of the THRSim11 simulator. Peter Fabo of Comenius University, Bratislava, Slovakia, provided information about his VT11 module. For valuable comments, suggestions, and corrections, I express sincere appreciation to Charles Edward Nunally of Virginia Tech, Blacksburg, VA, USA; Jack Levine of California State University, Los Angeles, CA, USA; Kurt Schneider of EDV Beratung and Schulung, OberRamstadt, Germany; Patrick J. O'Connor of DeVry Institute of Technology, Chicago, IL, USA; and Trung Do of University of Illinois at Chicago, Chicago, IL, USA. In particular, I want to acknowledge the numerous suggestions offered by Kurt Schneider. Finally, thanks to the editorial and production people who provided excellent and professional support. They are Jennifer Antonacci and Delia Uherec of Prentice Hall, and Megan Smith-Creed and Cindy Lanning of Custom Editorial Productions.

Finally, a very special thanks to my wife Renate, who provided invaluable emotional support. I also thank my eight-year-old daughter Emilie, six-year-old daughter Hannah, and three-year-old daughter Anika, who all provide much joy.

Peter Spasov
Sir Sandford Fleming College

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews