Objective
This page provides a basic interrupt exception code example for the PIC32MZ MCU. The project configures the Timer 2 period match interrupt event to trigger an ISR that toggles LED LD1 on the development board every 100mS.
The hardware for this project uses the ArduinoTM compatible chipKIT Wi-FIRE board from Digilent Inc.
Materials
Hardware Tools (Optional)
Tool | About | Purchase |
---|---|---|
| | |
| | |
| | |
| |
Software Tools
This project has been verified to work with the following versions of software tools:
MPLAB® X IDE v3.15, MPLAB® XC32 Compiler v1.40. The current versions of these tools will probably work as well, so try using them first.
Tool | About | Installers |
Installation
Instructions |
||
---|---|---|---|---|---|
Windows | Linux | Mac OSX | |||
MPLAB® X
Integrated Development Environment |
| | | | |
MPLAB® XC32
C/C++ Compiler |
| | | | |
Exercise Files
File | Download |
Installation
Instructions |
||
---|---|---|---|---|
Windows | Linux | Mac OSX | ||
Project and Source Files
|
| | | |
We recommend extracting the .zip to the following "root" folders:
Windows:
- C:
Linux:
- /home/<username>/MPLABXProjects
Mac OS:
- Users/<username>/MPLABXProjects
You should see an appended sub-folder "/MTT/32bit-mz-ef/code-examples/interrupt-usage" containing the project "interrupt-usage.X"
Procedure
Attach the debugger to the Wi-Fire board. Power up the board. Start MPLAB X.
Results
Conclusions
This project has provided an example of how to setup and use interrupt exceptions on the PIC32MZ MCU. For more information on the steps required to setup and configure interrupts on the PIC32MZ, please visit the PIC32MZ Interrupt and Exception Usage page.
Table of Contents
|