COVID-19 Update: We are currently shipping orders daily. However, due to transit disruptions in some geographies, deliveries may be delayed. To provide all customers with timely access to content, we are offering 50% off Science and Technology Print & eBook bundle options. Terms & conditions.
PIC in Practice - 2nd Edition - ISBN: 9780750668262, 9780080464985

PIC in Practice

2nd Edition

A Project-based Approach

Author: David W Smith
eBook ISBN: 9780080464985
Paperback ISBN: 9780750668262
Imprint: Newnes
Published Date: 16th January 2006
Page Count: 320
Sales tax will be calculated at check-out Price includes VAT/GST
Price includes VAT/GST

Institutional Subscription

Secure Checkout

Personal information is secured with SSL technology.

Free Shipping

Free global shipping
No minimum order.


PIC in Practice is a graded course based around the practical use of the PIC microcontroller through project work. Principles are introduced gradually, through hands-on experience, enabling students to develop their understanding at their own pace.

Dave Smith has based the book on his popular short courses on the PIC for professionals, students and teachers at Manchester Metropolitan University. The result is a graded text, formulated around practical exercises, which truly guides the reader from square one.

The book can be used at a variety of levels and the carefully graded projects make it ideal for colleges, schools and universities. Newcomers to the PIC will find it a painless introduction, whilst electronics hobbyists will enjoy the practical nature of this first course in microcontrollers.

PIC in Practice introduces applications using the popular 16F84 device as well as the 16F627, 16F877, 12C508, 12C629 and 12C675. In this new edition excellent coverage is given to the 16F818, with additional information on writing and documenting software.

Key Features

  • Gentle introduction to using PICs for electronic applications
  • Principles and programming introduced through graded projects
  • Thoroughly up-to-date with new chapters on the 16F818 and writing and documenting programs


Engineering undergraduates taking courses on microcontrollers or embedded systems. Electronic hobbyists

Table of Contents


1. Introduction to the PIC microcontroller

The aim of the book

Program memory

Microcontroller clock

The microcontroller system

Types of microcontroller

Microcontroller specification

Using the microcontroller

1 Microcontroller hardware

2 Programming the microcontroller

2. Programming the 16F84 microcontroller

Instructions used in this chapter:

Microcontroller inputs and outputs (I/O)

Timing with the microcontroller

Programming the microcontroller

Entering data

The Header for the 16F84, HEADER84.ASM

Program example

Saving and assembling the code

PICSTART PLUS programmer

Programming flowchart

Problem: flashing two LEDs

Solution to the problem, flashing two LEDs

3. Introductory projects



Code for SOS circuit

Flashing 8 LEDs

Chasing 8 LEDs

Traffic lights

More than 8 outputs

4. Headers, porting code – which micro

Factors affecting the choice of the microcontroller

Choosing the microcontroller


5. Using inputs

Switch flowchart

Program development

Scanning (using multiple inputs)

Switch scanning

Control application – a hot air blower

6. Understanding the headers

The 16F84

16F84 memory map

The 16F818

7. Keypad scanning

Programming example for the keypad

8. Program examples

Counting events

Look up table

7-Segment display

Numbers larger than 255

Long time intervals

One hour delay

9. The 16C54 microcontroller

Header for the 16C54

16C54 memory map

10. Alpha numeric displays

Display pin identification

Configuring the display

Writing to the display

Program example

Program operation

Display configuration

Writing to the display

Displaying a number

11. Analogue to digital conversion

Making an A/D reading

Configuring the A/D device

Analogue header for the 16F818

A/D Conversion – example, a temperature sensitive switch

Program code

Another example – a voltage indicator

12. Radio transmitters and receivers

How does it work?

Measuring the received pulse width

13. EEPROM data memory

Example using the EEPROM

14. Interrupts

New instructions used in this chapter:

Interrupt sources

Interrupt control register

Program using an interrupt

15. The 12 series 8 pin microcontroller

Pin diagram of the 12C508/509

Pin diagram of the 12F629 and 12F675

Features of these 12 series

The memory maps of the 12C508 and 12F629/675

Oscillator calibration


Delays with the 12 series

Header for 12C508/9

Program application for 12C508

Program application using the 12F629/675

16. The 16F87X microcontroller

16F87X family specification

16F87X memory map

The 16F872 microcontroller

The 16F872 header

16F872 Application – a greenhouse control

Programming the 16F872 microcontroller using PICSTART PLUS

Reconfiguring the 16F872 header

17. The 16F62X microcontroller

16F62X oscillator modes

16F62X and 16F84 Pinouts

16F62X Port configuration

16F62X Memory map

The 16F62X headers


A 16F627 application – flashing an LED on and off

The 16F627 LED flasher code

Configuration settings for the 16F627

Other features of the 16F62X

18. Projects

Project 1 Electronic dice

Project 2 Reaction timer

Project 3 Burglar alarm

Fault finding

Development kits

19. Instruction set, files and registers

The PIC microcontroller instruction set


Instruction set summary

APPENDIX A. Microcontroller data

APPENDIX B. Electrical characteristics

APPENDIX C. Decimal, binary and hexadecimal numbers

APPENDIX D. Useful contacts



No. of pages:
© Newnes 2006
16th January 2006
eBook ISBN:
Paperback ISBN:

About the Author

David W Smith

David Smith has had 30 years experience in the Electronics Industry. Before arriving at MMU he worked as an Electronics Design Engineer for ICL and Marconi. His teaching interests are focused on enabling Design and Technology students to implement microcontroller designs into their projects.

Affiliations and Expertise

Senior Lecturer, Technology Centre, Manchester Metropolitan University, UK

Ratings and Reviews