EmbeddedRelated.com
Books
Jacob Beningo
Live online course · Jacob Beningo
AI for Embedded Developers
$100 off for EmbeddedRelated readers until Dec 6 · 5 live sessions, Dec 7-11
Discount ends in
26days 00hrs 35min 08sec
Learn More →

Beginner's Guide to Programming the PIC32

Kibalo, Thomas ● 2013

Thomas Kibalo, who has written many articles for Nuts & Volts magazine delivers the beginner's book many have been looking for: Beginner’s Guide to Programming the PIC32. Using the low cost Microchip Microstick II module with built in programmer and socketed PIC32MX250F128B Microcontroller and the free to download version of MPLAB XC32 Compiler, Kibalo takes you step by step through the fundamentals of programming the PIC32. His clear explanations of the inner workings make learning the PIC32 architecture easy. His code examples demonstrate how to perform the functions most applications require. The hardware is shown in simple breadboard setup so even a beginner can build along with very few extra components needed. The projects include: Driving LEDs Reading momentary switch Analog to Digital Conversion Driving an LCD display Timers and Timer Interrupts Optimizing Performance Serial RS232 communication SPI communication Pulse Width Modulation Controlling the PIC32 Real Time Clock and Calendar Peripheral Pin Select Running Arduino Style code on PIC32 Kibalo also shows you how to run the popular Arduino style code on a PIC32 platform. Using the Microstick II and his library of functions he described throughout the book, you’ll be running Arduino examples on the Microstick II in no time. This is the book you need if you want to understand how to get started with PIC32.


Why Read This Book

You will get a practical, step-by-step introduction to programming a real PIC32 (MX250) board using MPLAB X and the XC32 toolchain, with breadboard-friendly projects that reinforce each topic. The book focuses on the peripherals and patterns you'll actually use (GPIO, ADC, timers, UART, interrupts), so you can move from blinking LEDs to reading sensors and serial communication quickly.

Who Will Benefit

Absolute beginners to embedded systems, students or hobbyist engineers who want hands-on experience programming PIC32 microcontrollers and learning firmware tools.

Level: Beginner — Prerequisites: Basic electronic concepts (Ohm's law, breadboarding) and some familiarity with C programming are recommended but not strictly required.

Get This Book

Key Takeaways

  • Set up MPLAB X and the XC32 compiler and build/debug code for a PIC32 Microstick II
  • Configure device settings (config bits) and system clock for PIC32 projects
  • Control GPIO and implement button/switch inputs with debouncing
  • Use timers, interrupts, and PWM for timing and control tasks
  • Read analog signals with the ADC and send/receive data over UART
  • Assemble simple breadboard projects and troubleshoot common hardware/software issues

Topics Covered

  1. Introduction: PIC32 and the Microstick II platform
  2. Getting Started: MPLAB X IDE and XC32 compiler setup
  3. C Refresher and project structure for PIC32
  4. Device Configuration: config bits and clock setup
  5. Digital I/O: LEDs, switches, and breadboarding
  6. Timers and Delays
  7. Interrupts and interrupt-driven design
  8. Analog: ADC basics and reading sensors
  9. PWM and basic motor/servo control
  10. Serial Communication: UART basics and PC interfacing
  11. Sample Projects: combining peripherals into applications
  12. Debugging and troubleshooting techniques
  13. Appendices: parts, schematics, and reference snippets

Languages, Platforms & Tools

CMicrochip PIC32MX250F128BMicrostick II module (Microchip)MPLAB X IDEXC32 compilerMicrostick II built-in programmerBreadboard and basic electronic components

How It Compares

More beginner- and project-focused than Lucio Di Jasio's 'Programming 32-bit Microcontrollers in C (PIC32)', which is deeper and more exhaustive; Kibalo prioritizes quick hands-on results and simpler hardware setups.

Related Books