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.
Designing Embedded Systems with PIC Microcontrollers - 1st Edition - ISBN: 9780750667555, 9780080468143

Designing Embedded Systems with PIC Microcontrollers

1st Edition

Principles and Applications

0.0 star rating Write a review
Author: Tim Wilmshurst
Paperback ISBN: 9780750667555
eBook ISBN: 9780080468143
Imprint: Newnes
Published Date: 24th October 2006
Page Count: 584
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.


Embedded Systems with PIC Microcontrollers: Principles and Applications is a hands-on introduction to the principles and practice of embedded system design using the PIC microcontroller. Packed with helpful examples and illustrations, the book provides an in-depth treatment of microcontroller design as well as programming in both assembly language and C, along with advanced topics such as techniques of connectivity and networking and real-time operating systems. In this one book students get all they need to know to be highly proficient at embedded systems design.

This text combines embedded systems principles with applications, using the16F84A, 16F873A and the 18F242 PIC microcontrollers. Students learn how to apply the principles using a multitude of sample designs and design ideas, including a robot in the form of an autonomous guide vehicle. Coverage between software and hardware is fully balanced, with full presentation given to microcontroller design and software programming, using both assembler and C. The book is accompanied by a companion website containing copies of all programs and software tools used in the text and a ‘student’ version of the C compiler.

This textbook will be ideal for introductory courses and lab-based courses on embedded systems, microprocessors using the PIC microcontroller, as well as more advanced courses which use the 18F series and teach C programming in an embedded environment. Engineers in industry and informed hobbyists will also find this book a valuable resource when designing and implementing both simple and sophisticated embedded systems using the PIC microcontroller.

Key Features

*Gain the knowledge and skills required for developing today's embedded systems, through use of the PIC microcontroller.

*Explore in detail the 16F84A, 16F873A and 18F242 microcontrollers as examples of the wider PIC family.

*Learn how to program in Assembler and C.

*Work through sample designs and design ideas, including a robot in the form of an autonomous guided vehicle.

*Accompanied by a CD-ROM containing copies of all programs and software tools used in the text and a ‘student' version of the C complier.


Professional engineers developing embedded systems, informed hobbyists and engineering students.

Table of Contents

Section 1 Getting started with embedded systems

  1. Tiny computers, hidden control
  2. 1 The main idea-embedded systems in today's world
  3. 2 Some example embedded systems
  4. 3 Some computer essentials
  5. 4 Microprocessors and microcontrollers
  6. 5 Microchip and the PIC microcontroller
  7. 6 An introduction to PIC microcontrollers using the 12 series
  8. 7 What others do- a Freescale microcontroller Summary References

Section 2 Minimum systems and the PIC 16F84A 2. Introducing the PIC 16 series and the 16F84A 2.1 The main idea- the PIC 16 series family 2.2 An architecture overview of the 16F84A 2.3 A review of memory technologies 2.4 The 16F84A memory 2.5 Some issues of timing 2.6 Power up and reset 2.7 What others do- the Atmel AT89C2051 2.8 Taking things further- the 16F84A on-chip reset circuit Summary References

  1. Parallel ports, power supply and the clock oscillator

  2. 1 The main idea- parallel input/output

  3. 2 The technical challenge of parallel input/output

  4. 3 Connecting to the parallel port

  5. 4 The PIC 16F84A parallel ports

  6. 5 The clock oscillator

  7. 6 Power supply

  8. 7 The hardware design of the electronic ping-pong Summary References

  9. Starting to program- an introduction to Assembler

  10. 1 The main idea- what programs do and how we develop them

  11. 2 The PIC 16 series instruction set, with a little more on the ALU

  12. 3 Assemblers and the assembler format

  13. 4 Creating simple programs

  14. 5 Adopting a development environment

  15. 6 An introductory MPLAB tutorial

  16. 7 An introduction to simulation

  17. 8 Downloading the program to a microcontroller

  18. 9 What others do- a brief comparison of CISC and RISC instruction sets

  19. 10 Taking things further- the 16 series instruction set format Summary References

  20. Building assembler programs

  21. 1 The main idea- building structured programs

  22. 2 Flow control- branching and subroutines

  23. 3 Generating time delays and intervals

  24. 4 Dealing with data

  25. 5 Introducing logical systems

  26. 6 Introducing arithmetic instructions and the Carry flag

  27. 7 Taming assembler complexity

  28. 8 More use of the MPLAB simulator

  29. 9 The ping-pong program

  30. 10 Simulating the ping-pong program- tutorial

  31. 11 What others do- graphical simulators Summary References

  32. Working with time: interrupts, counters & timers

  33. 1 The main idea- interrupts

  34. 2 Working with interrupts

  35. 3 The main idea- counters and timers

  36. 4 Applying the 16F84A Timer 0, with examples using the electronic ping-pong

  37. 5 The watchdog timer

  38. 6 Sleep mode

  39. 7 What others do

  40. 8 Taking things further- interrupt latency Summary References

Section 3 Larger systems & the PIC 16F873A 7. Larger systems and the PIC 16F873A 7.1 The main idea- the PIC 16F87XA 7.2 The 16F873A block diagram and CPU 7.3 16F873A memory and memory maps 7.4 'Special' memory operations 7.5 The 16F873A interrupts 7.6 The 16F873A oscillator, reset and power supply 7.7 The 16F873A parallel ports 7.8 Test, commission and diagnostic tools 7.9 The Microchip in-circuit debugger (ICD2) 7.10 Applying the 16F873A: the Derbot AGV 7.11 Downloading, testing and running a simple program with ICD 2 7.12 Taking things further- the 16F874A/16F877A Summary References

  1. The human and physical interfaces

  2. 1 The main idea- the human interface

  3. 2 From switches to keypads

  4. 3 LED displays

  5. 4 Liquid crystal displays

  6. 5 The main idea- interfacing to the physical world

  7. 6 Some simple sensors

  8. 7 More on digital input

  9. 8 Actuators: motors and servos

  10. 9 Interfacing to actuators

  11. 10 Building up the Derbot

  12. 11 Applying sensors and actuators- a 'blind' navigation Derbot program Summary References

  13. Taking timing further

  14. 1 The main ideas- taking counting and timing further

  15. 2 The 16F87XA Timer 0 and Timer 1

  16. 3 The 16F87XA Timer 2, comparator and PR2 register

  17. 4 The capture/compare/PWM (CCP) modules

  18. 5 Pulse width modulation

  19. 6 Generating PWM in software

  20. 7 PWM used for digital-to-analog conversion

  21. 8 Frequency measurement

  22. 9 Speed control applied to the Derbot

  23. 10 Where there is no timer

  24. 11 Sleep mode

  25. 12 Where do we go from here?

  26. 13 Building up the Derbot Summary References

  27. Starting with serial

  28. 1 The main idea- introducing serial

  29. 2 Simple serial links- synchronous data communication

  30. 3 The 16F87XA Master Synchronous Serial Port (MSSP) module in SPI mode

  31. 4 A simple SPI example

  32. 5 The limitations of Microwire and SPI, and of simple synchronous serial transfer

  33. 6 Enhancing synchronous serial, and the Inter-Integrated Circuit bus

  34. 7 The MSSP configured for IC

  35. 8 IC applied in the Derbot AGV

  36. 9 Evaluation of synchronous serial data communication

  37. 10 The 16F87XA Addressable Universal Synchronous Asynchronous Receiver Transmitter (USART)

  38. 11 Implementing serial with a serial port- 'bit banging'

  39. 12 Building up the Derbot Summary References

  40. Data acquisition and manipulation

  41. 1 The main idea- analog and digital quantities, their acquisition and use

  42. 2 The data acquisition system

  43. 3 The PIC 16F87XA ADC module

  44. 4 Applying the ADC in the Derbot light meter program

  45. 5 Some simple data manipulation techniques

  46. 6 The Derbot light-seeking program

  47. 7 The comparator module

  48. 8 Applying the Derbot circuit for measurement purposes

  49. 9 Configuring the Derbot AGV as a light-seeking robot Summary References

Section 4 Smarter systems and the PIC 18FXX2 12. Smarter systems and the PIC 18FXX2 12.1 The main idea- the PIC 18 series and the 18FXX2 12.2 The 18F2X2 block diagram and Staus register 12.3 The 18 series instruction set 12.4 Data memory and Special Function Registers 12.5 Program memory 12.6 The Stacks 12.7 The interrupts 12.8 Power supply and reset 12.9 The oscillator sources 12.10 Introductory programming with the 18F242 Summary References

13 The PIC 18FXX2 peripherals 13.1 The main idea- the 18FXX2 peripherals 13.2 The parallel ports 13.3 The timers 13.4 The capture/compare/PWM (CCP) modules 13.5 The serial ports 13.6 The analog-to-digital converter (ADC) 13.7 Low-voltage detect 13.8 Applying the 18 series in the Derbot-18 13.9 The 18F2420 and the extended instruction set Summary References

14 Introducing C 14.1 The main idea- why C? 14.2 An introduction to C 14.3 Compiling the C program 14.4 The MPLAB C18 compiler 14.5 A C18 tutorial 14.6 Simulating a C program 14.7 A second C example- the Fibonacci program 14.8 The MPLAB C18 libraries 14.9 Further reading Summary References

15 C and the embedded environment 15.1 The main idea- adapting C to the embedded environment 15.2 Controlling and branching on bit values 15.3 More on functions 15.4 More branching and looping 15.5 Using the timer and PWM peripherals Summary References

16 Acquiring and using data with C 16.1 The main idea- using C for data manipulation 16.2 Using the 18FXX2 ADC 16.3 Pointers, arrays and strings 16.4 Using the IC peripheral 16.5 Formatting data for display Summary References

17 More C and the wider C environment 17.1 The main idea- more C and the wider C environment 17.2 Assembler inserts 17.3 Controlling memory allocation 17.4 Interrupts 17.5 Example with interrupt on overflow- flashing LEDs on the Durbot 17.6 Storage classes and their application 17.7 Start-up code: c018i.c 17.8 Structures, unions and bit-fields 17.9 Processor-specific header files 17.10 Taking things further- the MPLAB Linker and the .map file Summary References

18 Multi-tasking and the Real Time Operating System 18.1 The main ideas- the challenge of multi-tasking and real time 18.2 Achieving multi-tasking with sequential programming 18.3 The Real Time Operating System (RTOS) 18.4 Scheduling and the scheduler 18.5 Developing tasks 18.6 Data and resource protection- the semaphore 18.7 Where do we go from here? Summary References

19 The Salvo Real Time Operating System 19.1 The main idea- Salvo, an example RTOS 19.2 Configuring the Salvo application 19.3 Writing Salvo programs 19.4 A first Salvo example 19.5 Using interrupts, delays and semaphores with Salvo 19.6 Using Salvo messages and increasing RTOS complexity 19.7 A program example with messages 19.8 The RTOS overhead Summary References

Section 5 Techniques of connectivity and networking 20 Connectivity and networks 20.1 The main idea-networking and connectivity 20.2 Infrared connectivity 20.3 Radio connectivity 20.4 Controller Area Network (CAN) and Local Interconnect Network (LIN) 20.5 Embedded systems and the Internet 20.6 Conclusion Summary References

Appendix 1 The PIC 16 series instruction set Appendix 2 The electronic ping-pong Appendix 3 The Derbot AGV- hardware design details Appendix 4 Some basics of Autonomous Guided Vehicles Appendix 5 PIC 18 series instruction set (non-extended) Appendix 6 Essentials of C



No. of pages:
© Newnes 2007
24th October 2006
Paperback ISBN:
eBook ISBN:

About the Author

Tim Wilmshurst

Tim Wilmshurst

Tim Wilmshurst is the author of Designing Embedded Systems with PIC Microcontrollers. He has been designing embedded systems since the early days of microcontrollers. For many years this was for Cambridge University, where he led a development team building original systems for research applications – for example in measurement of bullet speed, wind tunnel control, simulated earthquakes, or seeking a cure to snoring. Now he is Head of Electronic Systems at the University of Derby, where he aims to share his love of engineering design with his students.

Affiliations and Expertise

Head of Electronics, University of Derby, UK

Ratings and Reviews