Microcontroller Theory and Applications: HC12 and S12

by ;
Edition: CD
Format: Hardcover
Pub. Date: 2008-01-01
Publisher(s): Prentice Hall
  • Free Shipping Icon

    This Item Qualifies for Free Shipping!*

    *Excludes marketplace orders.

List Price: $100.59

Rent Textbook

Select for Price
There was a problem. Please try again later.

New Textbook

We're Sorry
Sold Out

Used Textbook

We're Sorry
Sold Out

eTextbook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

For undergraduate students taking a Microcontroller or Microprocessor course, frequently found in electrical engineering and computer engineering curricula. This text provides the reader with fundamental assembly language programming skills, an understanding of the functional hardware components of a microcontroller, and skills to interface a variety of external devices with microcontrollers.

Table of Contents

Introduction to the 68HC12
1(13)
Brief History of Computers
2(2)
Computers and Embedded Controllers
4(4)
Applications of Embedded Controllers
8(1)
Overview of the 68HC12
9(4)
Software Instruction Set
9(1)
Hardware
10(3)
Summary
13(1)
Further Reading
13(1)
68HC12 Assembly Language Programming
14(57)
Programming Model
15(4)
Motorola Assembly Language
19(1)
Instruction Execution Cycle
20(3)
Instruction Set
23(25)
Data Transfer and Manipulation Instructions
26(5)
Arithmetic Operations
31(6)
Logical and Bit Operations
37(7)
Data Test Instructions
44(2)
Optional: Fuzzy Logic Instructions
46(2)
Addressing Modes
48(6)
Inherent Addressing Mode
49(1)
Immediate Addressing Mode
49(1)
Direct Addressing Mode
50(1)
Extended Addressing Mode
50(1)
Index Addressing Mode
51(2)
Relative Addressing Mode
53(1)
Branch Instructions
54(5)
Directives (pseudo-op code) and a Good Programming Approach
59(3)
Directives
59(2)
A Good Programming Approach
61(1)
Laboratory Applications
62(6)
Summary
68(1)
Chapter Problems
69(2)
Advanced Assembly Programming
71(47)
Assembly Process
72(4)
Loops
76(2)
Stack
78(4)
Definition of Stack
78(1)
Use of a Stack
79(1)
Access to a Stack
80(2)
Subroutines
82(9)
Subroutine Calls and Returns
83(3)
Parameter-Passing Techniques
86(5)
68HC12 D-Bug 12 Utility Subroutines
91(8)
Programming Modules
99(5)
Programming Techniques
101(3)
Applications
104(6)
Laboratory Applications
110(4)
Summary
114(1)
Further Reading
115(1)
Chapter Problems
115(3)
Fuzzy Logic
118(48)
Conventional Controller versus Fuzzy Logic Controller
119(3)
Fuzzy Logic Controller for a Balancing Robot
122(11)
Background
122(1)
Optional: Dynamic Model for the Robot
123(4)
Fuzzy Logic Controller
127(6)
The 68HC12 Fuzzy Logic Operations
133(16)
Membership Function Design Process
136(2)
Fuzzy Rule Implementation
138(1)
68HC12 Fuzzification Process
139(2)
Unweighted Rule Evaluation (REV) and Weighted Rule Evaluation (REVW)
141(5)
68HC12 Defuzzification Process
146(2)
Other Fuzzy Logic Controller-Related Instructions
148(1)
Application
149(7)
Some Comments on Fuzzy Logic Controller Design
156(2)
Laboratory Application
158(5)
Summary
163(1)
Further Reading
163(1)
Chapter Problems
164(2)
Hardware Configuration
166(33)
The Wall Following Robot
167(2)
The 68HC12 Hardware System
169(5)
Modes of Operation
174(1)
Normal Operating Modes
174(1)
Hardware Pin Assignments
175(2)
68HC12 Subsystems
177(11)
Register Block
177(1)
Port System
178(3)
The Timing System---The Standard Timer Module
181(2)
The Memory System
183(2)
Interrupts
185(1)
Clock Functions
186(1)
Serial Communications---The Multiple Serial Interface
187(1)
The Data Conversion System---The Analog-to-Digital Converter
188(1)
Application---Switches, Keypads, Indicators---Oh my!
188(6)
Input Switches
188(2)
Keypads
190(1)
Indicators---Light Emitting Diodes
191(1)
Indicators---Seven-Segment Displays
192(1)
Programming Switches and Indicators
193(1)
Application---Wall Following Robot
194(1)
Laboratory Application
194(1)
Summary
195(1)
Chapter Problems
196(3)
Exceptions---Resets and Interrupts
199(41)
Overview
200(3)
What Is an Interrupt?
203(1)
General Interrupt Response
204(3)
Reset and Exception Systems Aboard the 68HC12
207(11)
Resets
208(4)
Interrupts
212(3)
Exception Vector
215(1)
Exception Priority
216(2)
Interrupt System-Associated Registers
218(1)
How Does 68HC12 Respond to an Interrupt?
218(5)
Writing Interrupt Service Routines for the 68HC812A4EVB
223(2)
How to Program an ISR---An Example
225(4)
Programming the Real-Time Interrupt (RTI) System
229(4)
A Few More Details
233(1)
Advanced Interrupt Topics
233(1)
Laboratory Application
234(4)
Summary
238(1)
Further Reading
238(1)
Chapter Problems
238(2)
The 68HC12 Clock Module and Standard Timer Module (TIM)
240(54)
Overview
241(1)
Background Theory
242(1)
The 68HC12 Clock Module
242(2)
Clock Divider Chain Serving the TIM
244(1)
The 68HC12 Timer Module
244(3)
Components of the Timer Module
247(24)
Free-Running Counter
250(2)
Free-Running Counter-Associated Registers
252(3)
Input Capture/Output Compare Channels
255(12)
The Pulse Accumulator
267(4)
The Real-Time Interrupt (RTI)
271(1)
Programming Input Capture, Output Compare, and the Pulse Accumulator Features of the TIM
272(7)
Programming the Input Capture System
272(2)
Programming the Input Capture System with an Interrupt
274(1)
Programming the Output Compare System
274(2)
Programming the Output Compare System with Interrupts
276(2)
Programming the Pulse Accumulator System
278(1)
Applications
279(1)
Laboratory Applications
280(10)
Summary
290(1)
References
290(1)
Chapter Problems
290(4)
The 68HC12 Memory System
294(57)
Overview
295(1)
Background Theory
296(1)
Basic Memory Concepts
296(10)
Memory Capacity and Control Signals
296(2)
Memory Buses
298(2)
Memory Technologies: ROM versus RAM
300(2)
Memory Map
302(4)
The A4 Memory System
306(1)
Linear Memory Expansion
306(41)
Memory Layout Design
307(6)
68HC12 and Memory Chip Control Signal Connections
313(4)
Timing Analysis of Basic Memory Operations
317(14)
Electrical Compatibility
331(3)
Memory Paging
334(11)
EEPROM Modification
345(2)
Applications
347(1)
Further Reading
348(1)
Summary
349(1)
Chapter Problems
349(2)
Analog-to-Digital (ATD) Converter
351(41)
Overview
352(2)
Transducer Interface Design
354(2)
Analog-to-Digital Conversion Background Theory
356(6)
Sampling Rate
357(1)
Encoding
358(1)
Quantizing and Resolution
359(1)
Data Rate
360(2)
Analog-to-Digital Converter Technologies
362(7)
Successive-Approximation Converters
362(1)
Integration-Based Converters
362(3)
Counter-Type Converters
365(2)
Parallel Converters
367(2)
The 68HC12 Analog-to-Digital (ATD) Conversion System
369(13)
68HC12 ATD System
370(1)
68HC12 ATD System Control Registers
370(8)
Programming the 68HC12 ATD System
378(3)
Programming the ATD System Using Interrupts
381(1)
Application
382(3)
Laboratory Application
385(4)
Summary
389(1)
Further Reading
390(1)
Chapter Problems
390(2)
68HC12 Communications System---Multiple Serial Interface
392(46)
Need for Communication Features
393(1)
Fundamentals of Serial Communication
394(5)
Serial Communication Terminology
394(3)
Serial Communication Signals
397(2)
Multiple Serial Interface
399(1)
The Serial Communications Interface
399(14)
Hardware Description---The SCI Transmitter
402(1)
Hardware Description---The SCI Receiver
403(1)
SCI Registers
404(6)
SCI Transmitter and Receiver Operation
410(1)
Programming the Serial Communication Interface
411(2)
SPI---Serial Peripheral Interface
413(20)
SPI Concepts
413(3)
SPI General Description
416(4)
SPI Registers
420(6)
Programming the SPI
426(3)
SPI Applications
429(4)
Laboratory Application
433(2)
Summary
435(1)
Chapter Problems
436(2)
A 68HC12 Instruction Set 438(22)
B 68HC812A4 Register Set 460(5)
C Number Systems and Number Arithmetic 465(17)
Number Representations
465(3)
Binary Number Arithmetic
468(8)
The 2's Complement Number Representation
469(3)
Arithmetic
472(4)
Changing the Base of Numbers
476(4)
Summary and Further Readings
480(2)
D Digital Logic Fundamentals 482(9)
Overview
482(1)
Basic Combinational Logic
483(4)
Medium-Scale Integration Combinational Circuits
486(1)
Sequential Logic Circuits
487(3)
Flip-Flops
487(1)
MSI Sequential Circuit Components
488(2)
Summary
490(1)
E Mobile Robot and Related Products for the 68HC12 491(14)
Building Your Own Mobile Robot
492(4)
68HC12-Related Hardware and Software Products
496(9)
Hardware
496(2)
Software
498(7)
Index 505

Excerpts

During the summer of 1992, the first author (D.P.) was first introduced to the family of Motorola 68HC 11 Microcontrollers as he was constructing an interface module between a Puma robot arm robot controller and a force-torque sensor. Since then, he has become aware of thepowerof microcontrollers and their unlimited applications. Fortunately, as a professor of electrical engineering at the U.S. Air Force Academy, he has had ample opportunities to share his microcontroller experience with students. In the fall of 1995 at the Academy, he met the second author (S.B.), a friend, mentor, and, at that time, his immediate boss. Soon after the first author's arrival at the Academy, S.B. started to share his expert knowledge on digital systems with D.P., and D.P. has benefited tremendously to this point. Over time, we decided to share our work in a more concrete form. That is when we decided to write a book on the 68HC 12. MOTIVATION One of the most compelling reasons to write 68HC12 Book is that Motorola is slowly phasing out the popular 68HC 11 microcontroller-based evaluation boards and replacing them with the 68HC 12. The 68HC 11 family of microcontrollers have been the preferred choice of educators due to their built-in input and output (I/O) capabilities, a variety of timer functions, and platforms for easy programming and interfacing. The 68HC 12 retained all the favorable features of the 68HC 11 (in fact, one can run any 68HC 11 code on the 68HC 12 with minor modifications) and increased the computational power while enhancing hardware and software components. Compared to its predecessor, the 68HC12 has reduced the interrupt latency time, increased the I/O capacity, added complex math operations, incorporated fuzzy logic functions, and improved the overall system performance by adapting a mechanism calledinstruction queuing,which is similar to the pipelining s6heme found in more powerful microprocessors. This book is about the 68HC 12; we show how to program and uncover the possibilities of 68HC 12 applications. INTENDED READERS This book is written for undergraduate students taking a microcontroller or microprocessor course, frequently found in electrical engineering and computer engineering curricula. These courses aim to teach students the fundamental knowledge of microcontrollers/microprocessors and techniques to interface them with external devices, pointing out the important role of embedded microcontroller systems in our modern society. The book is designed to assist instructors to fulfill such course objectives by combining both the theory and applications of microcontrollers. In particular, we chose the 68HC12 microcontroller since it is becoming the industry standard. We expect students to have taken an introductory logic course and a freshmen programming language course. For a quick review of digital logic, we included Appendix D. Having taken a computer language course will help students understand how assembly language programs are related to high-level language programs, but we expect students with a minimal exposure to computer programming will follow the text subjects without too much trouble. We must also address one other category of readers. Although the book is mainly designed for students learning the subject in an academic setting, it can be easily adopted by engineers who want to learn the subject on their own. Since the underlying concepts and functional components of two different types of microcontrollers are very similar to each other, the acquired knowledge of the 68HC12 can naturally be applied to other microprocessors and microcontrollers. Such knowledge is essential for electrical and computer engineering students as we live in a society where more and more engineering problems are solved by embedded microcontrollers. In fact, we find the scope of actual applications of microcontrollers expanding as new problems are encountered and solved by

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.