Embedded Microcomputer Systems Real Time Interfacing 3rd Edition Jonathan W. Valvano 2024 scribd download
Embedded Microcomputer Systems Real Time Interfacing 3rd Edition Jonathan W. Valvano 2024 scribd download
https://ebookgate.com/product/real-time-embedded-components-and-
systems-1st-edition-sam-siewert/
ebookgate.com
https://ebookgate.com/product/real-time-uml-workshop-for-embedded-
systems-2nd-edition-bruce-powel-douglass/
ebookgate.com
https://ebookgate.com/product/real-time-systems-design-and-
analysis-3rd-edition-bruce-fraser/
ebookgate.com
https://ebookgate.com/product/linux-for-embedded-and-real-time-
applications-2nd-edition-doug-abbott/
ebookgate.com
Real time embedded multithreading using ThreadX Edward L
Lamie 2nd ed Edition Edward L. Lamie
https://ebookgate.com/product/real-time-embedded-multithreading-using-
threadx-edward-l-lamie-2nd-ed-edition-edward-l-lamie/
ebookgate.com
https://ebookgate.com/product/real-time-systems-scheduling-analysis-
and-verification-1st-edition-albert-m-k-cheng/
ebookgate.com
https://ebookgate.com/product/a-real-time-approach-to-process-
control-3rd-edition-william-y-svrcek/
ebookgate.com
https://ebookgate.com/product/embedded-systems-design-2nd-edition-
steve-heath/
ebookgate.com
https://ebookgate.com/product/real-time-systems-design-and-
analysis-4th-edition-tools-for-the-practitioner-phillip-a-laplante/
ebookgate.com
Relationship between bits, bytes and alternatives as units of precision Common digital logic gates
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Output parameters for various open collector gates 9S12 interrupt vectors and CodeWarrior numbers
Family Example VOL (V) IOL (A) Address Number Interrupt Source
Standard TTL 7405 0.4 0.016 $FFFE 0 Reset
Schottky TTL 74S05 0.5 0.02 $FFF8 3 Unimplemented Instruction Trap
Low power Schottky TTL 74LS05 0.5 0.008 $FFF6 4 SWI
High speed CMOS 74HC05 0.33 0.004 $FFF4 5 XIRQ
High voltage output TTL 7406 0.7 0.040 $FFF2 6 IRQ
High voltage output TTL 7407 0.7 0.04 $FFF0 7 Real Time Interrupt, RTIF
Silicon monolithic IC 75492 0.9 0.25 $FFEE 8 Timer Channel 0, C0F
Silicon monolithic IC 75451–75454 0.5 0.3 $FFEC 9 Timer Channel 1, C1F
Darlington switch ULN-2074 1.4 1.25 $FFEA 10 Timer Channel 2, C2F
MOSFET IRF-540 varies 28 $FFE8 11 Timer Channel 3, C3F
$FFE6 12 Timer Channel 4, C4F
$FFE4 13 Timer Channel 5, C5F
$FFE2 14 Timer Channel 6, C6F
Output parameters for various open emitter gates
$FFE0 15 Timer Channel 7, C7F
Family Example VCE (V) ICE (A) $FFDE 16 Timer Overflow, TOF
$FFDC 17 Pulse Acc. Overflow, PAOVF
Silicon monolithic IC 75491 0.9 0.05 $FFDA 18 Pulse Acc. Input Edge, PAIF
Darlington switch ULN-2074 1.4 1.25 $FFD8 19 SPI0, SPIF or SPTEF
MOSFET IRF-540 varies 28 $FFD6 20 SCI0, TDRE TC RDRF IDLE
$FFD4 21 SCI1, TDRE TC RDRF IDLE
$FFD2 22 ATD Sequence Complete, ASCIF
H-bridge drivers $FFCE 24 Key Wakeup J, PIFJ
$FFCC 25 Key Wakeup H, PIFH
Chip Current Comment $FFC0 31 I2C, IAAS TCF IBAL
$FFBE 32 SPI1, SPIF or SPTEF
MC3479 0.35 A Stepper driver $FFBC 33 SPI2, SPIF or SPTEF
L293D 0.6 A Dual, diodes $FFB2 38 CAN receive
L293 1A Dual $FFB0 39 CAN transmit
TPIC0107 3A Direction, fault status $FF8E 56 Key Wakeup P, PIFP[7:0]
L6203 5A Dual
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Embedded
Microcomputer Systems
Real Time Interfacing
Third Edition
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
This is an electronic version of the print textbook. Due to electronic rights restrictions, some third party content may
be suppressed. Editorial review has deemed that any suppressed content does not materially affect the overall
learning experience. The publisher reserves the right to remove content from this title at any time if subsequent rights
restrictions require it. For valuable information on pricing, previous editions, changes to current editions, and
alternate formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Embedded
Microcomputer Systems
Real Time Interfacing
Third Edition
Jonathan W. Valvano
University of Texas at Austin
Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Embedded Microcomputer Systems: © 2011, 2007 Cengage Learning
Real Time Interfacing, Third Edition
ALL RIGHTS RESERVED. No part of this work covered by the copyright herein
Jonathan W. Valvano
may be reproduced, transmitted, stored, or used in any form or by any means
Publisher, Global Engineering: graphic, electronic, or mechanical, including but not limited to photocopying,
Christopher M. Shortt recording, scanning, digitizing, taping, web distribution, information networks,
or information storage and retrieval systems, except as permitted under
Acquisitions Editor: Swati Meherishi
Section 107 or 108 of the 1976 United States Copyright Act, without the prior
Assistant Development Editor: written permission of the publisher.
Yumnam Ojen Singh
Editorial Assistant: Tanya Altieri For product information and technology assistance, contact us at
Team Assistant: Carly Rizzo Cengage Learning Customer & Sales Support, 1-800-354-9706.
Marketing Manager: Lauren Betsos For permission to use material from this text or product,
submit all requests online at www.cengage.com/permissions.
Media Editor: Chris Valentine
Further permissions questions can be e-mailed to
Content Project Manager: D. Jean Buttrom permissionrequest@cengage.com.
Production Service: RPK Editorial Services, Inc.
Copyeditor: Shelly Gerger-Knechtl Library of Congress Control Number: 2010938462
Proofreader: Becky Taylor ISBN 13: 978-1-111-42625-5
Indexer: Shelly Gerger-Knechtl
ISBN-10: 1-111-42625-2
Compositor: Glyph International Ltd.
Senior Art Director: Michelle Kunkler Cengage Learning
Cover Designer: Andrew Adams 200 First Stamford Place, Suite 400
Cover Image: © Cybrain/Shutterstock Stamford, CT 06902
USA
Internal Designer: Carmela Periera
Senior Rights Acquisitions Specialist:
Cengage Learning is a leading provider of customized learning solutions with
Mardell Glinski-Schultz
office locations around the globe, including Singapore, the United Kingdom,
Text and Image Permissions Researcher: Australia, Mexico, Brazil, and Japan. Locate your local office at:
Kristiina Paul international.cengage.com/region.
First Print Buyer: Arethea L. Thomas
Cengage Learning products are represented in Canada by Nelson Education, Ltd.
For your course and learning solutions, visit www.cengage.com/engineering.
Purchase any of our products at your local college store or at our preferred
online store www.cengagebrain.com.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface
Embedded computer systems, which are electronic systems that include a microcomputer to
perform a specific dedicated application, are ubiquitous. Every week millions of tiny com-
puter chips come pouring out of factories like Freescale, Atmel, Maxim, Texas Instruments,
STMicroelectronics, Renesas, Microchip, Silicon Labs, and Mitsubishi and find their way into
our everyday products. Our global economy, food production, transportation system, military
defense, communication systems, and even quality of life depend on the efficiency and effec-
tiveness of these embedded systems. As electrical and computer engineers we play a major
role in all phases of this effort: planning, design, analysis, manufacturing, and marketing.
This book is unique in several ways. Like any good textbook, it strives to expose un-
derlying concepts that can be learned today and applied later in practice. The difference lies
in the details. You will find that this book is rich with detailed case studies that illustrate the
basic concepts. After all, engineers do not simply develop theories but rather continue all
the way to an actual device. During my years of teaching, I have found that the combination
of concepts and examples is an effective method of educating student engineers. Even as a
practicing engineer, I continue to study actual working examples whenever I am faced with
learning new concepts.
Also unique to this book is its simulator, called Test Execute and Simulate (TExaS).
This simulator, like all good applications, has an easy learning curve. It provides a self-
contained approach to writing and testing microcomputer hardware and software. It differs
from other simulators in two aspects. If enabled, the simulator shows you activity internal
to the chip, like the address/data bus, the instruction register, and the effective address
register. In this way the application is designed for the educational objectives of under-
standing how a computer works. On the other end of the spectrum, you have the ability to
connect such external hardware devices as switches, keyboards, LEDs, LCDs, serial port
devices, motors, and analog circuits. Logic probes, voltmeters, oscilloscopes, and logic an-
alyzers are used to observe the external hardware. The external devices together with the
microcomputer allow us to learn about embedded systems. The simulator supports many
of the I/O port functions of microcomputers like interrupts, serial port, output compare,
input capture, key wake up, timer overflow, and the ADC. You will find the simulator on
the CD that accompanies this book. Get the CD out now, run the Readme.htm, install
TExaS, and follow the tutorial example. In particular, double-click the tut.uc file in the
MC9S12 subdirectory and run the tutorial on the simulator. If you are still having fun, then
run the other four tutorials: tut2.* shows the simple serial I/O functions, tut3.* is an ADC
data acquisition example, tut4.* shows interrupting serial I/O functions, and tut5.* is an
interrupting square-wave generator. Although many programs are included in the appli-
cation, these five give a broad overview of the capabilities of the simulator. The screen shot
in Figure P.1 was obtained when running the tut2.rtf example. Notice these features in the
figure: (1) address/data bus activity, (2) embedded figures in the source code, (3) external
hardware, (4) voltmeters and logic probes, and (5) an oscilloscope.
v
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
vi 䡲 Preface
Figure P.1 The TExaS simulator can be used to design, implement, and test embedded systems.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
䡲 Preface vii
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
viii 䡲 Preface
There are sections on interfacing microphones and speakers. There are new audio labs. A
PWM DAC is presented. There are both fundamental theories and practical examples of
wireless communication for embedded systems. The DFT is presented and used for de-
signing FIR digital filters.
A number of sections have been moved to provide a more logical reading flow. The
LCD interface was moved from Chapter 8 to Chapter 3 because it is simple and matches
educational goals of Chapter 3. Tuning equations and timing diagrams were moved from
Chapter 9 into Chapter 3, because many schools skip chapter 9, but timing is an important
part of interfacing. EC was moved from Chapter 14 to Chapter 7, because I2C is like SPI
and used to interface the microcontroller to a peripheral. USB was moved from Chapter 14
to Chapter 7, because USB is like SCI and used to interface the microcontroller to the PC.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
䡲 Preface ix
along with the manuals from Freescale. Although these reference manuals are available as pdf
documents on the CD, it might be better to order physical documents from Freescale’s liter-
ature center, or to download the latest version from the Freescale website.
Although software development is a critical aspect of embedded system design, this
book is not intended to serve as an introduction to C programming. Consequently, you will
find it convenient to have a C programming reference available. Fortunately, located on the
CD that accompanies this book, there is a small reference called Developing Embedded
Software in C using Metrowerks written as an HTML document. Although this reference is
not as complete a programming guide as some books on C, it is specific for writing em-
bedded software for the 9S12.
In this book we will discuss programming style, and develop debugging strategies spe-
cific to embedded real time systems from both an assembly language and a C perspective.
Due to the nature of single-chip computers (they are very slow and have very very little
RAM when compared to today’s desktop microcomputers) most of the available C compil-
ers for the single-chip microcomputers used in this book do not support objects, or float-
ing-point. Floating-point should be used only in situations where the range of values spans
many orders of magnitude or where the range of values is unknown at software design time.
Our experience is that numbers used in embedded systems usually have a narrow and
known range, so integer math is sufficient. On the other hand, there is some interest for ap-
plying object-oriented approaches of C⫹⫹ to embedded system design. A few illustrations
of object-oriented design can be found in this book.
Chapters 1 and 2 can serve as an introduction to assembly language programming. Most
embedded systems engineers agree that a working knowledge of assembly is necessary even
when virtually all of our software is written in C. In specific, we believe we must know
enough assembly language to be able to follow the assembly listing files generated by our
compiler. This understanding of assembly language is vital when debugging, writing inter-
rupt handlers, calculating real time events, and considering reentrancy. Consequently, de-
tailed information on assembly language programming is included on the CD. In particular
you will find microcomputer data sheets, interactive on-line help as part of the TExaS sim-
ulator, and a short introduction to assembly language programming as an HTML document.
The electrical components used in this book span a wide range. Examples include
the 2764 PROM, 1N914 diode, 2N2222 transistor, 7406 open collector TTL driver,
74LS74 LSTTL flip flop, 74HC573 high speed CMOS transparent latch, Max494 op
amp, L293 interface driver, Hitachi 44780 LCD driver, IRF540 MOSFET, 6N139 opto-
coupler, Max232 driver, and Analog Devices DAC8043 digital-to-analog converters. It
is unrealistic for each student to have a personal library that contains the data books for
all these devices. On the other hand it is appropriate for the company or university to
establish a reference library that can be accessed by all the students. The circuit dia-
grams in this book usually include chip numbers and component values, but not pin
numbers or circuit board layout information. Consequently, with the appropriate data
sheets available, most circuits can be readily built.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
x 䡲 Preface
example, one could teach just assembly language or just C programming. In this situation,
one simply skips the other cases.
The other approach to selecting the appropriate subset is to pick and choose topics. For
example, a junior-level laboratory class might introduce the student to microcomputer in-
terfacing. This class might focus on interfacing techniques and may cover Chapters 1 to 4,
6 to 8 and a little bit of Chapters 11 to 13. For these students, the remaining parts of the
book become a resource to them for projects later in school or on the job. Another possi-
bility is a senior-level project laboratory class. The objectives of this class might focus on
the systems aspect of real time embedded systems. In this situation, some microcomputer
programming has been previously taught, so this course might cover the advanced inter-
facing techniques in Chapters 5, 9, 10, and 15 and the applications in Chapters 12 to 14. For
these students, the first half of the book becomes a review, allowing them to properly inte-
grate previously learned concepts to solve complex embedded system applications.
In most departments analog circuit design (for example, op amps and analog filters) is
taught in separate classes, so Chapter 11 will be a review chapter. Specific and detailed in-
formation about analog circuit design was included in this book to emphasize the system
integration issues when designing embedded systems. In other words, developing embed-
ded systems does not rely solely on the tools of computer and software engineering but
rather involves all of electrical, computer, and software engineering.
The next important decision to make is the organization of the student laboratory. As
engineering educators we appreciate the importance of practical “hands on” experiences in
the educational process. On the other hand, space, staff, and money constraints force all of
us to compromise, doing the best we can. Consequently, we present two laboratory possi-
bilities that range considerably in cost. Indeed, you may wish to mix two or more ap-
proaches into a hybrid simulated/physical laboratory configuration. We do believe that the
role of simulation is becoming increasingly important as the race for technological superi-
ority is run with shorter and shorter design cycle times. On the other hand, we should ex-
pose our students to all the phases of engineering design, including problem specification,
conceptualization, simulation, construction, and analysis.
In the first laboratory configuration, we use the traditional approach to an interfacing
laboratory. A physical microcomputer development board is made available for each labo-
ratory group of two students. There are numerous possibilities here. Companies such as
Technological Arts, Axiom, Wytec, and National Instruments produce development sys-
tems. In addition to the microcomputer board, each group will need a power supply, a pro-
totyping area to build external circuits, and the external I/O devices themselves. A number
of shared development/debugging stations will also have to be configured. It is on these
dedicated PC-compatible computers that the assembler or compiler is installed. If you de-
velop software in assembly, then the TExaS simulator can be used to edit, assemble, down-
load, and debug on a real 9S12 board. In most cases, when programming in C, a current
version of a C cross-compiler is greatly preferable. As mentioned earlier, the one possibil-
ity ImageCraft’s ICC12 (ImageCraft Inc. 2625 middlefield Rd. #685, Palo Alto, CA 94306
http://www.imagecraft.com). The Metrowerks CodeWarrior with educational license is also
an excellent choice for developing 9S12 software (Freescale, www.freescale.com). Test
equipment like an oscilloscope, a digital multimeter, and a signal generator are required at
each station. Expensive equipment like logic analyzers and printers can be shared. Some
mail-order companies sell used or surplus electronics that can be configured into laboratory
experiments (for possibilities, see my website http://users.ece.utexas.edu/~valvano). Many
laboratory assignments are available using this traditional configuration. For universities
that adopt this book, you will be allowed to download these assignments in Microsoft Word
format, then rewrite, print out, and distribute to your students laboratory assignments based
on these example laboratory assignments. Because of the detailed and specific nature of the
laboratory setup, rewriting will certainly be necessary. The 9S12C32 board from Techno-
logical Arts and the Metrowerks cross-compiler is the specific configuration presented in the
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
䡲 Preface xi
example laboratory assignments, but the assignments are appropriate for most microcom-
puter development boards based on the 9S12.
The second laboratory configuration is based entirely on the TExaS simulator. Each
book comes with a CD that allows the student to install the application on a single computer.
Students, for the most part, work off campus and come to a teaching assistant station for help
or laboratory grading. In this configuration you can either develop software in assembly us-
ing the TExaS assembler or develop C programs using the free version of CodeWarrior. The
simulator itself becomes the platform on which the laboratory assignments are developed
and tested. The educational license of Metrowerks CodeWarrior supports code up to 32 K.
Laboratory assignments are also available using the simulator. Again, for universities that
adopt this book, you will be allowed to download these assignments in Microsoft Word for-
mat, then rewrite, print out, and distribute to your students laboratory assignments based on
these example laboratory assignments.
The exercises at the end of each chapter can be used to supplement the laboratory assign-
ments. In actuality, these exercises, for the most part, were collected from old quizzes and final
examinations. Consequently, these exercises address the fundamental educational objectives
of the chapter, without the overwhelming complexity of a regular laboratory assignment.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xii 䡲 Preface
P.7 Acknowledgments
Many shared experiences contributed to the development of this book. First, I would like to
acknowledge the many excellent teaching assistants I have had the pleasure of working with.
Some of these hard-working, underpaid warriors include Pankaj Bishnoi, Rajeev Sethia, Adson
da Rocha, Bao Hua, Raj Randeri, Santosh Jodh, Naresh Bhavaraju, Ashutosh Kulkarni, Bryan
Stiles, V. Krishnamurthy, Paul Johnson, Craig Kochis, Sean Askew, George Panayi, Jeehyun
Kim, Vikram Godbole, Andres Zambrano, Ann Meyer, Hyunjin Shin, Anand Rajan, Anil Kot-
tam, Chia-ling Wei, Jignesh Shah, Icaro Santos, David Altman, Nachiket Kharalkar, Robin
Tsang, Byung Geun Jun, John Porterfield, Daniel Fernandez, James Fu., Deepak Panwar, Jacob
Egner, Sandy Hermawan, Usman Tariq, Sterling Wei, Seil Oh, Antonius Keddis, Lev Shuha-
tovich, Glen Rhodes, Geoffrey Luke, and Karthik Sankar. I dreamed of writing this book the
first time I taught microcomputer interfacing on the old Motorola MC6809 in 1981. Over the
intervening years my teaching assistants have contributed greatly to the contents of this book,
particularly to its laboratory assignments. In a similar manner, my students have recharged
my energy each semester with their enthusiasm, dedication, and quest for knowledge.
I would also like to thank the reviewers of the second edition who provided such excel-
lent feedback including N. Alexandridis, George Washington University; David W. Capson,
McMaster University; Lee D. Coraor, The Pennsylvania State University; Subra Ganesan,
Oakland University; Voicu Groza, University of Ottawa; and William R. Murray, California
Polytechnic State University, San Luis Obispo.
I would like to thank the reviewers of this third edition who also provided excellent feed-
back including John M. Acken, Oklahoma State University; William Bishop, University of
Waterloo; David W. Capson, McMaster University; James M. Conrad, University of North
Carolina, Charlotte; and John Seng, California Polytechnic State University, San Luis Obispo.
Next, I appreciate the patience and expertise of my fellow faculty members at the Uni-
versity of Texas at Austin. From a personal perspective, Dr. John Pearce has provided
much needed encouragement and support throughout my career. Also, Dr. John Cogdell
and Dr. Francis Bostick helped me with analog circuit design, and Dr. Baxter Womack and
Dr. Robert Flake provided good information about control systems. The book and accompa-
nying software include many finite-state machines derived from the digital logic examples
explained to me by Dr. Charles Roth. I continue to appreciate the encouragement and sup-
port of Dr. G. Jack Lipovski. An outside observer might conclude that Dr. Jack and I enjoy
taking opposite sides of every issue. In actuality, this friendly competition makes us organ-
ize our otherwise erratic thoughts, and in the process everything we do is the better for it.
Over the last few years, I have enjoyed teaching embedded systems with Dr. William
Bard. Bill has contributed to both the excitement and substance of our laboratory based on
this book. With pushing from Bill and TAs Robin, Glen, Lev, and John, we have added low
power, PCB layout, systems level design, surface mount soldering, and wireless communi-
cation to our lab experience. You can see descriptions and photos of our EE345L design
competition at http://users.ece.utexas.edu/~valvano/.
Last, I appreciate the valuable lessons of character and commitment taught to me by
my grandparents and parents. Most significantly, I acknowledge the love, patience, and
support of my entire family, especially my wife Barbara and my children, Ben, Dan, and Liz.
By the grace of God, I am truly the happiest man on the planet, because I am sur-
rounded by these fine people.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
䡲 Contents xv
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xvi 䡲 Contents
12 Data Acquisition
Systems 591 14 Simple Networks 686
14.1 Introduction 686
12.1 Introduction 591
12.1.1 Accuracy 593 14.2 Communication Systems Based on the
12.1.2 Resolution 595 SCI Serial Port 690
12.1.3 Precision 595 14.3 Design and Implementation
12.1.4 Reproducibility or Repeatability 596 of a Controller Area Network
12.2 Transducers 596 (CAN) 692
12.2.1 Static Transducer Specifications 596 14.3.1 The Fundamentals of CAN 692
12.2.2 Dynamic Transducer Specifications 600 14.3.2 Details of the 9S12C32 CAN 695
12.2.3 Nonlinear Transducers 601 14.3.3 9S12C32 CAN Device Driver 698
12.2.4 Position Transducers 601 14.4 Wireless Communication 701
12.2.5 Velocity Measurements 603 14.5 Modem Communications 705
12.2.6 Force Transducers 605 14.5.1 FSK Modem 705
12.2.7 Temperature Transducers 606 14.5.2 Phase-Encoded Modems 708
12.3 DAS Design 611 14.5.3 Quadrature Amplitude
12.3.1 Introduction and Definitions 611 Modems 709
12.3.2 Using Nyquist Theory to Determine 14.6 Exercises 710
Sampling Rate 612
14.7 Lab Assignments 714
12.3.3 How Many Bits Does One Need
for the ADC? 615
12.3.4 Specifications for the Analog Signal
Processing 615 15 Digital Filters 716
12.3.5 How Fast Must the ADC Be? 620
15.1 Basic Principles 717
12.3.6 Specifications for the S/H 620
15.2 Simple Digital Filter
12.4 Analysis of Noise 621
Examples 719
12.4.1 Thermal Noise 621
12.4.2 Shot Noise 624 15.3 Impulse Response 726
12.4.3 1/f, or Pink, Noise 624 15.4 High-Q 60-Hz Digital Notch
12.4.4 Galvanic Noise 624 Filter 729
12.4.5 Motion Artifact 624 15.5 Effect of Time Jitter on Digital
12.4.6 Electromagnetic Field Induction 625 Filters 734
12.4.7 Techniques to Measure Noise 625
15.6 Discrete Fourier Transform 736
12.4.8 Techniques to Reduce Noise 627
15.7 FIR Filter Design 736
12.5 Data Acquisition Case Studies 629
15.8 Direct-Form Implementations 739
12.6 Exercises 639
15.9 Exercises 740
12.7 Lab Assignments 647
15.10 Lab Assignments 742
13 Microcomputer-Based
Control Systems 648 Appendix 1 744
13.1 Introduction to Digital Control Appendix 2 766
Systems 648
13.2 Open-Loop Control Systems 649 Index 781
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1 Microcomputer-Based
Systems
The overall objective of this book is to teach the design of embedded systems. It
is an effective approach to learn new techniques by doing them. But, the dilemma
in teaching a laboratory-based topic such as embedded systems is that there is a
tremendous volume of details that first must be learned before microcomputer
hardware and software systems can be designed. The approach taken in this book
is to learn by doing, starting with very simple problems and building up to more
complex systems later in the book.
We will begin with a short section introducing some terminology and the
basic components of a computer system. In order to understand the context of
our designs, we will overview the general characteristics of embedded systems.
It is in these discussions that we develop a feel for the range of possible
embedded applications. Because courses taught using this book typically have a
lab component, we will review some practical aspects of digital logic. We then
introduce the specific architectures of the Freescale MC9S12 family. For more
detailed information concerning your specific microcomputer, refer to the
respective Freescale manual. Data sheets for the devices we will use can be
found in PDF format at http://users.ece.utexas.edu/~valvano. At the end of
the chapter, we will discuss prototyping methods to build embedded systems
and present a simple example with binary inputs and outputs.
Even though we will design systems based specifically on the MC9S12C32,
these solutions can, with little effort, be implemented on other versions of the
MC9S12 family. If your overall goal is to develop assembly language software,
then the C code can serve to clarify the software algorithms. If your overall
goal is to develop C code, then I strongly advise you to learn enough assembly
language so that you can understand the machine code that your compiler
generates. From this understanding, you can evaluate, debug, and optimize
your system.
1
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
2 1 䡲 Microcomputer-Based Systems
Figure 1.1
Computer Bus
The basic components of
a computer system
Processor
include processor,
Input Input
memory, and I/O. signals
ports External Physical
RAM circuits devices
Output Output
ports signals
ROM
Control
Address
Data
The computer can store information in RAM by writing to it, or it can retrieve previ-
ously stored data by reading from it. Most RAMs are volatile, meaning if power is inter-
rupted and restored, the information in the RAM is lost. Information is programmed into
ROM using techniques more complicated than writing to RAM. On the other hand, retriev-
ing data from a ROM is identical to retrieving data from RAM. ROMs are nonvolatile,
meaning if power is interrupted and restored, the information in the ROM is retained. Some
ROMs are programmed at the factory and can never be changed. A Programmable ROM
(PROM) can be erased and reprogrammed by the user, but the erase/program sequence is
typically 10000 times slower than the time to write data into a RAM. Some PROMs are
erased with ultraviolet light and programmed with voltages, whereas electrically erasable
PROMs (EEPROM) are both erased and programmed with voltages. Flash ROM is a popu-
lar type of EEPROM. For most of the systems in this book, we will store instructions and
constants in ROM and place variables and temporary data in RAM.
Checkpoint 1.1: What are the differences between a microcomputer, a micro-
processor, and a microcontroller?
The external devices attached to the computer provide functionality for the system.
An input port is hardware on the computer that allows information about the external
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.1 䡲 Computer Architecture 3
world to be entered into the computer. The computer also has hardware called an output
port to send information out to the external world. An interface is defined as the collec-
tion of the I/O port, external electronics, physical devices, and the software, which com-
bine to allow the computer to communicate with the external world. An example of an
input interface is a switch, where the operator moves the switch, and the software can
recognize the switch position. An example of an output interface is a light-emitting
diode (LED), where the software can turn the light on and off, and the operator can see
whether or not the light is shining. There is a wide range of possible inputs and outputs,
which can exist in either digital or analog form. In general, we can classify I/O inter-
faces into four categories
parallel—binary data is available simultaneously on a group of lines
serial—binary data is available one bit at a time on a single line
analog—data is encoded as an electrical voltage, current, or power
time—data is encoded as a period, frequency, pulse width, or phase shift
Checkpoint 1.2: What are the differences between an input port and an input
interface?
In this book, numbers that start with $ (e.g., $64) are specified in hexadecimal, which
is base 16. In C, we start hexadecimal numbers with 0x (e.g., 0x64). Intel assembly lan-
guage adds an “H” at the end to specify hexadecimal (e.g., 64H). Texas Instruments uses
“h” (e.g., 64h).
In a system with memory-mapped I/O, as shown in Figure 1.1, the I/O ports are con-
nected to the processor in a manner similar to memory. I/O ports are assigned addresses,
and the software accesses I/O using reads and writes to the specific I/O addresses. The soft-
ware inputs from an input port using the same instructions as it would if it were reading
from memory. Similarly, the software outputs from an output port using the same instruc-
tions as it would if it were writing to memory. The processor, memory, and I/O are con-
nected together by an address bus, a data bus, and a control bus. Together, these buses direct
the data transfer between the various modules in the computer. A bus is defined as a col-
lection of signals, which are grouped for a common purpose. For example, the address bus
on the 9S12 is 16 signals (A15-A0), which together specify the memory address ($0000 to
$FFFF) that is currently being accessed. The address specifies both which module (input,
output, RAM or ROM) as well as which cell within the module will communicate with the
processor. The data bus contains the information that is being transferred, which on the
9S12 is 16 bits (D15-D0), but it can transfer either 8-bit or 16-bit data. The control bus spec-
ifies the timing and the direction of the transfer. We call a complete data transfer a bus cycle.
In a simple computer system, like the 9S12, only two types of transfers are allowed, as
shown in Table 1.1. In this simple system, the processor always controls the address (where
to access), the direction (read or write), and the control (when to access.) The MC9S12C32
has 2048 bytes of RAM located at addresses $3800 to $3FFF. Figure 1.2 illustrates how the
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
4 1 䡲 Microcomputer-Based Systems
processor fetches the 8-bit contents of location $3800 using a read cycle. Assume memory
at address $3800 has the value $98. The processor first places the RAM address $3800 on
the address bus, then the processor issues a read command on the control bus. The memory
will respond by placing its $98 information on the data bus, and lastly the processor will
accept the data and terminate the read command.
Figure 1.2
A memory read cycle $98
copies data from RAM, $3800 Memory read cycle
ROM, or an input device R
into the processor. Processor
Input Input
ports signals
RAM $98
Output Output
ports signals
ROM
Control
Address
Data
Figure 1.3 illustrates how the processor stores the 8-bit value $25 into RAM location
$3800 using a write cycle. The processor first places the RAM address $3800 on the address
bus. Next, the processor places the $25 information on the data bus, and then the processor
issues a write command on the control bus. The memory will respond by storing the $25
information into the proper place, and after the processor is sure the memory has captured
the data, it will terminate the write command.
Figure 1.3
A memory write cycle $25
copies data from the $3800 Memory write cycle
processor into RAM or W
$25
an output device. Processor
Input Input
ports signals
RAM
Output Output
ports signals
ROM
Control
Address
Data
You see that if we wish to transfer data from an input device into RAM, we must first
transfer it from input to the processor, then from the processor into RAM. In some micro-
controllers, such as the ARM Cortex-M3 and in all desktop PCs, we can transfer data
directly from input to RAM or from RAM to output using direct memory access (DMA).
The bandwidth of an I/O device is the number of information bytes/sec that can be trans-
ferred. Because DMA is faster, we will use this method to interface high bandwidth devices
such as disks and networks. During a read DMA cycle (Figure 1.4), data flows directly from
the memory to the output device. Many systems that support DMA also allow data to be
transferred from memory to memory (See Chapter 10).
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.1 䡲 Computer Architecture 5
Figure 1.4
A DMA read cycle copies $98
data from RAM, ROM, $3800 DMA read cycle
or an input device into R
an output device. Processor
Input Input
ports signals
RAM $98
Output Output
ports signals
ROM
Control
Address
Data
During a write DMA cycle (Figure 1.5) data flows directly from the input device to
memory.
Figure 1.5
A DMA write cycle $25
copies data from the $3800 DMA write cycle
input device into RAM or W
an output device. Processor
Input Input
$25
ports signals
RAM
Output Output
ports signals
ROM
Control
Address
Data
Input/output devices are important in all computers, but they are especially signifi-
cant in an embedded system. In a computer system with I/O-mapped I/O, the control bus
signals that activate the I/O are separate from those that activate the memory devices.
These systems have a separate address space and separate instructions to access the I/O
devices. The original Intel 8086 had four control bus signals: MEMR, MEMW, IOR, and
IOW. MEMR and MEMW were used to read and write memory, while IOR and IOW
were used to read and write I/O. The Intel x86 refers to any of the processors that Intel
has developed based on this original architecture. Even though we do not consider the
personal computer (PC) an embedded system, there are embedded systems developed on
this architecture. One such platform is called the PC/104 Embedded-PC. The Intel x86
processors continue to implement this separation been memory and I/O. Currently, there
are 32 to 64 memory address lines, but only 16 of those lines are used to access I/O
devices. The other address lines are not used during an I/O bus cycle. Rather than use the
regular memory access instructions, the Intel x86 processor uses special in and out
instructions to access the I/O devices. The advantages of I/O-mapped I/O are that soft-
ware can not inadvertently access I/O when it thinks it is accessing memory. In other
words, it protects I/O devices from common software bugs, such as bad pointers, stack
overflow, and buffer overflows. In contrast, systems with memory-mapped I/O are easier
to design, and the software is easier to write.
The processor within the 9S12 microcontroller has four major components, as illus-
trated in Figure 1.6. The bus interface unit (BIU) reads data from the bus during a read
cycle, and writes data onto the bus during a write cycle. The 9S12 has a single processor and
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
6 1 䡲 Microcomputer-Based Systems
does not support DMA. Therefore, the BIU always drives the address bus and the control
signals of the bus. The effective address register (EAR) contains the memory address used
to fetch the data needed for the current instruction.
The control unit (CU) orchestrates the sequence of operations in the processor. The CU
issues commands to the other three components. The instruction register (IR) contains the oper-
ation code (or opcode) for the current instruction. Most 9S12 opcodes are 8 bits wide, but some
are 16 bits. Most instructions have two parts, the opcode that defines the function to perform,
and an operand that specifies the data to be used. In an embedded system the software is con-
verted to machine code, which is a list of instructions, and stored in nonvolatile memory. When
the system is running, instructions one at a time are fetched from memory and executed.
The registers are high-speed storage devices located in the processor. Registers do not
have addresses like regular memory, but rather they have specific functions explicitly
defined by the instruction. Accumulators are registers that contain data. Index registers con-
tain addresses. The program counter (PC) points to the memory containing the instruction
to execute next. In an embedded system, the PC usually points into nonvolatile memory
(e.g., ROM, EPROM, or EEPROM). The information stored in nonvolatile memory (e.g.,
the instructions) is not lost when power is removed. The stack pointer (SP) points to the
RAM and defines the stack. The stack is an extremely important component of software
development and can be used to pass parameters, save temporary information, and imple-
ment local variables. The internal RAM of the 9S12 is volatile memory, meaning its infor-
mation is lost when power is removed. On some systems, such as calculators and PDAs, a
separate battery powers the RAM, creating nonvolatile RAM. The condition code register
(CCR) contains the status of the previous operation, as well as some operating mode flags
such as the interrupt enable bit. This register is called the flag register on the Intel computers.
The arithmetic logic unit (ALU) performs arithmetic and logic operations. Addition,
subtraction, multiplication, and division are examples of arithmetic operations. And, or,
exclusive or, and shift are examples of logical operations.
Checkpoint 1.5: For what do the acronyms CU DMA BIU ALU stand?
In general, the execution of an instruction goes through four phases. First, the computer
fetches the machine code for the instruction by reading the value in memory pointed to by
the program counter (PC). Some instructions are only one byte long, while others are two or
more bytes. After each byte of the instruction is fetched, the PC is incremented. At this time,
the instruction is decoded, and the effective address is determined (EAR). Many instructions
require additional data, and during phase 2, the data is retrieved from memory at the effec-
tive address. Next, the actual function for this instruction is performed. Often, the computer
bus is idle at this time, because no additional data is required. During the last phase, the
results are written back to memory. All instructions have a phase 1, but the other three phases
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.2 䡲 Embedded Computer Systems 7
may or may not occur for any specific instruction. Each of the phases may require one or
more bus cycles to complete. Each bus cycle reads or writes one piece of data. The 9S12 bus
cycle can transfer 8-bit or 16-bit data.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
8 1 䡲 Microcomputer-Based Systems
It is common for one device to have multiple microcontrollers, where the operational tasks are
distributed and the microcontrollers are connected in a local area network (LAN). These high-
end features are critical for consumer electronics, medical devices, automotive controllers, and
military hardware, where performance and reliability are more important than cost. However,
small size and low power continue as important features for all embedded systems.
Checkpoint 1.6: What is an embedded system?
The computer engineer has many design choices to make when building a real-time
embedded system. Often, defining the problem, specifying the objectives, and identifying
the constraints are harder than actual implementations. In this book, we will develop com-
puter engineering design processes, introducing fundamental methodologies for problem
specification, prototyping, testing, and performance evaluation.
In this book, we will refer to devices such as the Freescale MC9S12C32 simply as 9S12.
The different versions of the microcomputers contain varying amounts of memory and
input/output (I/O) devices. A typical automobile now contains an average of ten microcon-
trollers. In fact, upscale homes may contain as many as 150 microcontrollers, and the average
consumer now interacts with microcontrollers up to 300 times a day. As shown in Figure 1.7,
the general areas that employ embedded microcomputers encompass every field of engineering:
䡲 Communications
䡲 Automotive
䡲 Military
䡲 Medical
䡲 Consumer
䡲 Machine control
Medical
Automotive
Communications
Military
Comsumer Industrial
Figure 1.7
Example embedded computer systems.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.2 䡲 Embedded Computer Systems 9
Table 1.2 presents typical embedded microcomputer applications and the function per-
formed by the embedded microcomputer. Each microcomputer accepts inputs, performs
calculations, and generates outputs. We must also learn how to interface a wide range of
inputs and outputs that can exist in either digital or analog form.
Checkpoint 1.7: There is a microcontroller embedded in an alarm clock. List three
operations the software must perform.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
10 1 䡲 Microcomputer-Based Systems
Sensors
Liquid Crystal Display (LCD) and light emitting diode (LED) displays
Analog to digital converters (ADC) and digital to analog converters (DAC)
Other microprocessors
Analog to digital converters convert analog voltages to digital numbers, and they are avail-
able on the 9S12 with 8-bit and 10-bit resolution. The timer features on the Freescale micro-
computers include
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.3 䡲 The Design Process 11
During the analysis phase, we discover the requirements and constraints for our pro-
posed system. We can hire consultants and interview potential customers in order to gather
this critical information. A requirement is a general parameter that the system must satisfy.
We begin by rewriting the system requirements, which are usually written in general form,
into a list of detailed specifications. In general, specifications are detailed parameters
describing how the system should work. For example, a requirement may state that the
system should fit into a pocket, whereas a specification would give the exact size and weight
of the device. For example, suppose we wish to build a motor controller. During the analy-
sis phase, we would determine obvious specifications such as range, stability, accuracy, and
response time. There may be less obvious requirements to satisfy, such as weight, size,
battery life, product life, ease of operation, display readability, and reliability. Often,
improving the performance of one parameter can be achieved only by decreasing the per-
formance of another. This art of compromise defines the tradeoffs an engineer must make
when designing a product. A constraint is a limitation, within which the system must oper-
ate. The system may be constrained as to such factors as cost, safety, compatibility with
other products, use of specific electronic and mechanical parts as employed in other
devices, interfaces with other instruments and test equipment, and development schedule.
The following measures are often considered during the analysis phase of a project:
Safety: The risk to humans or the environment
Accuracy: The difference between desired and actual parameter performance
Precision: The number of distinguishable measurements
Resolution: The smallest change that can be reliably detected
Response time: The time difference between triggering event and resulting action
Bandwidth: The amount of information processed per time unit
Maintainability: The flexibility with which the device can be modified
Testability: The ease with which proper operation of the device can be verified
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
12 1 䡲 Microcomputer-Based Systems
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.3 䡲 The Design Process 13
An example data flow graph for a motor controller is shown in Figure 1.9. The require-
ment of the system is to deliver power to a motor so that the speed of the motor equals the
desired value set by the operator using a keypad. In order to make the system easier to use
and to assist in testing, a liquid crystal display (LCD) is added. The sensor converts motor
speed into an electrical voltage. The amplifier converts this signal into the 0 to 5V voltage
range required by the ADC. The ADC converts analog voltage into a digital sample. The
ADC routines, using the ADC and timer hardware, collect samples and calculate voltages.
Next, this software uses a table data structure to convert voltage into measured speed. The
user will be able to select the desired speed using the Keypad interface. The desired and
measured speed data are passed to the Controller software, which will adjust the power
output in such a manner as to minimize the difference between the measured speed and the
desired speed. Finally, the power commands are output to the actuator module. The actua-
tor interface converts the digital control signals to power delivered to the motor. The meas-
ured speed and speed error will be sent to the LCD module. The solution to this problem will
be presented in Chapter 13.
Figure 1.9
A data flow graph Speed
Sensor Voltage Analog Voltage ADC
showing how signals amplifier
pass through a motor Motor Timer
controller.
Power Voltage Digital Digital
Actuator Interface control sample
ADC
ASCII routines
Keypad Desired Measured
Keypad Interface speed speed
routines
Controller
software Table
ASCII Speeds lookup
LCD Interface LCD
routines
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
14 1 䡲 Microcomputer-Based Systems
Figure 1.10
A call flow graph for a Controller
motor controller. software
Timer
The Controller software calls the Keypad routines to get the desired speed, calls the ADC
software to get the motor speed at that point, determines what power to deliver to the motor,
and updates the actuator by sending the power value to the Actuator interface. The
Controller software calls the LCD routines to display the status of the system. As we will
see in Chapters 11–15, acquiring data, calculating parameters, and outputting results at a
regular rate is strategic when performing digital processing in embedded systems.
Checkpoint 1.9: What confusion could arise if two software modules were allowed
to access the same I/O port? This situation would be evident on a call-graph if the two
software modules had arrows pointing to the same I/O port.
Observation: If module A calls module B, and B returns data, then a data flow graph
will show an arrow from B to A, but a call-graph will show an arrow from A to B.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.3 䡲 The Design Process 15
1.3.2 Figure 1.8 describes top-down design as a cyclic process, beginning with a problem state-
Bottom-Up ment and ending up with a solution. With a bottom-up design we begin with solutions and
Design build up to a problem statement. Many innovations begin with an idea, “what if . . .?” In a
bottom-up design, one begins with designing, building, and testing low-level components.
Figure 1.11 illustrates a two-level process, combining three subcomponents to create the
overall product. This hierarchical process could have more levels and/or more components
at each level. The low-level designs can occur in parallel. The design of each component is
cyclic, iterating through the design-build-test cycle until the performance is acceptable.
Bottom-up design may be inefficient because some subsystems may be designed, built, and
tested but never used. As the design progresses the components are fit together to make the
system more and more complex. Only after the system is completely built and tested does
one define the overall system specifications. The bottom-up design process allows creative
ideas to drive the products a company develops. It also allows one to quickly test the feasi-
bility of an idea. If one fully understands a problem area and the scope of potential solu-
tions, then a top-down design will arrive at an effective solution most quickly. On the other
hand, if one doesn’t really understand the problem or the scope of its solutions, a bottom-up
approach allows one to start off by learning about the problem.
Observation: A good engineer knows both bottom-up and top-down design meth-
ods, choosing the approach most appropriate for the situation at hand.
• Block diagrams
High
• Data flow graphs
level Done
design
Done
Done
Testing Testing
• Hardware No Testing No
No
• Software
Implement- Implement-
ation Implement- ation
• Call graphs
• Data structures ation
• I/O interfaces
Engineering Engineering
design Engineering design
Idea
design Idea
Idea
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
16 1 䡲 Microcomputer-Based Systems
Figure 1.12
Sometimes one output |I | ≥ Σ |I |
OL IL and |I | ≥ Σ |I |
OH IH
When we design circuits using devices all from a single logic family, we can define fan
out as the maximum number of inputs one output can drive. For transistor-transistor logic
(TTL) logic we can calculate fan out from the input and output currents:
fan out = minimum ((IOH/IIH), (IOL/IIL))
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.4 䡲 Digital Logic and Open Collector 17
to τ, then the CMOS interface functions properly. For circuits that mix devices from one
family with another, we must look individually at the input and output currents, voltages,
and capacitive loads. Table 1.3 shows typical current values for the various digital logic
families. The MC9S12C32 allows full drive (a low R providing 10 mA) and reduced drive
(a larger R providing a smaller 2 mA) modes.
Table 1.3 Family Example IOH IOL IIH IIL Fan Out
The input and output
currents of various Standard TTL 7404 0.4 mA 16 mA 40 µA 1.6 mA 10
digital logic families and Schottky TTL 74S04 1 mA 20 mA 50 µA 2 mA 10
microcomputers. Low-power Schottky TTL 74LS04 0.4 mA 4 mA 20 µA 0.4 mA 10
High-speed CMOS 74HC04 4 mA 4 mA 1 µA 1 µA
Freescale microcomputer MC68HC11E 0.8 mA 1.6 mA 1 µA 1 µA
Freescale microcomputer MC9S12C32 10 mA 10 mA 1 µA 1 µA
Intel microcomputer 87C51 P0 7 mA 3.2 mA 10 µA 10 µA
87C51 P1,P2,P3 60 µA 1.6 mA 50 µA
Observation: For TTL devices the logic low currents are much larger than the logic
high currents.
Figure 1.14 compares the input and output voltages for many of the digital logic
families. VIL is the voltage below which an input is considered a logic low. Similarly,
VIH is the voltage above which an input is considered a logic high. VOH is the output
voltage when the signal is high. In particular, if the output is a logic high, and the cur-
rent is less than IOH, then the voltage will be greater than VOH. Similarly, VOL is the
output voltage when the signal is low. In particular, if the output is a logic low and the
current is less than IOL, then the voltage will be less than VOL. The maximum output
current specification on the 9S12 is 25 mA, which is the current above which it will
Figure 1.14 5.0 VCC 5.0 VCC 5.0 VCC 5.0 VCC
Voltage thresholds for
various digital logic 4.44 VOH
4.2 VOH
families.
2.5 VCC
2.5 Vt 2.9 VOH
2.4 VOH 2.4 VOH 2.4 VOH
2.2 VIH 2.3 VOH
1.6 VIH 2.0 VIH 2.0 VIH
1.75 VIL 1.7 VIH
1.5 VIL 1.5 Vt 1.5 Vt 1.5 Vt
1.4 VIL 1.2 Vt
1.1 VIL
0.5 VOL 0.8 VIL 0.8 VIL
0.5 VOL 0.7 VIL
0.4 VOL 0.4 VOL 0.4 VOL 0.4 VOL
0.2 VOL
0.0 Gnd 0.0 Gnd 0.0 Gnd 0.0 Gnd 0.0 Gnd 0.0 Gnd 0.0 Gnd
5V 9S12 5V CMOS ETL 5V TTL 3.3V 9S12 LVTTL 2.5V CMOS
HC, AHC, AC ABTE LS, TTL, S, ALS, LVT, LVC, ALVC, ALVT
AS, F, BCT, ABT, LV, ALB
HCT, AHCT, ACT ALVT
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
18 1 䡲 Microcomputer-Based Systems
cause damage. Normally, we design the system so the output currents are less than IOH
and IOL. Vt is the typical threshold voltage, which is the voltage at which the input usu-
ally switches between logic low and high. Formally however, an input is considered as
indeterminate for voltages between VIL and VIH. The five parameters that affect our
choice of logic families are
䡲 Power supply voltage (e.g., 5 V, 3.3 V etc.)
䡲 Power supply current (e.g., will the system need to run on batteries?)
䡲 Speed (e.g., clock frequency and propagation delays)
䡲 Output drive, IOL, IOH (e.g., does it need to drive motors or lights?)
䡲 Noise immunity (e.g., electromagnetic field interference)
䡲 Temperature (e.g., 0 to 70 C)
Common error: If the voltage applied to a high-speed CMOS input pin exists
between VIL and VIH for extended periods of time, permanent damage may occur.
Checkpoint 1.10: The 9S12 is an HC device. How will the 9S12 interpret an input pin
as the input voltage changes from 0, 1, 2, 3, 4, to 5V? That is, for each voltage, will it
be considered as a logic low, as a logic high, or as indeterminate?
Checkpoint 1.11: Considering both voltage and current, can the output of a
74HC04 drive the input of a 74LS04?
Checkpoint 1.12: Considering both voltage and current, can the output of a 74LS04
drive the input of a 74HC04?
A very important concept used in computer technology is tristate logic, which has
three output states: high, low, and off. Other names for the off state are HiZ, floating,
and tristate. As shown in Figure 1.15, the 74HC245 chip has eight bidirectional tristate
drivers. The triangle shape, drawn with a signal on the top or the bottom of the trian-
gle, is used to specify tristate control output in logic diagrams. The 74HC245 chip is
active when the output enable, OE, input is low, and the direction is controlled by the
DIR input. For example, if OE0 and DIR0, then the B1–B8 are inputs and A1–A8
are outputs, and each output An equals the corresponding Bn input. Conversely, if
OE0 and DIR1, then the A1-A8 are inputs and B1-B8 are outputs, and each output
Bn equals the corresponding An input. When OE is high, all the outputs will be off
(floating). Devices like the 74HC245 are used in microcomputer systems because of
the large output current and bidirectional tristate outputs. Tables 1.4 and 1.5 illustrate
the wide range of technologies available for digital logic design. Not all logic families
have the same choice of logic functions. tpd is the propagation delay from input to
output.
Figure 1.15
Block diagram of a DIR
74HC245 tristate driver.
OE
A1 B1
A8 B8
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.4 䡲 Digital Logic and Open Collector 19
Family Technology VIL VIH VOL VOH IOL IOH ICC tpd
Table 1.4
Comparison of the output drive, power supply current, and speed of various 3.3 V logic ‘245 gates.
Family Technology VIL VIH VOL VOH IOL IOH ICC tpd
Table 1.5
Comparison of the output drive, power supply current, and speed of various 5 V logic ‘245 gates.
The 74LS04 is a low-power Schottky NOT gate, as shown in Figure 1.16. It is called
Schottky logic because the devices are made from Schottky transistors. The output is high
when the transistor Q4 is active, driving the output to 5V. The output is low when the tran-
sistor Q5 is active, driving the output to 0.
The 74HC04 is a high-speed CMOS NOT gate, as shown in Figure 1.17. The output is
high when the transistor Q1 is active, driving the output to 5V. The output is low when
the transistor Q2 is active, driving the output to 0. Since the 9S12 is made with high-speed
CMOS logic, its outputs behave like the Q1/Q2 “push/pull” transistor pair. The 9S12
output ports are not inverting. That is, when you write a “1” to an output port, then the
output voltage goes high. Similarly, when you write a “0” to an output port, then the output
voltage goes low. Analyses of the circuit in Figure 1.17 reveal some of the basic properties
of high-speed CMOS logic. First, because of the complementary nature of the P-channel
(the one on the top) and the N-channel (the one on the bottom) transistors, when the input
is constant (continuously high or continuously low), the supply current, Icc, is very low.
Second, the gate will require supply current only when the output switches from low to high
or from high to low. This observation leads to the design rule that the power required to run
a high-speed CMOS system is linearly related to the frequency of its clock, because the fre-
quency of the clock determines the number of transitions per second. Along the same lines,
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
20 1 䡲 Microcomputer-Based Systems
74LS04 20 kΩ
Q2
A B
Q4
A Q1 4 kΩ
B B
12 kΩ
Q5
3 kΩ
1.5 kΩ
Q3
we see that if the voltage on input A exists between VIL and VIH for extended periods of
time, then both Q1 and Q2 are partially active, causing a short from Vcc to ground. This con-
dition can cause permanent damage to the transistors. Third, since the input A is connected
to the gate of the two MOS transistors, the input currents will be very small (1 µA). In other
words, the input impedance (input voltage divided by input current) of the gate is very high.
Normally, a high input impedance is a good thing, except when the input is not connected.
If the input is not connected, then it takes very little input currents to cause the logic level
to switch.
Common error: If unused input pins on a CMOS microcontroller are left uncon-
nected, then the input signal may oscillate at high frequencies depending on the EM
fields in the environment, wasting power unnecessarily.
Open collector logic has outputs with two states: low and off. The 7405 is a TTL open
collector NOT gate, as shown in Figure 1.18. When drawing logic diagrams, we add the “x”
on the output to specify open collector logic. It is called open collector because the collec-
tor pin of Q3 is not connected, or left open. The output is off when there is no active tran-
sistor driving the output. In other words, when the input is low, the output floats. This “not
driven” condition is called the open collector state. The output is low when the transistor
Q3 is active, driving the output to 0.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.4 䡲 Digital Logic and Open Collector 21
The 74HC05 is a high-speed CMOS open collector NOT gate, as shown in Figure 1.19.
The output is off when there is no active transistor driving the output. In other words, when the
input is low, the output floats. The output is low when the transistor Q2 is active driving the
output to 0. Technically, the 74HC05 implements open drain rather than open collector,
because it is the drain pin of Q2 that is left open. In this book, we will use the terms open col-
lector and open drain interchangeably to refer to digital logic with two output states (low and
off). The data sheets of the 9S12 refer to open collector logic as wire or mode (WOM).
Because of the multiple uses of open collector, many microcomputers can implement
open collector logic. All the ports of the Intel 8051 are inherently open collector. The 9S12
PORTS also supports open collector outputs by setting the SWOM bit.
Observation: The 7405 and 74HC05 are inverting open collector examples, but most
microcomputer output ports are not inverting. That is, when you write a “1” to an
open-collector output port, then the output floats, and when you write a “0” to an
open-collector output port, then the output voltage goes low.
In general, we can use an open collector NOT gate to control the current to a device,
such as a relay, a light emitting diode (LED), a solenoid, a small motor, or a small light. We
used the open collector NOT gate in the LED interface shown in Figure 1.20 to control the
current to our diode. When input to the 7405 is high (p 1, which means 5 V), the output
is low (q0, which means 0 V). In this state, a 10 mA current is applied to the diode,
and it lights up. But, when the input is low (p 0, which means 0 V), the output floats
(q HiZ, which is neither high or low). This floating output state causes the LED current
to be zero, and the diode is dark. The resistor choice will be explained in Chapter 8.
Figure 1.20 μC
+5 V
Open collector used to 200 Ω
interface a light emitting LED
Output port p q
diode. PB3
7405
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
22 1 䡲 Microcomputer-Based Systems
When needed for digital logic, we can convert an open collector output to a digital
signal using a pull-up resistor from the output to 5V. In this way, when the open collec-
tor output floats, the signal will be a digital high. How do we select the value of the pullup
resistor? In general the smaller the resistor, the larger the IOH it will be able to supply when
the output is high. On the other hand, a larger resistor does not waste as much IOL current
when the output is low. One way to calculate the value of this pull-up resistor is to first
determine the required output high voltage, Vout, and output high current, Iout. To supply a
current of at least Iout at a voltage above Vout, the resistor must be less than:
R (5 Vout)/Iout
As an example, we will calculate the resistor value for the situation where the circuit needs
to drive five regular TTL loads. We see from Figure 1.14 that Vout must be above VIH (2V)
in order for the TTL inputs to sense a high logic level. We can add a safety factor and set
Vout at 3 V. In order for the high output to drive all five TTL inputs, Iout must be more than
five IIH. From Table 1.3, we see that IIH is 40 µA, so Iout should be larger than 5•40 µA or
0.2 mA. For this situation the resistor must be less than 10 kΩ.
Another example of open collector logic occurs when interfacing switches to the micro-
controller. The circuit in the left of Figure 1.21 shows a mechanical switch with one terminal
connected to ground. In this circuit, when the switch is pressed, the voltage r is zero. When
the switch is not processed, the signal r floats. The circuit in the middle of Figure 1.21 shows
the mechanical switch with a 10 k pull-up resistor attached the other side. When the switch is
pressed, the voltage at s still goes to zero, because the resistance of the switch (less than 0.1 Ω)
is much less than the pull-up resistor. But now, when the switch is not pressed, the pull-up
resistor creates a 5 V at s. This circuit is shown connected to an input pin of the microcon-
troller. The software, by reading the input port, can determine whether or not the switch is
processed. If the switch is pressed, the software will read zero, and if the switch is not pressed,
the software will read one. The circuit on the right of Figure 1.21 also interfaces a mechani-
cal switch to the microcontroller, but it implements positive logic using a pull-down resistor.
The signal t will be high if the switch is pressed and low if it is released.
Figure 1.21 +5 V +5 V
Switch interface. μC μC
10 kΩ
r s Input port t Input port
PA0 PA0
10 kΩ
Observation: Some of the ports on the 9S12 implement pull-up or pull-down resis-
tors, so the interfaces shown in Figure 1.21 can be made without the resistor.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.5 䡲 Digital Representation of Numbers 23
Figure 1.22
True Equivalence False +5 V Equivalence
A binary bit is true if a +5V
voltage is present and p-type +5 V p-type +5 V
false if the voltage is 0. on short off open
Out = 5 V Out = 0 V
Out = 5 V Out = 0 V
n-type n-type
off open on short
On a 9S12 powered with 5 V supply, a voltage between 3.25 and 5 V is considered high,
and a voltage between 0 and 1.75 V is considered low. Separating the two regions by
1.5 V allows digital logic to operate reliably at very high speeds. The design of transistor-
level digital circuits is beyond the scope of this book. However, it is important to know
that digital data exist as binary bits and encoded as high and low voltages.
Numbers are stored on the computer in binary form. In other words, information is
encoded as a sequence of 1’s and 0’s. On most computers, the memory is organized into
8-bit bytes. This means each 8-bit byte stored in memory will have a separate address.
Precision is the number of distinct or different values. We express precision in alterna-
tives, decimal digits, bytes, or binary bits. Alternatives are defined as the total number of
possibilities. For example, an 8-bit number scheme can represent 256 different numbers.
An 8-bit digital to analog converter (DAC) can generate 256 different analog outputs. An
8-bit analog to digital converter (ADC) can measure 256 different analog inputs. We use
the expression 41/2 decimal digits to mean 20,000 alternatives and the expression 43⁄4
decimal digits to mean 40,000 alternatives. The 1⁄2 decimal digit means twice the number
of alternatives or one additional binary bit. The 3⁄4 decimal digit means four times as
many alternatives or two additional binary bits. For example, a voltmeter with a range of
0.00 to 9.99 V has a three decimal digit precision. Let the operation [[x]] be the greatest
integer of x. E.g., [[2.1]] is rounded up to 3. Tables 1.6 and 1.7 illustrate various repre-
sentations of precision.
Table 1.6
Binary Bits Bytes Alternatives
Relationship between
bits, bytes, and 8 1 256
alternatives as units of 10 1024
precision. 12 4096
16 2 65536
20 1,048,576
24 3 16,777,216
30 1,073,741,824
32 4 4,294,967,296
n [[n/8]] 2n
Table 1.7
Decimal Digits Alternatives
Definition of decimal
digits as a unit of 3 1000
precision. 31/2 2000
33/4 4000
4 10000
41/2 20000
43/4 40000
5 100000
n 10n
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Random documents with unrelated
content Scribd suggests to you:
“Some of your new friends,” wrote Jefferson,[129] “are attacking
your old ones, out of friendship for you, but in a way to render you
great injury.... Mr. Nicholson’s Resolutions will be passed this week,
probably by a majority of one hundred Republicans against fifteen
Republicans and twenty-seven Federalists. When passed, I shall join
Mr. Pinkney of Maryland as your associate for settling our differences
with Great Britain. He will depart on a fortnight’s notice, and will be
authorized to take your place whenever you think yourself obliged to
return.”
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookgate.com