In this tutorial, you will learn how to program a PIC using in-circuit serial programming with the MPLAB® Snap debugger/programmer. This will be critical for your semester project as you will be working with a surface mount microcontroller that cannot be easily removed for offboard programming and does not have a USB port.
At the end of this tutorial you will be able to:
Item | Description |
---|---|
In-circuit debugger/programmer | MPLAB® Snap (3-D printable enclosure) |
PIC 18F47Q10 microcontroller | Part Website (datasheet) |
Voltage Regulator | Can use either the adjustable regulators located at the lab benches, or one on your breadboard. Set to 3.3V |
Breadboard | |
Resistors | Various, as described in the datasheets below |
Capacitors | Various, as describedin the datasheets below |
Jumper wires | |
Micro USB cable | |
Male to male header |
Read and search the MPLAB® Snap In-Circuit Debugger User’s Guide to find answers to the following questions:
Read and search the Pin Diagrams and ICSP™ sections of the PIC18F47Q10 Datasheet to find answers to the following questions:
Set the BK Precision DC power supply to output 3.3V. Then, turn off the power supply before connecting it to your circuit.
Wire up your breadboard to connect the Snap and the PIC18F47Q10-I/P according to what you learned above. Make sure to connect all of the VDD and VSS pins in addition to the external 3.3V power supply. Whenever there is conflicting hardware configuration information between the Snap manual and the PIC18F47Q10 datasheet, follow the PIC datasheet as every PIC is a bit different and the Snap works with a number of different PICs.
Tip: If you attach an 8-pin male to male header to your breadboard (or PCB) then it makes it easier to quickly connect and disconnect the Snap from your circuit. |
Launch MPLAB® X and create a new project. Set it up for use with the 18F47Q10 DIP version
Note: Other tutorials provide more detail regarding project setup.