SUSTAINABLE DEVELOPMENT
Innovate. Sustain. Transform.
Save up to 30% on top Physical Sciences & Engineering titles!

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 experienc… Read more
SUSTAINABLE DEVELOPMENT
Save up to 30% on top Physical Sciences & Engineering titles!
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.
Introduction
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
LED_Flasher2
SOS
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
Headers
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
I/O PORT, GPIO
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
HEAD62RC.ASM
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
Registers
Instruction set summary
APPENDIX A. Microcontroller data
APPENDIX B. Electrical characteristics
APPENDIX C. Decimal, binary and hexadecimal numbers
APPENDIX D. Useful contacts
Index
DS