Book description
This book provides a hands-on introductory course on concepts of C programming using a PIC® microcontroller and CCS C compiler. Through a project-based approach, this book provides an easy to understand method of learning the correct and efficient practices to program a PIC® microcontroller in C language. Principles of C programming are introduced gradually, building on skill sets and knowledge. Early chapters emphasize the understanding of C language through experience and exercises, while the latter half of the book covers the PIC® microcontroller, its peripherals, and how to use those peripherals from within C in great detail.
This book demonstrates the programming methodology and tools used by most professionals in embedded design, and will enable you to apply your knowledge and programming skills for any real-life application. Providing a step-by-step guide to the subject matter, this book will encourage you to alter, expand, and customize code for use in your own projects.
- A complete introduction to C programming using PIC microcontrollers, with a focus on real-world applications, programming methodology and tools
- Each chapter includes C code project examples, tables, graphs, charts, references, photographs, schematic diagrams, flow charts and compiler compatibility notes to channel your knowledge into real-world examples
- Online materials include presentation slides, extended tests, exercises, quizzes and answers, real-world case studies, videos and weblinks
Table of contents
- Cover image
- Title page
- Table of Contents
- Copyright
- Introduction
- Chapter 1: C Overview and Program Structure
- Chapter 2: Constants
- Chapter 3: Preprocessor Directives
- Chapter 4: Data Variable and Types
- Chapter 5: Expressions and Operators
- Chapter 6: Statements
- Chapter 7: Functions
- Chapter 8: Arrays
- Chapter 9: Structures
-
Chapter 10: Memory and Pointers
- Abstract
- Memory
- Address-of Operator
- Indirection Operator
- Forcing a Variable Address
- Pointer Types
- Pointer Math
- Back to Subscripts
- Back to Function Parameters
- Back to Structures
- Function Pointers
- Other Uses for Pointers
- Bad Ideas
- Common Mistakes
- ROM Pointers
- User-Defined Memory
- Compatibility Note
- Over the Hill
- Summary
- Chapter 11: Built-in Functions
- Chapter 12: Strings
- Chapter 13: Function-like Macros
- Chapter 14: Conditional Compilation
- Chapter 15: PIC® Microcontroller
- Chapter 16: Discrete Input and Output
- Chapter 17: Interrupts
- Chapter 18: Timers/Counters
- Chapter 19: Advanced Timing
- Chapter 20: Analog Techniques
- Chapter 21: Internal Serial Busses
- Chapter 22: External Serial Busses
- Chapter 23: Multi-Tasking
-
Chapter 24: Inline Assembly
- Abstract
- Assembly Code with C Code
- Inline Assembly Code
- PIC16/PIC Simple Move Instructions
- Accessing C Variables from Assembly
- PIC16/PIC18 Math Instructions
- PIC16/PIC18 Bit Instructions
- PIC16/18 Branch Instructions
- PIC16/18 Literal Instructions
- Compiler Modifications to the Assembly
- SFR Access
- About the FSR
- What Not To Do
- Optimized Assembly
- PIC24 Instructions
- dsPIC® Instructions
- Summary
- Chapter 25: Debugging
- Bibliography
- Appendix-A
- Appendix-B
- Appendix-C
Product information
- Title: Embedded C Programming
- Author(s):
- Release date: September 2014
- Publisher(s): Newnes
- ISBN: 9780128014707
You might also like
book
Programming Embedded Systems in C and C++
Embedded software is in almost every electronic device designed today. There is software hidden away inside …
book
Practical C Programming
A comprehensive guide with practical instructions for learning data structures, low-level programming, high-performance computing, networking and …
video
Embedded Systems Object-Oriented Programming in C and C++
This Embedded Systems Object-Oriented Programming course will help you develop the skills you need to be …
book
Practical C Programming, 3rd Edition
There are lots of introductory C books, but this is the first one that has the …