| |
| |
Acknowledgments | |
| |
| |
About the Author | |
| |
| |
Introduction | |
| |
| |
| |
Under the Covers of the PIC16F684 | |
| |
| |
| |
I/O Pins | |
| |
| |
| |
Configuration Word | |
| |
| |
| |
PIC MCU Variable Memory, Registers, and Program Memory | |
| |
| |
| |
Simulating cFlash.c in MPLAB IDE | |
| |
| |
| |
Introductory C Programming | |
| |
| |
| |
Variable Declaration Statements | |
| |
| |
| |
C Data Types | |
| |
| |
| |
Constant Formatting | |
| |
| |
| |
Assignment Statements | |
| |
| |
| |
Expressions | |
| |
| |
| |
Bitwise Operators | |
| |
| |
| |
Logical Expressions | |
| |
| |
| |
Conditional Execution Using the If Statement | |
| |
| |
| |
Nested Conditional Statements | |
| |
| |
| |
The Switch Decision Statement | |
| |
| |
| |
Conditional Looping | |
| |
| |
| |
The For Statement | |
| |
| |
| |
Simple PIC MCU Applications | |
| |
| |
| |
Basic Delays | |
| |
| |
| |
Sequencing PICkit 1 Starter Kit LEDs | |
| |
| |
| |
Binary Number Output Using PICkit 1 Starter Kit LEDs | |
| |
| |
| |
Basic Button Inputs | |
| |
| |
| |
Debouncing Button Inputs | |
| |
| |
| |
MCLR Operation | |
| |
| |
| |
Ending Applications | |
| |
| |
| |
C Language Features | |
| |
| |
| |
Functions and Subroutines | |
| |
| |
| |
Global and Local Variables | |
| |
| |
| |
Defines and Macros | |
| |
| |
| |
Variable Arrays | |
| |
| |
| |
Structures and Unions | |
| |
| |
| |
Pointers and Lists | |
| |
| |
| |
Character Strings | |
| |
| |
| |
Library Functions | |
| |
| |
| |
PIC16F684 Microcontroller Built-in Functions | |
| |
| |
| |
Brownout Reset | |
| |
| |
| |
ADC Operation | |
| |
| |
| |
Comparator Operation | |
| |
| |
| |
Watchdog Timer | |
| |
| |
| |
Short Timer Delays Using TMR0 | |
| |
| |
| |
Using the TMR0 Prescaler | |
| |
| |
| |
Long Timer Delays Using TMR1 | |
| |
| |
| |
Comparing Clock Oscillators | |
| |
| |
| |
Pin Resistance Measurements | |
| |
| |
| |
Generating PWM Signals | |
| |
| |
| |
Storing and Retrieving Data | |
| |
| |
| |
Interfacing Projects for the PIC Microcontroller | |
| |
| |
| |
Driving a Seven-Segment LED Display Directly from the PIC16F684 | |
| |
| |
| |
Multiple Seven-Segment LED Displays | |
| |
| |
| |
LED Matrix Displays | |
| |
| |
| |
LCD Display | |
| |
| |
| |
Producing Random Numbers | |
| |
| |
| |
Two-Bit LCD Display | |
| |
| |
| |
Switch Matrix Keypad Mapping | |
| |
| |
| |
Sample C Microcontroller Applications | |
| |
| |
| |
Pumpkin LED Display | |
| |
| |
| |
Reaction-Time Tester | |
| |
| |
| |
Rokenbok Monorail/Traffic Lights | |
| |
| |
| |
Seven-Segment LED Thermometer | |
| |
| |
| |
PIC MCU "Piano" | |
| |
| |
| |
Model Railway Switch Control | |
| |
| |
| |
PC Operating Status Display | |
| |
| |
| |
Introduction to PIC MCU Assembly Language Programming | |
| |
| |
| |
The asmTemplate.asm File and Basic Directives | |
| |
| |
| |
Specifying Program Memory Addresses | |
| |
| |
| |
Loading the WREG and Saving Its Contents | |
| |
| |
| |
Defining Variables | |
| |
| |
| |
Bitwise Instructions | |
| |
| |
| |
Addition Instructions | |
| |
| |
| |
AddLibs: Strange Simulator Results | |
| |
| |
| |
Subtraction Instructions | |
| |
| |
| |
Bank Addressing | |
| |
| |
| |
Bit Instructions | |
| |
| |
| |
Bit Skip Instructions | |
| |
| |
| |
Conditional Execution | |
| |
| |
| |
decfsz Looping | |
| |
| |
| |
Subroutines | |
| |
| |
| |
Defining and Implementing Arrays | |
| |
| |
| |
PIC Microcontroller Assembly Language Resource Routines | |
| |
| |
| |
Logic Simulation Using the PIC16F684 | |
| |
| |
| |
The C "Switch" Statement | |
| |
| |
| |
Defines | |
| |
| |
| |
Conditional Assembly | |
| |
| |
| |
Macros | |
| |
| |
| |
16-Bit Values/Variables | |
| |
| |
| |
Universal Delay Macro | |
| |
| |
| |
High-Level Programming | |
| |
| |
| |
Implementing Read-Only Arrays | |
| |
| |
| |
Data Stacks | |
| |
| |
| |
Circular Buffers | |
| |
| |
| |
Reading and Writing the EEPROM Data Memory | |
| |
| |
| |
Sensors | |
| |
| |
| |
PIC MCU BS2 User Interface | |
| |
| |
| |
PIC MCU BS2 Keypad Interface | |
| |
| |
| |
PIC MCU Instrument Interface | |
| |
| |
| |
Sound Detection | |
| |
| |
| |
Multiple Microswitch Debouncing | |
| |
| |
| |
Light Sensors | |
| |
| |
| |
Infrared (IR) Surface Sensor | |
| |
| |
| |
Interfacing to Sharp GP2D120 Ranging Object Sensors | |
| |
| |
| |
Do-It-Yourself IR Object Sensor | |
| |
| |
| |
IR Object-Ranging Sensor | |
| |
| |
| |
Ultrasonic Distance-Range Sensor | |
| |
| |
| |
Robot IR Tag | |
| |
| |
| |
Motor Control | |
| |
| |
| |
DC Motor Driven Using the CCP PWM and Using a Potentiometer Control | |
| |
| |
| |
DC Motor Control with Simple TMR0 PWM | |
| |
| |
| |
Controlling Multiple Motors with PWM and BS2 Interface | |
| |
| |
| |
Bipolar Stepper Motor Control | |
| |
| |
| |
Unipolar Stepper Motor Control | |
| |
| |
| |
Radio-Control Model Servo Control | |
| |
| |
| |
Multiple Servo Control Software Structure | |
| |
| |
| |
Two-Servo Robot Base with BS2 Interface | |
| |
| |
| |
Solving Programming Problems in PIC Microcontroller Assembly Language | |
| |
| |
| |
Eight-Bit Multiplication with a 16-Bit Product | |
| |
| |
| |
Division of a 16-Bit Value by an Eight-Bit Value | |
| |
| |
| |
Squaring a Number Using Finite Difference Theory | |
| |
| |
| |
Find the Square Root of a 16-Bit Number | |
| |
| |
| |
Converting a Byte into Three Decimal, Two Hex, or Eight Binary ASCII Bytes | |
| |
| |
| |
Produce the Even Parity Values for a Byte | |
| |
| |
| |
Sort a List of 10 Eight-Bit Values Using the Bubble-Sort Algorithm | |
| |
| |
| |
Encrypt and Decrypt an ASCIIZ String Using a Simple Substitution Algorithm | |
| |
| |
| |
Generate a Fibonacci Number Sequence | |
| |
| |
| |
Find the Largest Common Factor of Two Eight-Bit Numbers | |
| |
| |
| |
ZipZaps Robot | |
| |
| |
| |
Characterizing the ZipZaps | |
| |
| |
| |
PIC MCU Power Supply | |
| |
| |
| |
PIC MCU Electronics PCB | |
| |
| |
| |
IR TV Remote Control | |
| |
| |
| |
Motor and Steering Control | |
| |
| |
| |
Basic Task-Control Software | |
| |
| |
| |
IR Remote Control | |
| |
| |
| |
Light Sensors and Following | |
| |
| |
| |
IR Object-Detection Sensors | |
| |
| |
| |
IR Line-Following Sensors | |
| |
| |
Index | |