PIC32 Tutorial – Part 2 – Ingredients

Josef van Niekerk" rel="author">Josef van Niekerk

Let’s look at the tools and components that we’re going to need to get our breadboard setup going. It’s really simple, and doesn’t require a lot of parts at all. This is the 2nd part of the PIC32 Tutorial, if you missed Part 1, your can read it here.

First of all, you’re going to need a breadboard. Any kind should do. The setup requires only one voltage supply of 3.3V, so I’ve connected my power and ground rails all around the board as in the image below.

[responsive imageid=’95’ size1=’0′ size2=’600′ size3=’1000′]

Next grab a couple of jumper wires. You’re welcome to use a jumper wire kit, but I prefer keeping prototypes as clean, with wires as short as possible. Keeping wires short will reduce stray capacitance and inductance. I’m also avoiding wires that loop all over the board that are easy to hook by accident and disconnect causing headaches and unwanted hair loss. I normally prepare my wires as I go along, using red wire for my voltage supply, and black for ground.

Solid core wire of the right thickness, that inserts into the breadboard firmly is recommended. Stranded wire can be a nuisance when getting the individual strands bent in all the wrong directions when you try to insert them into your breadboard. If you’re using solid core wire, avoid gauges that are too thin, as they might cause intermittent connections if the wires move and wiggle about, causing endless frustrations with debugging your circuit.

I’ll be using stranded wire, as that’s all I could find at my local supplier, so I’ll be spending loads of time twisting the stripped ends…

Bill of Materials

Our short and sweet BOM will comprise of the following:

[responsive imageid=’92’ size1=’0′ size2=’600′ size3=’1000′]

Quantity Component Value
4 Ceramic Capacitor 0.1µF
1 Tantalum Capacitor 10µF
1 Resistor 330Ω
1 Resistor 460Ω
1 Resistor 10kΩ
1 6-pin Right Angle Pin Header
1 PIC32MX250F128B

The list is short, and with just over ten components, you’ll see getting the PIC32MX250 started up, is going to be real simple indeed.


You’re going to need a programmer of some sort. No, I’m not referring to someone who knows how to code. We need some hardware, to get the firmware we’ll be writing on the other hardware…

I’m going to be using my brand new replacement PICkit 3 from Microchip. My first PICkit 3 caused endless problems, and I had to replace it under warranty, as it was throwing all kinds of errors when I attempted to connect to various different PIC MCUs.

[responsive imageid=’200′ size1=’0′ size2=’600′ size3=’1000′]

Any programmer compatible with MPLABX should work just fine. Ideally, I’d like an ICD 3 or REAL ICE programmer/debugger for Christmas, but beggars can’t be choosers. I’m not too sure whether a PICKit 2 will work, as I believe they support only a limited set of PIC32 MCUs. The most affordable solution, and safest bet would be the PICkit 3, and that’s what we’re going to stick to.

Note that there are loads of 3rd party clones available, and even ones you can build yourself. But, sticking with the Microchip stuff should deliver the best results. Feel free to experiment with 3rd party goods to your hearts content.

Integrated Development Environment

Lastly and most importantly, we’re going to need an IDE. MPLAB X is an IDE developed by Microchip, and is based on NetBeans. It is a handy tool to write, compile and program your MCU with. It also offers some debugging features, that allows you to set breakpoints on your code, and step through code, one line at a time, with the useful ability to view what’s going on in your MCU’s memory and registers.

I’m pretty sure that you should be able to use any text editor or even an open source IDE like Eclipse CDT to write and code with. The only issue is, that you probably won’t be able to use the advanced debugging features. Eclipse is known to be one of the best IDEs available, especially for C and C++ development, but unfortunately, I don’t think it’s debugging toolset will be able to understand commands and know how to communicate with the PICkit programmer/debugger. Also, you could use editors like Sublime Text, but then again, you’ll need to compile your firmware from the command line or write a plugin.

We’ll cover installation very briefly a bit later in the tutorial, but for now, you can start downloading the IDE at Microchip’s MPLABX page in the background. There is a Mac, Linux and Windows version available. While you’re at this page, also download the XC32 compiler, we’re going to need that too.

In Part 3, we’ll cover the schematics, and minimum requirements to get things setup.