PIC Microcontroller Project Book: For PIC Basic and PIC Basic Pro Compliers / Edition 2

Paperback (Print)
Buy Used
Buy Used from BN.com
(Save 41%)
Item is in good condition but packaging may have signs of shelf wear/aging or torn packaging.
Condition: Used – Good details
Used and New from Other Sellers
Used and New from Other Sellers
from $6.99
Usually ships in 1-2 business days
(Save 80%)
Other sellers (Paperback)
  • All (12) from $6.99   
  • New (5) from $8.00   
  • Used (7) from $6.99   


The PIC microcontroller is enormously popular both in the U.S. and abroad. The first edition of this book was a tremendous success because of that. However, in the 4 years that have passed since the book was first published, the electronics hobbyist market has become more sophisticated. Many users of the PIC are now comfortable shelling out the $250 for the price of the Professional version of the PIC Basic (the regular version sells for $100). This new edition is fully updated and revised to include detailed directions on using both versions of the microcontroller, with no-nonsense recommendations on which is better served in different situations.
Read More Show Less

Editorial Reviews

PIC microcontrollers, low-cost computers-in-a-chip, let electronics designers and hobbyists add intelligence and functions that mimic big computers to any electronic product or project. This guide gives directions for using Microchip's RISC-based chips with up to 8K of memory, starting with simple projects and leading up to sophisticated programming techniques. Assumes no programming experience. Includes a list of suppliers. Iovine has authored several books of projects for holograms, Kirlian photography, and negative-ion generators. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Bound to spur the imagination and inspire plans for using PICs in new products and projects, this book answers the question: What can you do with PIC microcontrollers? Practically anything - from creating "photovore" robots that hunt light for their solar cells to making toasters announce "Your toast is ready!" These easy-to-use, low-cost, computers-in-a-chip let designers and hobbyists add intelligence and responsiveness to any electronic product or project - even faster than comparable Basic Stamps.

Hands-on directions are supplied for putting Microchip's RISC-based chips - with up to 8k of memory - to work. Starting with simple projects and experiments, this book progresses gradually into sophisticated programming techniques. The author John Iovine, our "Amazing Science" columnist, guides enthusiasts into such projects as synthesizing human speech, controlling DC and stepper motors, adding sensing abilities to robots, and building in decision-making neural and "fuzzy logic" functions.
Read More Show Less

Product Details

  • ISBN-13: 9780071437042
  • Publisher: McGraw-Hill Professional Publishing
  • Publication date: 3/29/2004
  • Edition description: REV
  • Edition number: 2
  • Pages: 292
  • Sales rank: 995,120
  • Product dimensions: 7.50 (w) x 9.20 (h) x 0.60 (d)

Meet the Author

Electronics professional John Iovine is the author of several popular TAB titles that explore the frontiers of science. He wrote the cult classic Robots, Androids, and Animatrons. He also wrote such popular books as Homemade Holograms: The Complete Guide to Inexpensive, Do-It-Yourself Holography; Kirlian Photography: A Hands-On Guide; Fantastic Electronics: Build Your Own Negative-Ion Generator and Other Projects; and A Step into Virtual Reality. He is the "Amazing Science" columnist for Poptronics magazine and a regular contributor to Nuts and Volts.

Read More Show Less

Read an Excerpt

Chapter 1: Microcontroller

What Is a Microcontroller?

A microcontroller is an inexpensive single-chip computer. Single-chip computer means that the entire computer system lies within the confines of the integrated circuit chip. The microcontroller on the encapsulated sliver of silicon has features similar to those of our standard personal computer. Primarily, the microcontroller is capable of storing and running a program (its most important feature). The microcontroller contains a CPU (central processing unit), RAM (random-access memory), ROM (read-only memory), 1/O (input/output) lines, serial and parallel ports, timers, and sometimes other built-in peripherals such as A/D (analog-to-digital) and D/A (digital-to-analog) converters.

Why Use a Microcontroller?

Microcontrollers, as stated, are inexpensive computers. The microcontroller's ability to store and run unique programs makes it extremely versatile. For instance, one can program a microcontroller to make decisions (perform functions) based on predetermined situations (1/O-line logic) and selections. The microcontroller's ability to perform math and logic functions allows it to mimic sophisticated logic and electronic circuits.

Other programs can make the microcontroller behave like a neural circuit and/or a fuzzy-logic controller. Microcontrollers are responsible for the "intelligence" in most smart devices on the consumer market.

The Future of Electronics Is Here-It's Microcontrollers

Look in any hobbyist electronics magazine from this country or any other. You will see articles that feature the use of microcontrollers, either directly or embedded in the circuit's design. Becauseof their versatility, microcontrollers add a lot of power, control, and options at little cost. It therefore becomes essential that the electronics engineer or hobbyist learn to program these microcontrollers to maintain a level of competence and to gain the advantages microcontrollers provide in his or her own circuit designs.

If you examine consumer electronics, you will find microcontrollers embedded in just about everything. This is another reason to become familiar with microcontrollers.

Designer Computers

There is a large variety of microcontrollers on the market today. We will focus on a few versatile microcontroller chips called PIC chips (or PICMicro chips) from Microchip Technology.

The PIC Chip

Microchip Technology's series of microcontrollers is called PIC chips. Microchip secured a trademark for the name PIC. Microchip uses PIC to describe its series of PIC microcontrollers. PIC is generally assumed to mean programmable interface controller.

Better Than Any Stamp

Parallax Company sells an easy-to-use series of microcontroller circuits called the Basic Stamp. Parallax's Basic Stamps (BS1 and BS2) use Microchip Technology's PIC microcontrollers. What makes the Stamps so popular and easy to use is that they are programmed using a simplified form of the Basic language. Basic-language programming is easy to learn and use. This was the Stamps' main advantage over other microcontroller systems, which have a much longer learning curve because they force their users and developers to learn a niche assembly language. (A niche assembly language is one that is specific to that company's microcontroller and no one else's.)

The Basic Stamp has become one of the most popular microcontrollers in use today. Again, the Basic Stamp's popularity (this bears repeating) is due to its easy-to-learn and easy-to-use Basic-language programming. The PIC's Basiclanguage system is just as easy to learn and use, and the PIC has enormous benefits that make it better than any Stamp.

The Basic language of the PICBasic compiler that we will use to program the PIC chips is similar to that used in the Basic Stamp series. Programming PIC chips directly has just become as easy as programming Stamps. Now you can enjoy the same easy language the Basic Stamp offers, plus two more very important benefits.

Benefit one: faster speed

Our programmed PIC chips will run their program much faster. If we enter the identical Basic program into a Basic Stamp and into a PIC chip, the programmed PIC chip will run 20 to 100 times faster (depending upon the instructions used) than the Basic Stamp. Here's why.

The BS1 and BS2 Basic Stamp systems use a serial EEPROM memory connected to the PIC chip to store their programs. The basic commands in the program are stored as basic tokens. Basic tokens are like a shorthand for basic commands. When running the program, the Basic Stamp reads each instruction (token and data/address) over the serial line from the external EEPROM memory, interprets the token (converts token to the ML equivalent the PIC can understand), performs the instruction, reads the next instruction, and so on. Each and every instruction goes through these serial load, read, interpret, then perform steps as the program runs. The serial interface reading routine eats up gobs of the microcontroller's CPU time.

In contrast to this operation, when a PIC chip is programmed using the Basic compiler, the Basic program is first converted to a PIC machinelanguage (hex file) program. The ML program is then uploaded into the PIC chip. Being the native language of the PIC, this machine-language (ML) code does not need to be stored as tokens and interpreted as it runs because the program is written in the PIC chip's native language.

When the PIC chip runs the program, it reads the ML program instructions directly from its on-board memory and performs the instruction. There is no serial interface to an external EEPROM to eat up CPU time. The ML instructions are read in parallel, not bit by bit as in the serial interface. The ML instructions read directly without any basic-token-to-ML-equivalent conversion required. This enables programmed PIC chips to run their code 20 to 100 times faster than the same Basic program code in a Basic Stamp.

Benefit two: much lower cost

The next factor is cost. Using PIC chips directly will save you 75 percent of the cost of a comparable Basic Stamp. The retail price for the BS1, which has 256 bytes of programmable memory, is $34.95. The retail price for the BS2, which has 2K of programmable memory, is $49.95. The 16F84 PIC microcontroller featured throughout this book is more closely comparable to the BS2 Stamp. The 16F84 PIC chip we are using has 1K of programmable memory.

The retail cost of the 16F84 PIC chip is $6.95. To this, add the cost of a timing crystal, a few capacitors, a few resistors, and a 7805 voltage regulator to make a circuit equivalent to that of the Stamp. These components increase the total cost to about $10.00-still well below one-quarter the cost (75 percent savings) currently quoted for the BS2.

And this $10.00 cost for the PIC may be cut substantially in some situations...

Read More Show Less

Table of Contents

Ch. 1 Microcontroller
Ch. 2 Software Installation (Compiler and Programme)
Ch. 3 PIC 16F84 Microcontroller
Ch. 4 Reading I/O Lines
Ch. 5 PICBasic Language Reference
Ch. 6 Characteristics of the 16F84 Microcontroller
Ch. 7 Speech Synthesizer
Ch. 8 Serial Communication and Creating I/O Lines
Ch. 9 LCD Alphanumeric Display
Ch. 10 Sensors: Resistive, Neural, and Fuzzy Logic
Ch. 11 DC Motor Control
Ch. 12 Stepper Motor Control
Ch. 13 Servomotor Control
Ch. 14 Analog-to-Digital (A/D) Converters
Ch. 15 Controlling AC Appliances
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)