MPLAB X IDE is Microchip's comprehensive development environment supporting all PIC, AVR, and SAM microcontrollers. This guide walks through installation, configuration, and first project creation.

Installation and Setup

System Requirements

  • Windows 10/11, macOS 10.14+, or Linux (Ubuntu 18.04+)
  • 4GB RAM minimum (8GB recommended)
  • 2GB free disk space
  • USB port for debugger connection

Download and Install

  • Download MPLAB X IDE from Microchip's website
  • Install the IDE with default settings
  • Download and install XC8, XC16, or XC32 compilers based on your target architecture
  • Install MPLAB Code Configurator (MCC) plugin for 8/16-bit PIC
  • Creating Your First Project

    New Project Wizard

  • File → New Project → Microchip Embedded → Standalone Project
  • Select your device (e.g., PIC18F46K22, ATSAMD21G18A)
  • Choose your hardware tool (PICkit 4, ICD 4, etc.)
  • Select compiler toolchain (XC8, XC16, XC32)
  • Name your project and select location
  • Project Configuration

    • Set configuration bits (oscillator, watchdog, etc.)
    • Configure memory regions
    • Set optimization levels
    • Include necessary libraries

    Debugging Basics

    Setting Breakpoints

    • Click in left margin to set breakpoints
    • Conditional breakpoints supported
    • Data breakpoints on variable changes

    Watch Variables

    • Add variables to Watch window
    • View in hex, decimal, or ASCII
    • Real-time variable monitoring

    Single Stepping

    • Step Over (F8): Execute current line
    • Step Into (F7): Enter function calls
    • Step Out (Shift+F8): Exit current function
    • Run to Cursor (F4): Execute until cursor position