Introduction
There are three main pieces you will need in order to get started: software, hardware and documentation. We'll cover each of these in detail here. If you are unfamiliar with the 8-bit PIC® MCU, then you might consider also reviewing the training module Get Started With The PIC16F1xxx MCU which provides a detailed understanding of the 8-bit architecture.
Software
The software breaks down into two parts: the software for creating the application code, and the software to convert that application code into the 1's and 0's the PIC MCU needs to run the application.
MPLAB® X IDE
The MPLAB® X Integrated Design Environment (IDE) is an application that is free to download. It includes:
- Full-featured editor
- Direct control of the compiler
- Direct control of the programming tools
- Debug capability with breakpoint, single-step control and data display
- Total project organization through a simple folder system
This is just a brief summary of what MPLAB X IDE is capable of. It will become the main software interface you will use to develop your Microchip 8-bit PIC MCU applications. For more detail on all the features of this software tool, there is a separate training module - Get Started with MPLAB X IDE and Microchip Tools.
This tutorial provides the basic features you need to get your first project running on MPLAB X IDE.
XC8 Compiler
The MPLAB XC8 Compiler is a C language compiler that converts your C code application into the 1's and 0's the PIC MCU needs to run. The compiler is a separate software application from MPLAB X IDE, but is easily integrated into the IDE's control and operation. Using the MPLAB X icons, your application can be automatically compiled through the XC8 compiler and sent to the hardware programmer.
If you are not familiar with C language, there is a separate training available for that as well - Fundamentals of the C Programming Language. This module doesn't focus on the XC8 compiler specifically, but the C language is covered so you can understand how to write your own C language programs.
This tutorial provides the basic C structure for the projects. The MCC will handle all the behind the scenes C code you need to get an application running.
MPLAB® Code Configurator
The MPLAB Code Configurator (MCC) is a free plug-in of the MPLAB X IDE. The MCC uses a Graphical User Interface (GUI) for developing PIC MCU application code. It allows you to make selections through the GUI interface and then, with a single click of the "Generate Code" button, XC8 code will be produced for all the setup and driver utilities needed to make the application run on a PIC MCU device. The only section left for you to create is the custom main.c file application code which uses a varied library of functions produced by the MCC.
This tutorial focuses on using the MCC to produce many different projects to help you get started with producing your own PIC MCU based applications.
Hardware
Sending the binary 1's and 0's file, ultimately delivered as a .hex file to the PIC MCU is handled by a hardware programmer. The PIC MCU can be placed in a breadboard for development, but to make development easier, there are many different development boards available to handle the interface to the PIC MCU. We will use a few here and more will be added in the future.
PICDEM™ Lab II Development Board.
The PICDEM™ Lab II Development Board is a development and teaching platform for use with 8-bit PIC® microcontrollers (MCUs). At its center, a large prototyping breadboard enables users to easily experiment with different values and configurations of analog components for system optimization. Several external connectors allow for user-customizable expansion, while our library of labs and application notes enrich the development experience. The PICDEM Lab II Development Board is also fully compatible with our latest software development environment.
Hardware Programmer
There are different types of programmer/debugger tools offered by Microchip including:
Any of these can be used, but all the projects found here use the low-cost PICkit™ 3 In-Circuit Debugger.
All of our debuggers and emulators have their driver software installed with MPLAB X IDE. Hence, there is no additional installation step to use these tools. All you need is a USB connection on your computer where MPLAB X IDE is installed.
Documentation
The documentation for this module is this series of online training pages which guide you through the sample projects. Additional documentation is linked from the respective project page. Datasheet and schematics are linked into the detail for each project and information specific to the project is presented graphically.