Interfacing PIC Microcontrollers: Embedded Design by Interactive Simulation

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $51.75
Usually ships in 1-2 business days
(Save 10%)
Other sellers (Paperback)
  • All (2) from $51.75   
  • Used (2) from $51.75   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$51.75
Seller since 2010

Feedback rating:

(180)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

Good
0750680288 USED BOOK in good condition| No supplements| Normal wear to cover, edges, spine, corners, and pages | Writing / highlighting | Inventory stickers | Satisfaction ... guaranteed! Read more Show Less

Ships from: Punta Gorda, FL

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$154.97
Seller since 2010

Feedback rating:

(6)

Condition: Very Good
Very good 1 volume, please be aware of language, air mail shipment from Germany within 2-6 weeks, we deliver to any country-please ask us to enable delivery to your country! ... *****PLEASE NOTE: This item is shipping from an authorized seller in Europe. In the event that a return is necessary, you will be able to return your item within the US. To learn more about our European sellers and policies see the BookQuest FAQ section***** Read more Show Less

Ships from: Berlin, Germany

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by

Overview

Interfacing PIC Microcontrollers, 2nd Edition is a great introductory text for those starting out in this field and as a source reference for more experienced engineers. Martin Bates has drawn upon 20 years of experience of teaching microprocessor systems to produce a book containing an excellent balance of theory and practice with numerous working examples throughout.

It provides comprehensive coverage of basic microcontroller system interfacing using the latest interactive software, Proteus VSM, which allows real-time simulation of microcontroller based designs and supports the development of new applications from initial concept to final testing and deployment.

  • Comprehensive introduction to interfacing 8-bit PIC microcontrollers
  • Designs updated for current software versions MPLAB v8 & Proteus VSM v8
  • Additional applications in wireless communications, intelligent sensors and more
Read More Show Less

Editorial Reviews

From the Publisher
"…He revises, updates, and expands his tutorial on using the microcontroller; it can support learning at college, at work, or at home…It is a sequel to his PIC Microcontrollers: An Introduction to Microelectronics. He explores the basic techniques for connecting the PIC to simple input and output devices such as switches, sensors, display, and motors. He also demonstrates methods that allow the PIC to communicate data with other devices, including intelligent sensors."—ProtoView.com, February 2014
Read More Show Less

Product Details

  • ISBN-13: 9780750680288
  • Publisher: Elsevier Science
  • Publication date: 10/2/2006
  • Edition description: New Edition
  • Pages: 312
  • Product dimensions: 7.40 (w) x 9.50 (h) x 0.70 (d)

Meet the Author

Martin Bates is one of the leading authors specializing in introductory level texts on PIC microcontrollers for the academic, professional and hobby markets, with 20 years’ experience of teaching microprocessor systems.

Read More Show Less

Read an Excerpt

Interfacing PIC Microcontrollers

Embedded Design by Interactive Simulation
By Martin Bates

Newnes

Copyright © 2006 Martin Bates
All right reserved.

ISBN: 978-0-08-046387-2


Chapter One

PIC Hardware

The microcontroller is simply a computer on a chip. It is one of the most important developments in electronics since the invention of the microprocessor itself. It is essential for the operation of devices such as mobile phones, DVD players, video cameras, and most self-contained electronic systems. The small LCD screen is a good clue to the presence of an MCU (Microcontroller Unit) – it needs a programmed device to control it. Working sometimes with other chips, but often on its own, the MCU provides the key element in the vast range of small, programmed devices which are now commonplace.

Although small, microcontrollers are complex, and we have to look carefully at the way the hardware and software (control program) work together to understand the processes at work. This book will show how to connect the popular PIC range of microcontrollers to the outside world, and put them to work. To keep things simple, we will concentrate on just one device, the PIC 16F877, which has a good range of features and allows most of the essential techniques to be explained. It has a set of serial ports built in, which are used to transfer data to and from other devices, as well as analogue inputs, which allow measurement of inputs such as temperature. All standard types of microcontrollers work in a similar way, so analysis of one will make it possible to understand all the others.

The PIC 16F877 is also a good choice for learning about micro-controllers, because the programming language is relatively simple, as compared with a microprocessor such as the Intel Pentium™, which is used in the PC. This has a powerful, but complex, instruction set to support advanced multimedia applications. The supporting documentation for the PIC MCU is well designed, and a development system, for writing and testing programs, can be downloaded free from the Microchip website (microchip.com).

Processor System

The microcontroller contains the same main elements as any computer system:

• Processor

• Memory

• Input/Output

In a PC, these are provided as separate chips, linked together via bus connections on a printed circuit board, but under the control of the microprocessor (CPU). A bus is a set of lines which carry data in parallel form which are shared by the peripheral devices. The system can be designed to suit a particular application, with the type of CPU, size of memory and selection of input/output (I/O) devices tailored to the system requirements.

In the microcontroller, all these elements are on one chip. This means that the MCU for a particular application must be chosen from the available range to suit the requirements. In any given circuit, the microcontroller also tends to have a single dedicated function (in contrast to the PC); this type of system is described as an embedded application (Figure 1.1).

Processor

In a microprocessor system or a microcontroller, a single processor block is in charge of all input, output, calculations and control. This cannot operate without a program, which is a list of instructions that is held in memory. The program consists of a sequence of binary codes that are fetched from memory by the CPU in sequence, and executed (Figure 1.2).

The instructions are stored in numbered memory locations, and copied to an instruction register in the CPU via the data bus. Here, the instruction controls the selection of the required operation within the control unit of the processor. The program codes are located in memory by outputting the address of the instruction on an address bus. The address is generated in the program counter, a register that starts at zero and is incremented or modified during each instruction cycle. The busses are parallel connections which transfer the address or data word in one operation. A set of control lines from the CPU are also needed to assist with this process; these control lines are set up according to the requirements of the current instruction.

Decoding the instruction is a hardware process, using a block of logic gates to set up the control lines of the processor unit, and fetching the instruction operands. The operands are data to be operated on (or information about where to find it) which follows most instructions. Typically, a calculation or logical operation is carried out on the operands, and a result stored back in memory, or an I/O action set up. Each complete instruction may be 1, 2 or more bytes long, which includes the operation (instruction) code (op-code) itself and the operand/s (1 byte = 8 bits).

Thus, a list of instructions in memory is executed in turn to carry out the required process. In a word processor, for example, keystrokes are read in via the keyboard port, stored as character codes, and sent to a screen output for display. In a game, input from the switches on the control pad are processed and used to modify the screen. In this case, speed of the system is a critical factor.

Memory

There are two types of memory: volatile and non-volatile. Volatile memory loses its data when switched off, but can be written by the CPU to store current data; this is RAM (Random Access Memory). ROM (Read Only Memory) is non-volatile, and retains its data when switched off.

In a PC, a small ROM is used to get the system started when it is switched on; it contains the BIOS (Basic Input Output System) program. However, the main Operating System (OS), for example, Windows™ and application program (e.g. Word) have to be loaded into RAM from Hard Disk Drive (HDD), which takes some time, as you may have noticed!

So why not put the OS in ROM, where it would be instantly available? Well, RAM is faster, cheaper and more compact, and the OS can be changed or upgraded if required. In addition, an OS such as Windows is very large, and some elements are only loaded into RAM as needed. In addition, numerous applications can be stored on disk, and loaded only as required.

The ideal memory is non-volatile, read and write, fast, large and cheap. Unfortunately, it does not exist! Therefore, we have a range of memory technologies as shown in Table 1.1, which provide different advantages, which may all be used with a standard PC. The main trade-off is cost, size and speed of access. Flash ROM, as used in memory sticks and MP3 players, is closest to the ideal, having the advantages of being non-volatile and rewritable. This is why it is used as program memory in microcontrollers which need to be reprogrammed, such as the PIC 16F877.

Input and Output

Without some means of getting information and signals in and out, a data processing or digital control system would not be very useful. Ports are based on a data register, and set of control registers, which pass the data in and out in a controlled manner, often according to a standard protocol (method of communication).

There are two main types of port: parallel and serial. In a parallel port, the data is usually transferred in and out 8 bits at a time, while in the serial port it is transmitted 1 bit at a time on a single line. Potentially, the parallel port is faster, but needs more pins; on the other hand, the port hardware and driver software are simpler, because the serial port must organise the data in groups of bits, usually 1 byte at a time, or in packets, as in a network (Figure 1.3).

Taking printers as an example, the old standard is a parallel port (Centronics), which provides data to the printer 1 byte (8 bits) at a time via a multipin connector. The new standard, USB (Universal Serial Bus) is a serial data system, sending only 1 bit at a time. Potentially, the parallel connection is 8 times faster, but USB operates at up to 480 megabits (Mb) per second, and the printer is slow anyway, so there is no problem. One advantage of using USB is that it provides a simple, robust connector and this outweighs the fact that the interface protocol (driver software) is relatively complex, because this is hidden from the user. USB also provides power to the peripheral, if required, and the printer can be daisy-chained with other devices. USB also automatically configures itself for different peripherals, such as scanners and cameras.

In the parallel port operating in output mode, the data byte is loaded from the internal data bus under the control of a read/write signal from the CPU. The data can then be seen on the output pins by the peripheral; for testing, a logic probe, logic analyser or just a simple LED indicator can be used. In input mode, data presented at the input pins from a set of switches or other data source are latched into the register when the port is read, and is then available on the data bus for collection by the CPU. One of the functions of the port is to separate the internal data bus from the external hardware, and the other is to temporarily store the data. The data can then be transferred to memory, or otherwise processed, as determined by the CPU program.

The serial port register also loads data from the internal bus in parallel, but then sends it out 1 bit at a time, operating as a shift register. If an asynchronous serial format is used, such as RS232 (COM ports on old PCs), start and stop bits are added so that bytes can be separated at the receiving end. An error check bit is also available, to allow the receiver to detect corrupt data. In receive mode, the register waits for a start bit, and then shifts in the data at the same speed as it is sent. This means the clock rate for the send and receive port must be the same. The USART (Universal Synchronous/Asynchronous Receive/Transmit) protocol will be described in more detail later.

A USB or network port is more sophisticated, and arranges the data bytes in packets of, say, 1k bytes, which are sent in a form which is self-clocking; that is, there is a transition within each bit (1 or 0), so each can be picked up individually. An error-correction code follows the data, which allows mistakes to be corrected, rather than just be detected. This reduces the need for retransmission of incorrectly received data, as required by simple error detection. Addressing information preceding the data allows multiple receivers to be used.

The PIC 16F877, in common with most current MCUs, does not have USB or network interfaces built in, so we can avoid detailed consideration of these complex protocols. It does, nevertheless, have a good selection of other interfaces, which will be discussed in detail and sample programs provided.

PIC 16F877 Architecture

Microcontrollers contain all the components required for a processor system in one chip: a CPU, memory and I/O. A complete system can therefore be built using one MCU chip and a few I/O devices such as a keypad, display and other interfacing circuits. We will now see how this is done in practice in our typical microcontroller.

PIC 16F877 Pin Out

Let us first consider the pins that are seen on the IC package, and we can then discover how they relate the internal architecture. The chip can be obtained in different packages, such as conventional 40-pin DIP (Dual In-Line Package), square surface mount or socket format. The DIP version is recommended for prototyping, and is shown in Figure 1.4.

Most of the pins are for input and output, and arranged as 5 ports: A(5), B(8), C(8), D(8) and E(3), giving a total of 32 I/O pins. These can all operate as simple digital I/O pins, but most have more than one function, and the mode of operation of each is selected by initialising various control registers within the chip. Note, in particular, that Ports A and E become ANALOGUE INPUTS by default (on power up or reset), so they have to set up for digital I/O if required.

Port B is used for downloading the program to the chip flash ROM (RB6 and RB7), and RB0 and RB4–RB7 can generate an interrupt. Port C gives access to timers and serial ports, while Port D can be used as a slave port, with Port E providing the control pins for this function. All these options will be explained in detail later.

The chip has two pairs of power pins (VDD = 5 V nominal and Vss = 0 V), and either pair can be used. The chip can actually work down to about 2 V supply, for battery and power-saving operation. A low-frequency clock circuit using only a capacitor and resistor to set the frequency can be connected to CLKIN, or a crystal oscillator circuit can be connected across CLKIN and CLKOUT. MCLR is the reset input; when cleared to 0, the MCU stops, and restarts when MCLR = 1. This input must be tied high allowing the chip to run if an external reset circuit is not connected, but it is usually a good idea to incorporate a manual reset button in all but the most trivial applications.

(Continues...)



Excerpted from Interfacing PIC Microcontrollers by Martin Bates Copyright © 2006 by Martin Bates. Excerpted by permission of Newnes. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

  1. PIC Hardware
  2. PIC Programming
  3. PIC Design
  4. Input and Output
  5. Data Processing
  6. Analog Interfacing
  7. Power Outputs
  8. Serial Communication
  9. Input Sensors
  10. System design
Read More Show Less

Customer Reviews

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

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

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

Reminder:

  • - 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)