Book Introduction:
John Morton offers a uniquely concise and practical guide to getting up and running with the PIC Microcontroller. The PIC is one of the most popular of the microcontrollers that are transforming electronic project work and product design, and this book is the ideal introduction for students, teachers, technicians and electronics enthusiasts.
Assuming no prior knowledge of microcontrollers and introducing the PIC Microcontroller’s capabilities through simple projects, this book is ideal for electronics hobbyists, students, school pupils and technicians. The step-by-step explanations and the useful projects make it ideal for student and pupil self-study: this is not just a reference book – you start work with the PIC microcontroller straight away.
The revised third edition focuses entirely on the re-programmable flash PIC microcontrollers such as the PIC16F54, PIC16F84 and the extraordinary 8-pin PIC12F508 and PIC12F675 devices.
* Demystifies the leading microcontroller for students, engineers an hobbyists
* Emphasis on putting the PIC to work, not theoretical microelectronics
* Simple programs and circuits introduce key features and commands through project work.
Audience: Professional
Format: Paperback
Language: English
Number Of Pages: 240
Published: 23rd September 2005
Publisher: Elsevier Science & Technology
Dimensions (cm): 23.2 x 15.4 x 1.4
Weight (kg): 0.358
Table of Contents:
Acknowledgements | p. ix |
Preface to the third edition | p. xi |
Introduction | p. 1 |
Some tips before starting | p. 2 |
Binary, decimal and hexadecimal | p. 2 |
An 8-bit system | p. 5 |
Initial steps | p. 5 |
Choosing your PIC microcontroller | p. 6 |
Writing | p. 10 |
Assembling | p. 10 |
The file registers | p. 10 |
A program template | p. 13 |
Exploring the PIC5x series | p. 20 |
Your first program | p. 20 |
Configuration bits | p. 22 |
Testing the program | p. 23 |
Simulating | p. 23 |
Emulating | p. 23 |
Blowing the PIC microcontroller | p. 24 |
Hardware | p. 24 |
Using the testing instructions | p. 29 |
Timing | p. 32 |
Seven-segment displays | p. 44 |
The program counter | p. 46 |
Subroutines and the stack | p. 48 |
Logic gates | p. 65 |
The watchdog timer | p. 69 |
Final instructions | p. 73 |
The STATUS file register | p. 74 |
The carry and digit carry flags | p. 75 |
Pages | p. 76 |
What caused the reset? | p. 79 |
Indirect addressing | p. 80 |
Some useful (but not vital) tricks | p. 82 |
Final PIC5x program – ‘Bike buddy’ | p. 85 |
The PIC12F50x series (8-pin PIC microcontrollers) | p. 90 |
Differences from the PIC16F54 | p. 90 |
The STATUS register | p. 90 |
The OSCCAL register | p. 91 |
Inputs and outputs | p. 92 |
The OPTION register | p. 92 |
The TRIS register | p. 93 |
The general purpose file registers | p. 93 |
The MCLR | p. 93 |
Configuration bits | p. 93 |
Example project: ‘PIC dice’ | p. 94 |
Random digression | p. 95 |
Intermediate operations using the PIC12F675 | p. 100 |
The inner differences | p. 101 |
The OPTION and WPU registers | p. 102 |
The TRISIO register | p. 103 |
Calibrating the internal oscillator | p. 103 |
PCLATH: Higher bits of the program counter | p. 104 |
Remaining differences | p. 105 |
Interrupts | p. 105 |
INTCON | p. 106 |
The interrupt service routine | p. 107 |
Interrupts during sleep | p. 109 |
Maintaining the STATUS quo | p. 109 |
New program template | p. 110 |
Example project: ‘Quiz game controller’ | p. 112 |
EEPROM | p. 116 |
EECON1 | p. 116 |
Reading from the EEPROM | p. 116 |
Writing to the EEPROM | p. 117 |
Example project: ‘Telephone card chip’ | p. 118 |
Further EEPROM examples: Music maker | p. 122 |
Power monitor | p. 122 |
Analogue to digital conversion | p. 122 |
ADCON0 | p. 123 |
ANSEL: Analogue select register | p. 124 |
A/D conversion interrupt | p. 125 |
Example project: ‘Bath monitor’ | p. 125 |
Comparator module | p. 129 |
Voltage reference | p. 130 |
Comparator interrupts | p. 130 |
Comparator example: ‘Sun follower’ | p. 131 |
Comparator example: Reading many buttons from one pin | p. 132 |
Final project: Intelligent garden lights | p. 134 |
Advanced operations and the future | p. 138 |
Extra timers: TMR1 & … | p. 138 |
Capture/Compare/PWM | p. 139 |
USART: Serial communication | p. 140 |
Programming tips | p. 142 |
A PIC development environment | p. 143 |
Sample programs | p. 145 |
LedOn – Turns an LED on | p. 145 |
PushButton (1.0) – If a push button is pressed, turns on an LED | p. 146 |
PushButton (2.0) – Shorter version of PushButton 1.0 | p. 147 |
Timing – LED states toggled every second, and buzzer on every five seconds | p. 148 |
Traffic – Pedestrian traffic lights junction is simulated | p. 150 |
Counter (1.0) – Counts signals from a push button, resets after 16 | p. 152 |
Counter (2.0) – Stop reading button twice (otherwise, as Counter 1.0) | p. 154 |
Counter (3.0) – Solves button bounce (otherwise, as Counter 2.0) | p. 156 |
StopClock – A stop clock displaying tenths of seconds to minutes | p. 158 |
LogicGates – Acts as the eight different gates | p. 162 |
Alarm – An alarm system which can be set or disabled | p. 164 |
BikeBuddy – A speedometer and mileometer for bikes | p. 165 |
PIC Dice – A pair of dice are simulated | p. 171 |
Quiz – Indicates which of three push buttons has been pressed first | p. 175 |
Phonecard – To act like a phonecard which decrements a file register | p. 177 |
TempSense – Displays whether temperature is too hot, too cold or OK | p. 181 |
p. 183 | |
Specifications of some Flash PIC microcontrollers | p. 189 |
Pin layouts of some Flash PIC microcontrollers | p. 191 |
Instructions glossary | p. 192 |
Number system conversion | p. 195 |
Bit assignments of various file registers | p. 196 |
If all else fails, read this | p. 203 |
Contacts and further reading | p. 204 |
PICKit 1 & BFMP Info | p. 205 |
Answers to the exercises | p. 207 |
Some BASIC commands in assembly | p. 222 |
Index | p. 223 |
Table of Contents provided by Ingram. All Rights Reserved. |
Link to Purchase E-Book:
The PIC Microcontroller Your Personal Introductory Course By John Morton E-Book