Vous voulez voir cette page en français ? Cliquez ici.


or
Sign in to turn on 1-Click ordering.
More Buying Choices
Have one to sell? Sell yours here
Embedded Design with the PIC18F452
 
See larger image
 

Embedded Design with the PIC18F452 [Hardcover]

John B. Peatman
3.8 out of 5 stars  See all reviews (5 customer reviews)
List Price: CDN$ 137.55
Price: CDN$ 100.95 & this item ships for FREE with Super Saver Shipping. Details
You Save: CDN$ 36.60 (27%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.ca. Gift-wrap available.
Only 1 left in stock--order soon (more on the way).
Want it delivered Tuesday, May 29? Choose One-Day Shipping at checkout.

Product Details


Product Description

Book Description

This book is developed around Microchip's latest family of parts, the PIC18FXXX family. It focuses on the PIC18F452, a new part brought to market in May 2002. It is intended that the reader will find a smooth path to the creative process of writing enhanced application code. This book attempts to organize and unify the development of these three capabilities: to understand and use components, to exploit powerful algorithmic processes, and to break down the complexity of an instrument or device so as to meet its specifications. The book is dedicated toward the development of creative design capability. Throughout this book, the approach taken is to introduce a template of assembly language code that encompasses a set of features of the PIC18F452 plus its interactions with some of the I/O devices resident on a small 4"x4" development board. For electrical engineers who work with the PIC18FXXX family.

From the Inside Flap

The evolution of microcontrollers (i.e., single-chip microcomputers) has been driven by two strong trends. One trend is the demand for a low-cost means of putting intelligence into a product. When a product is produced in quantities of millions, a small savings in component cost will drive component selection decisions. Another trend is the demand for a programmable solution when an application has severe timing constraints, such as those in automobile engine control. This demand has led to ever faster, more sophisticated microcontroller architectures. Microchip Technology has evolved its product line of PIC microcontrollers from simple, low-cost devices. Subsequent generations of PIC microcontrollers have included enhancements to meet the needs of an increasing circle of applications. At the same time, Microchip has never lost sight of the value of introducing new technology at the lowest possible cost and thereby "buying" market share. As pointed out in Chapter 1 of this text, Microchip has followed this strategy to the point where it is now the number two producer of eight-bit microcontrollers in the world, with a market share that continues to rise each year. Because eight-bit microcontrollers span the needs of most applications, "eight-bitters" dominate the world of microcontrollers.

This book is developed around Microchip's latest family of parts, the PIC I8FXXX family. It focuses on the PIC 18F452, a new part brought to market in May 2002. It is a 40-pin microcontroller upgrade of their earlier PIC 16C74 and PIC 16F877 microcontrollers. This upgrade will be familiar to users of those parts, but with myriad enhancements. Virtually all of the quirks that characterized earlier PIC microcontroller parts have been eliminated. The flash program memory of the PIC 1817452 microcontroller makes low-cost development possible. Not only is the part inexpensive (less than $10 in single quantities), but it is supported by Microchip's free assembler and by a free Qwikl3ug monitor program. QwikBug, once programmed into the chip, supports the downloading of successive iterations of a user program and supports the ability to debug the user program with the help of running to a breakpoint, monitoring/changing watch variables, and single-stepping.

To provide a "learning by doing" environment, a QwikFlash development board is included inside the back cover of this first printing of the book. A photograph of the populated board is shown in Figure 4-1. Readers not interested in using this board may wish to know that the board is included, gratis, courtesy of a friend of the author. Parts for populating the board can be purchased under a special arrangement with the DigiKey Corporation. Appendix Al includes the Digi-Key parts list as well as construction hints, intended both for the novice who has never soldered before and for the experienced student, professional, and hobbyist. Alternatively, a populated board can be purchased from MICRODESIGNS, Inc.

Throughout this book, the approach taken is to introduce a template of assembly language code that encompasses a set of features of the PIC18F452 plus its interactions with some of the I/O devices resident on the QwikFlash board. In this way, it is intended that the reader will find a smooth path to the creative process of writing enhanced application code. There is no end to the variety of such enhancements, many of which are suggested in the end-of-chapter problems. Others are listed in Appendix A10 as a set of suggested lab projects that might accompany the first offering of a college or university course organized around this book. Still other project enhancements are suggested by the presence of the many features of the microcontroller and by the versatility of the QwikFlash board's I/O devices themselves.

Many years ago, Skip Addison impressed me with the clarity that his structured assembler could bring to the writing of code. Its implementation of nested IF . . . ELSE... ENDIF, WHILE . . . ENDWHILE, and REPEAT . . . UNTIL constructs gave assembly language the clean control flow normally associated with a compiled language such as C. At this time, Jessica Meremonte has prepared a free structured assembly preprocessor that, together with Microchip's free (and excellent) assembler, does this same thing for code writing with the PIC18F452 microcontroller. Introduced in Chapter 6, the use of Jessica's sasm utility acts like a one-step assembler. It enhances the code writing process, and code understandability, for the remaining 14 chapters of the book.

To utilize a microcontroller effectively, a designer should develop at least three capabilities, each of which is addressed in this book. First, he or she must understand available components. This begins with the microcontroller itself, with its CPU register structure, its instruction set, its addressing modes, and its on-chip resources. It extends to user I/O devices such as keypads and displays and sensing/ control devices such as temperature transducers and stepper motor actuators. Using interrupt control, a microcontroller can juggle many real-time activities simultaneously. To achieve this without error, the designer must understand how the microcontroller handles interrupts and the timing issues related to them.

Second, the designer must thoroughly understand the algorithmic processes required by each aspect of the design and be able to translate them into the language of the microcontroller. For example, the design of an antilock brake system for an automobile involves an understanding of both the brake system dynamics and the implementation of a suitable control algorithm.

Third, the designer must understand how the extensive requirements of an instrument or device can be broken down into manageable parts. Almost any project can be likened to the process of jumping from boulder to boulder to cross a stream. Each boulder may represent the design ideas needed to understand and use a device such as a liquid crystal display. But in addition to studying boulders, the designer must pay attention to how streams are crossed. Through examples, both with the template programs and with complete designs available on the author's web site (e.g., the source code for the QwikFlash instrument described in Section 4.3), the reader can view the structure of several projects.

This book attempts to organize and unify the development of these three capabilities: to understand and use components, to exploit powerful algorithmic processes, and to break down the complexity of an instrument or device so as to meet its specifications.

ABOUT THE BOOK

This book will typically be used in a one-semester course at the senior level. Alternatively, it might be used at the junior level if it is deemed worthwhile to trade the increased engineering experience of seniors for the opportunity to follow this course with other design-oriented courses and individual project activities. Although the context of the book is electrical, each component is sufficiently explained to permit the book to be used in a variety of curricula as an introduction to design using a microcontroller. The incentive to so use the book lies in the diverse applications made possible by the availability of a "controller on a chip."

There has been an attempt to make many parts of the book self-contained. A reader might scan Chapter 1 to gain the perspective of Steve Sanghi, CEO and President of Microchip Technology. Chapters 2 and 3 describe the PIC18F452's CPU structure, instructions, and addressing modes. The brief Chapter 4 describes the features of the QwikFlash board (i.e., the built-up version of the bare board located on the inside back cover of the book). This description includes one application of the board as a QwikFlash instrument to measure frequencies and time intervals with uncanny accuracy, using a free program available from the author's web site.

Chapters 5 and 6 present the first template of code and a discussion of development alternatives. This latter discussion is augmented in the appendices. Appendix sections A1.2 and A4.3 describe Microchip's ICD2 in in-circuit debugger. Appendix A4 describes the free QwikBug on-chip monitor program and what it takes to program it into a chip. Appendix A3 describes how the free sasm structured assembler utility can be used with or without the support of Microchip's MPLAB facility. Appendix section A5.2 describes the free QwikAddress utility and the help it provides in conjunction with the sasm utility.

Chapter 7 develops the use of the liquid-crystal display built into the QwikFlash board. A second template of code is presented, serving as a stepping stone for subsequent project work. Chapters 8 and 12 augment the discussion of user I/O available on the board. Chapter 8 discusses a widely used input device, the rotary pulse generator (RPG). Chapter 12 develops what amounts to an allocation scheme play and the RPG, for user input.

Chapter 9 discusses the timing and the critical region issues associated with interrupts. It describes the high- and low-priority mechanisms built into the chip to field interrupts and explains how to allocate interrupt sources between the two so as to be most effective in meeting the timing requirements of and application.

The remaining chapters of the book can be "mixed and matched" to meet the needs of a course and its sequencing of lab projects. Chapters 13 and 16 explain in detail how to use the PIC 18F452's superb timers for capturing the timing of input events and for controlling the timing for output events. Chapters l describe the nuances of using the chip's analog and digital input pins. Chapter 14 explains how to use any of Microchip's library of 36 integer subroutines for dealing with the multiplication and division of multiple-byte unsigned and signed numbers. It also explains how to use their eight floating-point subroutines and the role of these subroutines in retaining the precision of a computation. Chapters 15 and 17 delve into two approaches for expanding the number of I/O pins available as well as two convenient means for enhancing the peripheral capabilities of the chip beyond those peripherals already built chip. Chapter 18 discusses the use of the UART built into the chip while Chapter 19 looks at how a low-end PIC microcontroller can be used as a smart peripheral, connecting to the PIC 1817452 through one of its UART pins. Chapter 20 discusses a variety of disparate but significant features of the chip, including the use of its non-volatile data EEPROM, its watchdog timer and brownout reset circuits, and how it can be operated to achieve an exceedingly low battery supply current.

The last two template programs, P3 and P4, are recast as C programs written by Mike Chow and included in Appendix A7. Each one is written for both Microchip Technology's C compiler and Hi-Tech Software's C compiler, two high-quality C compilers. A class that makes the switch from assembly coding can benefit from the use of the P3 template, cast in C. As a template for subsequent work, it encompasses many issues that will arise as further code is written. The P4 template illustrates how to handle interrupts.

This book is directed toward a specific goal of engineering studies—the development of creative capability. Given a powerful, low-cost microcontroller chip, a low-cost development board, and the development tools needed to develop and debug program code, we are able to focus the design process on the microcontroller chip itself and a variety of I/O devices, thereby giving zest to the process of learning. While some of these I/O devices are available on the QwikFlash board itself, the laboratory for a college or university course can make use of a second QwikProto board to expand the variety of 1/O resources easily, as described in Appendix A2 and illustrated, by example, in the photograph of Figure A2-5. Other I/O possibilities are described there and in Appendix section A 10.2.To help readers take advantage of the opportunities for developing microcontroller design capability, most chapters close with an assortment of problems, many having a design flavor. A suggested course calendar is included at the beginning of Appendix A10 along with 10 "starter" lab projects.


Tag this product

 (What's this?)
Think of a tag as a keyword or label you consider is strongly related to this product.
Tags will help all customers organize and find favorite items.
Your tags: Add your first tag
 

 

Customer Reviews

5 Reviews
5 star:
 (3)
4 star:    (0)
3 star:
 (1)
2 star:    (0)
1 star:
 (1)
 
 
 
 
 
Average Customer Review
3.8 out of 5 stars (5 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most helpful customer reviews

5.0 out of 5 stars Buy This Book !, Mar 24 2003
By 
Christopher J. Smith (Westville, IN United States) - See all my reviews
(REAL NAME)   
Ce commentaire est de: Embedded Design with the PIC18F452 (Hardcover)
Writing a book as complete and well-thought-out as this one takes a Herculean effort, which is why most technical books are lacking in detail. Somehow, John Peatman has pulled it off, producing a book that is complete and detailed in every way. He completely describes the new, juicy, full-featured PIC18F452 and does it well. Two years ago, I wrote a disparaging review of Peatman's "Design With Pic Microcontrollers," feeling it was sketchy and lacking examples. Now, in "Embedded Design," he has produced a clear, well-written and complete package. Each chapter has a nice set of problems at the end, for those who will use it as a text. Appendices describe an inexpensive demo board and free debugging software. He shows you what to buy to set up a development lab and how to use it. .... If you want to buy one book that contains everything you need to learn about PIC chips, buy this one!
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


5.0 out of 5 stars Excellent Book - Great follow-on first book, Jan 2 2003
By 
Dave (Albuquerque, NM) - See all my reviews
Ce commentaire est de: Embedded Design with the PIC18F452 (Hardcover)
John's book is a great follow on to his original book, "Design with PIC Microcontrollers. The book is not a cut and paste solution (As are two other good books "Easy PIC'n" and "PIC'n Up The Pace") and is intended to teach the student how to best use the architecture. The intent of the book is to give the student enough theory to use the PIC18F452 and understand the design philosophy of the architecture. The book is a great compliment to the Microchip datasheet service as a "user's guide". Great examples of how the 18F452 architecture can be best utilized, well organized diagrams (Which, by the way do not require "flicking back and forth" any more that a typical technical book I've read ). The subject material covers all of the highlights of the PIC18F452, giving examples for typical usages of LCD displays, A/D, Interrupts, I/O pin considerations, timers, math subroutines, I2C/SMBus usage, UART, etc. There are supporting code template designed to suggest possible code organization. The book develops a very useful utility (SASM) to preprocess PIC assembly in an attempt to make assembly language more structured. The utility IS NOT required and the rest of the book may be read without using the utility. I had no problem obtaining the components for the included circuit board (All required parts can be purchased as a kit from Digi-Key at a discount) and found it very comparable to Microchip's own demo boards.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


3.0 out of 5 stars Useful information, poor layout., Oct 14 2002
By 
Colin D. Barnard (Australia) - See all my reviews
(REAL NAME)   
Ce commentaire est de: Embedded Design with the PIC18F452 (Hardcover)
If having technical diagrams over the page to the corresponding text annoys you, then be prepared to be annoyed! The book doesn't get going really until chapter 3, however I found that having the technical figures (in most cases) not on the page or adjoining page, but having to flick back and forth a distraction to my concentration. The diagrams while helpful are a little confusing with the way in which they are layed out.

In some places after describing a method in addressing registers, the example uses an alternative - fine, if in the context of, there is more than one way to achieve this, but this is patently not the context here.

The book seems to be really designed to be part of a classroom tutorial and discussion.

Be ready to put in some extra concentration if your buying this book without resource to other literature.

On the whole the book is technically useful, the hardcover pleasant, but the placing of the diagrams really let the book down.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
Want to see more reviews on this item?
 Go to Amazon.com to see all 10 reviews  3.6 out of 5 stars 
 
 
Most recent customer reviews



Only search this product's reviews



Listmania!

Create a Listmania! list

Look for similar items by category


Look for similar items by subject


Feedback


Amazon.ca Privacy Statement Amazon.ca Shipping Information Amazon.ca Returns & Exchanges