PIC Projects and Applications using C
A Project-based Approach
- 1st Edition - December 2, 2012
- Author: David W Smith
- Language: English
- Paperback ISBN:9 7 8 - 0 - 0 8 - 0 9 7 1 5 1 - 3
- eBook ISBN:9 7 8 - 0 - 0 8 - 0 9 9 9 5 4 - 8
PIC Projects and Applications Using C details how to program the PIC microcontroller in the C language. The book takes a learn-by-doing approach, with applications covering… Read more
Purchase options
Institutional subscription on ScienceDirect
Request a sales quotePIC Projects and Applications Using C details how to program the PIC microcontroller in the C language. The book takes a learn-by-doing approach, with applications covering topics such as inputs, outputs, keypads, alphanumeric displays, analogue-to-digital conversion, radio transmitters and receivers, data EEPROM, interrupts and timing. To aid debugging, the book provides a section detailing the use of the simulator and in-circuit debugger.
With this book you will learn:
How to program the PIC microcontroller in C
Techniques for using the simulator and debuggers to find faults on your code
The ins and outs of interfacing circuits, such as radio modules and liquid crystal displays
How to use the PIC on-board functions, such as interrupts and timing modules, and make analogue measurements
- Relevant parts of the language are introduced and explained when required for those new to the subject
- Core principles are introduced gradually for self-paced learning
- Explains how and why a software program works, and how to alter and expand the code
Electronics engineers, including embedded systems designers and control engineers, technicians in industry, hobbyists needing a more complete grounding in microcontroller principles and applications. Students taking introductory level classes in courses in electronics / microelectronics.
- Preface
- Chapter 1: Introduction to the Microcontroller and C
- Chapter 2: First C Program
- MPLAB and MPLABX Installation
- A Brief Introduction to C for the Microcontroller
- Writing the Code Using MPLAB IDE
- Types of Errors
- Programming the Microcontroller
- Writing the Code Using MPLABX
- Creating a New Project
- Chapter 3: Using Eight Outputs
- Explanation of the Code
- Looping in a Program
- The Disco Code
- The Header Program
- Chapter 4: Inputs
- IF Statement
- If–Else
- Using Several Inputs
- Chapter 5: Keypad Scanning
- Four Digit Code
- Putting the Scan Routine in a Header File, dwsScan.h
- Chapter 6: Analogue to Digital Conversion
- Configuring the A/D Device
- ADCON0 A–D Control Register 0
- ADCON1 A–D Control Register 1
- ADCON2 A–D Control Register 2
- ADRESH and ADRESL: A/D Result Registers High and Low Byte
- The Thermistor
- Making an A/D Reading with the Thermistor
- The LM335 Temperature Sensing IC
- Operation of the LM335
- A/D Application
- Question
- Using Several A–D Inputs
- Solar Panel Heating System
- Microcontrollers with More A/D Inputs
- The PIC18(L)F43K22 28A/D Inputs
- Chapter 7: Alpha Numeric Display
- Configuring the Display
- Program LCD.C
- Using Header: dwsLCD.h
- Program LCDh.C
- Character Display Address
- Displaying Measurements
- Displaying Room Temperature
- RoomTemperature.C
- Chapter 8: Porting Code to Other Microcontrollers
- The Header Code
- Chapter 9: Timer/Counter Modules
- TMR0 Prescaler
- Timing an Event
- An Accurate 1 s Time Period
- An Accurate 1 min Delay
- 24 h Clock
- 30 min Delays and Longer
- Chapter 10: Interrupts
- Explanation of the Program RBinterrupt.C
- TMR0 Overflowing Interrupt
- Chapter 11: Fault Finding, Using the Simulator, and the In-Circuit Debugger
- The Simulator Using MPLAB
- Setting Breakpoints
- Stopwatch
- Further Information
- Chapter 12: Radio Transmitters and Receivers
- The Transmitter
- The Receiver
- Examples
- Chapter 13: EEPROM Data Memory
- Chapter 14: Projects
- Project 1: Countdown Timer
- Project 2: Chess Clock
- Project 3: Resistance Meter
- Project 4: Capacitance Meter
- Project 5: Voltmeter
- Chapter 15: C Extra
- Data Types
- Conditional Operators
- Appendix A: Data Sheets
- Appendix B: Useful Contacts
- Index
- No. of pages: 204
- Language: English
- Edition: 1
- Published: December 2, 2012
- Imprint: Newnes
- Paperback ISBN: 9780080971513
- eBook ISBN: 9780080999548
DS