PIC Microcontroller and Embedded Systems: Using Assembly and C for PIC18
The PIC microcontroller from Microchip is one of the most widely used 8-bit microcontrollers in the world. In this book, the authors use a step-by-step and systematic approach to show the programming of the PIC18 chip. Examples in both Assembly language and C show how to program many of the PIC18 features such as timers, serial communication, ADC, and SPI.
Why Read This Book
You will get a hands-on, example-driven introduction to the PIC18 family that teaches both Assembly and C so you can read, write, and optimize real firmware. The book walks you through timers, ADC, serial protocols, SPI and peripheral interfacing with clear worked examples and lab-style projects so you can apply techniques to real embedded designs.
Who Will Benefit
Engineers and hobbyists with some programming/electronics background who want to learn practical PIC18 firmware development and peripheral interfacing using Assembly and C.
Level: Intermediate — Prerequisites: Basic C programming and familiarity with digital electronics (logic levels, I/O), plus a general understanding of microcontroller concepts such as registers and interrupts.
Key Takeaways
- Write and debug PIC18 firmware in both Assembly and C using common toolchains.
- Configure and use timers, interrupts, PWM and capture/compare modules for real-time control.
- Implement ADC, SPI, I2C and UART peripherals and integrate sensors and serial devices.
- Design interrupt-driven, register-level device drivers and understand the hardware/software interface.
- Apply memory, EEPROM and data-storage techniques for persistent embedded data.
- Translate hardware datasheet details into working code and example projects for PIC18 parts.
Topics Covered
- Introduction to PIC Microcontrollers and the PIC18 Family
- Assembly Language Basics and the PIC18 Instruction Set
- C Programming for PIC18 — Toolchain and Compiler Usage
- I/O Ports and Digital Interfacing
- Interrupts and Real-Time Control
- Timers, Counters and PWM
- Analog-to-Digital Conversion and Sensor Interfacing
- Serial Communication: USART (UART)
- Synchronous Protocols: SPI and I²C
- Capture/Compare/PWM (CCP/Enhanced CCP) Modules
- EEPROM, Data Memory Organization and Stack Management
- Mixed Assembly/C Projects and Optimizations
- Practical Applications and Example Projects
- Appendices: Assembler Directives, Instruction Summary, and Datasheet Notes
Languages, Platforms & Tools
How It Compares
Compared with Myke Predko's 'Programming and Customizing the PIC Microcontroller', Mazidi's book is more structured as a step-by-step tutorial for PIC18 with extensive assembly and C examples; compared to Tim Wilmshurst's texts, Mazidi is more code-centric and lab-oriented while Wilmshurst emphasizes system-level design and modern toolchains.













