| Foreword | p. xi |
| Preface | p. xiii |
| Introduction | p. xvii |
| PIC Microcontroller Systems | p. 1 |
| PIC16 Microcontrollers | p. 1 |
| MCU Features | p. 3 |
| Program Execution | p. 3 |
| RAM File Registers | p. 7 |
| Other PIC Chips | p. 7 |
| PIC16 MCU Configuration | p. 8 |
| Clock Options | p. 9 |
| Configuration Options | p. 9 |
| Configuration in C | p. 11 |
| PIC16 MCU Peripherals | p. 12 |
| Timers | p. 13 |
| A/D Converter | p. 15 |
| Comparator | p. 15 |
| Parallel Slave Port | p. 16 |
| Interrupts | p. 16 |
| PIC16 Serial Interfaces | p. 18 |
| USART | p. 19 |
| SPI Bus | p. 21 |
| I[superscript 2]C Bus | p. 21 |
| PIC16 MPLAB Projects | p. 22 |
| MPLAB C Project | p. 23 |
| Project Files | p. 25 |
| PIC16 Program and Debug | p. 26 |
| Programming | p. 27 |
| Debugging | p. 29 |
| Design Package | p. 30 |
| Assessment 1 | p. 31 |
| Assignments 1 | p. 32 |
| C Programming Essentials | p. 35 |
| PIC16 C Getting Started | p. 35 |
| Simple Program | p. 35 |
| Program Creation | p. 36 |
| Program Testing | p. 37 |
| Program Analysis | p. 38 |
| PIC16 C Program Basics | p. 40 |
| Variables | p. 40 |
| Looping | p. 41 |
| Decision Making | p. 42 |
| Loop Control | p. 42 |
| FOR Loop | p. 45 |
| SIREN Program | p. 45 |
| Blank Program | p. 47 |
| PIC16 C Data Operations | p. 47 |
| Variable Types | p. 47 |
| Assignment Operations | p. 52 |
| Conditional Operations | p. 54 |
| PIC16 C Sequence Control | p. 56 |
| While Loops | p. 56 |
| Break, Continue, and Goto | p. 57 |
| If..Else and Switch..Case | p. 59 |
| PIC16 C Functions and Structure | p. 60 |
| Basic Functions | p. 62 |
| Global and Local Variables | p. 63 |
| PIC16 C Input and Output | p. 64 |
| Serial LCD | p. 65 |
| Keypad and Calculator | p. 68 |
| PIC16 C More Data Types | p. 73 |
| Arrays | p. 74 |
| Indirect Addressing Operators | p. 75 |
| Enumeration | p. 77 |
| PIC16 C Compiler Directives | p. 77 |
| Program Directives | p. 78 |
| Header File | p. 78 |
| PIC16 C Assembler Routines | p. 86 |
| Program Compilation | p. 87 |
| Assembler Block | p. 88 |
| PIC Assembly Language | p. 92 |
| Assessment 2 | p. 94 |
| Assignments 2 | p. 96 |
| C Peripheral Interfaces | p. 99 |
| PIC16 C Analog Input | p. 99 |
| Analog Setup | p. 99 |
| Voltage Measurement | p. 100 |
| PIC16 C Interrupts | p. 104 |
| C Interrupts | p. 104 |
| Interrupt Example | p. 106 |
| Interrupt Statements | p. 107 |
| PIC16 C Hardware Timers | p. 108 |
| Counter/Timer Operation | p. 108 |
| PWM Mode | p. 109 |
| Compare Mode | p. 111 |
| Capture Mode | p. 111 |
| PIC16 C UART Serial Link | p. 113 |
| PIC16 C SPI Serial Bus | p. 116 |
| PIC16 C I[superscript 2]C Serial Bus | p. 118 |
| PIC16 C Parallel and Serial Interfaces | p. 121 |
| Parallel Slave Port | p. 121 |
| Comparison of Communication Links | p. 123 |
| PIC16 C EEPROM Interface | p. 126 |
| PIC16 C Analog Output | p. 127 |
| Assessment 3 | p. 132 |
| Assignments 3 | p. 134 |
| C Mechatronics Applications | p. 137 |
| PICDEM Mechatronics Board Overview | p. 137 |
| PICDEM Hardware | p. 137 |
| Motor Drives | p. 138 |
| Test Program | p. 143 |
| Debugging | p. 145 |
| PICDEM Liquid Crystal Display | p. 146 |
| LCD Connections | p. 146 |
| LCD Test Program | p. 149 |
| BCD Count Program | p. 152 |
| PICDEM DC Motor Test Programs | p. 152 |
| Basic Control | p. 152 |
| Rev Counter | p. 154 |
| PICDEM Stepper Motor Control | p. 156 |
| Construction | p. 157 |
| Stepper Motor Test | p. 158 |
| Direction Control | p. 158 |
| PICDEM Analog Sensors | p. 162 |
| Light Sensor | p. 162 |
| Temperature Measurement | p. 163 |
| PICDEM Temperature Controller | p. 166 |
| Specification | p. 166 |
| I/O Allocation | p. 168 |
| Implementation | p. 168 |
| PICDEM Board Simulation | p. 171 |
| Circuit Description | p. 173 |
| Demo Applications | p. 175 |
| Assessment 4 | p. 175 |
| Assignments 4 | p. 177 |
| PIC16 C Applications and Systems | p. 179 |
| PIC16 C Application Design | p. 179 |
| Hardware Design | p. 179 |
| Software Design | p. 180 |
| Application Debugging and Testing | p. 180 |
| PIC16 C Temperature Controller | p. 182 |
| System Operation | p. 182 |
| Software Design and Implementation | p. 183 |
| PIC16 C Data Logger System | p. 184 |
| BASE Board | p. 186 |
| Program Outline | p. 189 |
| PIC16 C Operating Systems | p. 189 |
| Polled I/O | p. 189 |
| Interrupts | p. 190 |
| PC Operating System | p. 191 |
| Real-Time Operating System | p. 192 |
| PIC16 C System Design | p. 195 |
| Hardware Selection | p. 195 |
| Microcontrollers | p. 196 |
| Hardware Design | p. 197 |
| Software Design | p. 199 |
| Assessment 5 | p. 200 |
| Assignments 5 | p. 201 |
| Hardware Design Using ISIS Schematic Capture | p. 203 |
| Design Specification | p. 203 |
| Schematic Circuit | p. 204 |
| Schematic Edit | p. 205 |
| Software Design Using CCS C | p. 209 |
| BAR1 Source Code | p. 211 |
| PIC Registers | p. 212 |
| BAR1 List File | p. 215 |
| System Testing Using Proteus VSM | p. 221 |
| Attaching the Program | p. 221 |
| Program Debugging | p. 221 |
| Typical Errors | p. 224 |
| C Compiler Comparison | p. 227 |
| Microchip C18 | p. 228 |
| Hi-Tech PIC C | p. 230 |
| Mikro C | p. 234 |
| Matrix C | p. 234 |
| Summary of C Compilers | p. 236 |
| CCS C Programming Syntax Summary | p. 239 |
| Compiler Directives | p. 239 |
| Program Blocks | p. 239 |
| Punctuation | p. 239 |
| Basic I/O Functions | p. 240 |
| CCS C Programming Function Reference | p. 243 |
| Answers | p. 257 |
| Index | p. 271 |
| Table of Contents provided by Ingram. All Rights Reserved. |