Higher Education

Introduction to Embedded Systems: Interfacing to the Freescale 9S12, 1st Edition

  • Jonathan W. Valvano University of Texas, Austin
  • ISBN-10: 049541137X  |  ISBN-13: 9780495411376
  • 559 Pages
  • © 2010 | Published
  • College Bookstore Wholesale Price = $165.50
  *Why an online review copy?
  • It's the greener, leaner way to review! An online copy cuts down on paper and on time. Reduce the wait (and the weight) of printed texts. Your online copy arrives instantly, and you can review it anytime from your computer or favorite mobile device.

If you prefer a print copy to review, please contact your representative.



This book employs a bottom-up educational approach with an overall educational objective of allowing students to discover how the computer interacts with its environment through learning basic computer architecture, assembly language programming, as well as through an introduction to interfacing. Developed around the Freescale 9S12, this book describes both the general processes and the specific details involved in microcomputer simulation. In particular, detailed case studies are used to illustrate fundamental concepts, and laboratory assignments are provided.

Features and Benefits

  • Checkpoints: short question meant as an immediate feedback mechanism for the reader to evaluate his or her level of comprehension. These can be found throughout the book and should be performed while reading the chapter. Answers to checkpoints are given in Appendix 4.
  • Examples: Design examples are included within each chapter for the purpose of applying the knowledge presented in that chapter to solve a specific problem.
  • Homework problems: Found at the end of each chapter and are intended to evaluate the reader’s understanding of specific topics introduced in the chapter.
  • Tutorials: Each tutorial includes a sequence of actions (specific things for the reader to do) and a list of questions. Tutorials are meant to be performed without supervision, and should be performed after reading the chapter, but before attempting the labs or homework. Answers to the tutorial questions are also given in Appendix 4.
  • Laboratory assignments: These can be found at the end of each chapter. Each laboratory solution can first be built and tested using the TExaS simulator, then downloaded an run on an actual 9S12. Only by performing the laboratory assignments can the reader truly assimilate the hardware and software concepts introduced in this book. Laboratories are meant to be performed under the supervision of an instructor, and involve the classic engineering processes of design, construction, debugging, and evaluation.
  • Additional Labs and tutorials can be found at the accompanying website.

Table of Contents

1. Introduction to Embedded Microcomputer Systems
Overview / Attitude / Basic Components of an Embedded System / Flowcharts and Structured Programming / Product Development Cycle / Successive Refinement / Quality Programming / Debugging Theory / Tutorial / Getting Started / Homework Assignments

2. Introduction to Assembly Language Programming
Basic Approach to Assembly Programming on the 9S12 / Simple Addressing Modes / Memory Transfer Operations / Memory Allocation / Subroutines / Input/Output / Tutorial 2: Running with TExaS / Homework Assignments

3. Information
Hexidecimal Conversion / Boolean Information / 8-Bit Numbers / Character Information / Extended Precision Numbers / Big and Little Endian / Logical Operations / Shift Operations / Arithmetic Operations: Addition and Subtraction / Arithmetic Operations: Multiplication and Divide / Conversions / Debugging Monitor Using a LED / Tutorial 3: Arithmetic and Logical Operations / Homework Assignments

4. 9S12 Architecture
Introduction / Understanding Software Execution at the Bus Cycle / 9S12 Architecture Details / 16-Bit Timer / Performance Debugging / Tutorial 4: Building a Microcomputer and Executing Machine Code / Homework Assignments / Laboratory Assignments

5. Modular Programming
Modular Design / Making Decisions / The Stack Subroutines / Macros / Recursion / Assembly Language Style Guidelines / Comments / Functional Debugging / Tutorial 5A: Editing and Assembling / Tutorial 5B: Microcomputer-Based Lock / Homework Problems / Laboratory Assignments

6. Pointers
Indexed Addressing Modes Used in Implement Pointers / Arrays / Strings / Matrices / Structures / Tables / Trees / Dynamically Allocated Data Structures / 9S12 Paged Memory / Functional Debugging / Tutorial 6: Software Abstraction / Homework Assignments / Laboratory Assignments

7. I/O Programming
I/O Synchronization / Finite State Machines with Statically-Allocated Linked Structures / Interrupt Concepts / Periodic Interrupts / Hardware Debugging Tools / Profiling / Tutorial 7: Profiling / Homework Problems / Laboratory Assignments

8. Local Variables and Parameter Passing
Local versus Global / Stack Rules / Local Variables Allocated on the Stack / Stack Frames / Parameter Passing / Tutorial 6: Debugging Techniques / Homework Problems / Laboratory Assignments

9. Numerical Calculations
Fixed-Point Numbers / Floating-Point Numbers / Extended Precision Calculations / Expression Evaluation / Tutorial 9: Overflow and Dropout / Homework Problems / Laboratory Problems

10. Parallel I/O Interfacing
Key Wakeup Interrupts / Pulse Accumulator / Input Capture / Scanned Keyboards / Parallel Pot LCD Interface with the HD44780 Controller / Binary Actuators / Pulse-Width Modulation / DC Motors / Stepper Motors / Homework Problems / Laboratory Assignments

11. Data Acquisition Systems
ADC Converters / Multiple Access Circular Queues / Tutorial 11: I/O Programming / Homework Problems

12. Serial Interfacing
Serial Communication Interface, SCI / First in First out Queue and Double Buffers / Interthread Communication and Synchronization / Reentrant Programming / Serial Port Interface Using Interrupt Synchronization / Distributed Systems / Polled Versus Vectored Interrupts / Tutorial 12: Performance Debugging / Homework Problems / Laboratory Assignments

13. Digital to Analog Conversion
Synchronous Peripheral Interface, SPI

Appendix 1. Embedded System Development Using TExaS
Introduction to TExaS / Major Components of TExaS / Developing Assembly Software / Developing C Language Software / TExaS Editor / Assembly Language Syntax / TExaS Viewbox / Microcomputer Interfacing in TExaS
Appendix 2. Running on an Evaluation Board
Appendix 3. Glossary of Terms
Appendix 4. Solutions Manual


All supplements have been updated in coordination with the main title. Select the main title's "About" tab, then select "What's New" for updates specific to title's edition.

For more information about these supplements, or to obtain them, contact your Learning Consultant.

Instructor Supplements

Meet the Author

Author Bio

Jonathan W. Valvano

Jonathan Valvano is Professor of Electrical and Computer Engineering at the University of Texas at Austin. His tenure at UT Austin began in 1981. He holds bachelors and masters degrees in computer science and electrical engineering from the Massachusetts Institute of Technology and a PhD in Medical Engineering from Harvard-MIT Division of Health Sciences and Technology. He is a leading authority on embedded systems having written 23 referred archival papers, 63 referred papers, and five book chapters in the fields of embedded systems, biomedical instrumentations, and bio-heat transfer.