Book description
This book is ideal for the engineer, technician, hobbyist and student who have knowledge of the basic principles of PIC microcontrollers and want to develop more advanced applications using the 18F series.
The architecture of the PIC 18FXXX series as well as typical oscillator, reset, memory, and input-output circuits is completely detailed. After giving an introduction to programming in C, the book describes the project development cycle in full, giving details of the process of editing, compilation, error handling, programming and the use of specific development tools. The bulk of the book gives full details of tried and tested hands-on projects, such as the 12C BUS, USB BUS, CAN BUS, SPI BUS and real-time operating systems.
- A clear introduction to the PIC 18FXXX microcontroller's architecture
- 20 projects, including developing wireless and sensor network applications, using I2C BUS, USB BUS, CAN BUS and the SPI BUS, which give the block and circuit diagram, program description in PDL, program listing and program description
- Numerous examples of using developmental tools: simulators, in-circuit debuggers (especially ICD2) and emulators
Table of contents
- Copyright
- Preface
- Acknowledgments
-
1. Microcomputer Systems
- 1.1. Introduction
- 1.2. Microcontroller Systems
-
1.3. Microcontroller Features
- 1.3.1. Supply Voltage
- 1.3.2. The Clock
- 1.3.3. Timers
- 1.3.4. Watchdog
- 1.3.5. Reset Input
- 1.3.6. Interrupts
- 1.3.7. Brown-out Detector
- 1.3.8. Analog-to-Digital Converter
- 1.3.9. Serial Input-Output
- 1.3.10. EEPROM Data Memory
- 1.3.11. LCD Drivers
- 1.3.12. Analog Comparator
- 1.3.13. Real-time Clock
- 1.3.14. Sleep Mode
- 1.3.15. Power-on Reset
- 1.3.16. Low-Power Operation
- 1.3.17. Current Sink/Source Capability
- 1.3.18. USB Interface
- 1.3.19. Motor Control Interface
- 1.3.20. CAN Interface
- 1.3.21. Ethernet Interface
- 1.3.22. ZigBee Interface
- 1.4. Microcontroller Architectures
- 1.5. Number Systems
- 1.6. Converting Binary Numbers into Decimal
- 1.7. Converting Decimal Numbers into Binary
- 1.8. Converting Binary Numbers into Hexadecimal
- 1.9. Converting Hexadecimal Numbers into Binary
- 1.10. Converting Hexadecimal Numbers into Decimal
- 1.11. Converting Decimal Numbers into Hexadecimal
- 1.12. Converting Octal Numbers into Decimal
- 1.13. Converting Decimal Numbers into Octal
- 1.14. Converting Octal Numbers into Binary
- 1.15. Converting Binary Numbers into Octal
- 1.16. Negative Numbers
- 1.17. Adding Binary Numbers
- 1.18. Subtracting Binary Numbers
- 1.19. Multiplication of Binary Numbers
- 1.20. Division of Binary Numbers
- 1.21. Floating Point Numbers
- 1.22. Converting a Floating Point Number into Decimal
- 1.23. BCD Numbers
- 1.24. Summary
- 1.25. Exercises
-
2. PIC18F Microcontroller Series
-
2.1. PIC18FXX2 Architecture
- 2.1.1. Program Memory Organization
- 2.1.2. Data Memory Organization
- 2.1.3. The Configuration Registers
- 2.1.4. The Power Supply
- 2.1.5. The Reset
- 2.1.6. The Clock Sources
- 2.1.7. Watchdog Timer
- 2.1.8. Parallel I/O Ports
- 2.1.9. Timers
- 2.1.10. Capture/Compare/PWM Modules (CCP)
- 2.1.11. Analog-to-Digital Converter (A/D) Module
- 2.1.12. Interrupts
- 2.2. Summary
- 2.3. Exercises
-
2.1. PIC18FXX2 Architecture
-
3. C Programming Language
-
3.1. Structure of a mikroC Program
- 3.1.1. Comments
- 3.1.2. Beginning and Ending of a Program
- 3.1.3. Terminating Program Statements
- 3.1.4. White Spaces
- 3.1.5. Case Sensitivity
- 3.1.6. Variable Names
- 3.1.7. Variable Types
- 3.1.8. Constants
- 3.1.9. Escape Sequences
- 3.1.10. Static Variables
- 3.1.11. External Variables
- 3.1.12. Volatile Variables
- 3.1.13. Enumerated Variables
- 3.1.14. Arrays
- 3.1.15. Pointers
- 3.1.16. Structures
- 3.1.17. Unions
- 3.1.18. Operators in C
- 3.1.19. Modifying the Flow of Control
- 3.1.20. Mixing mikroC with Assembly Language Statements
- 3.2. PIC Microcontroller Input-Output Port Programming
- 3.3. Programming Examples
- 3.4. Summary
- 3.5. Exercises
-
3.1. Structure of a mikroC Program
-
4. Functions and Libraries in mikroC
- 4.1. mikroC Functions
- 4.2. mikroC Built-in Functions
- 4.3. mikroC Library Functions
- 4.4. Summary
- 4.5. Exercises
-
5. PIC18 Development Tools
- 5.1. Software Development Tools
- 5.2. Hardware Development Tools
- 5.3. mikroC Integrated Development Environment (IDE)
- 5.4. Summary
- 5.5. Exercises
-
6. Simple PIC18 Projects
- 6.1. Program Description Language (PDL)
- Project 6.1—Chasing LEDs
- Project 6.2—LED Dice
- Project 6.3—Two-Dice Project
- Project 6.4—Two-Dice Project Using Fewer I/O Pins
- Project 6.5—7-Segment LED Counter
- Project 6.6—Two-Digit Multiplexed 7-Segment LED
- Project 6.7—Two-Digit Multiplexed 7-Segment LED Counter with Timer Interrupt
- Project 6.8—Voltmeter with LCD Display
- Project 6.9—Calculator with Keypad and LCD
- Project 6.10—Serial Communication–Based Calculator
- 7. Advanced PIC18 Projects—SD Card Projects
-
8. Advanced PIC18 Projects—USB Bus Projects
- 8.1. Speed Identification on the Bus
- 8.2. USB States
- 8.3. USB Bus Communication
- 8.4. Descriptors
- 8.5. PIC18 Microcontroller USB Bus Interface
- 8.6. mikroC Language USB Bus Library Functions
- Project 8.1—USB-Based Microcontroller Output Port
- Project 8.2—USB-Based Microcontroller Input/Output
- Project 8.3—USB-Based Ambient Pressure Display on the PC
-
9. Advanced PIC18 Projects—CAN Bus Projects
- 9.1. Data Frame
- 9.2. Remote Frame
- 9.3. Error Frame
- 9.4. Overload Frame
- 9.5. Bit Stuffing
- 9.6. Types of Errors
- 9.7. Nominal Bit Timing
- 9.8. PIC Microcontroller CAN Interface
- 9.9. PIC18F258 Microcontroller
- 9.10. mikroC CAN Functions
- 9.11. CAN Bus Programming
- Project 9.1—Temperature Sensor CAN Bus Project
- 10. Multi-Tasking and Real-Time Operating Systems
Product information
- Title: Advanced PIC Microcontroller Projects in C
- Author(s):
- Release date: August 2011
- Publisher(s): Newnes
- ISBN: 9780080558424
You might also like
book
PIC Microcontroller Projects in C, 2nd Edition
Extensively revised and updated to encompass the latest developments in the PIC 18FXXX series, this book …
book
Programming 8-bit PIC Microcontrollers in C
Microcontrollers are present in many new and existing electronic products, and the PIC microcontroller is a …
book
Programming Arduino Projects with the PIC Microcontroller: A Line-by-Line Code Analysis and Complete Reference Guide for Embedded Programming in C
Now that you’ve built a few Arduino projects, and reused some pre-written sketches, it’s time to …
book
Intermediate C Programming for the PIC Microcontroller: Simplifying Embedded Programming
Delve into the exciting world of embedded programming with PIC microcontrollers in C. The key to …