Adafruit Industries artwork

EYE on NPI - Microchip's MPLAB PICkit 5 in-circuit debugger

Adafruit Industries

English - January 04, 2024 00:00 - 10 minutes - 18 MB Video - ★★★★★ - 10 ratings
Education Homepage Download Apple Podcasts Google Podcasts Overcast Castro Pocket Casts RSS feed


This week's EYE ON NPI is the 'top' pick for the 'top' of the year: our first NPI choice of 2024 is Microchip's MPLAB PICkit 5 in-circuit debugger! (https://www.digikey.com/en/product-highlight/m/microchip-technology/mplab-pickit-5-in-circuit-debugger) This is the latest all-in-one toolkit for programming and debugging any chip available from Microchip, and believe us when we say there's a lot of chips available with different program/debug systems that need supporting! MCP purchased Atmel in 2016 (https://en.wikipedia.org/wiki/Atmel#Acquisition_by_Microchip_Technology) and since then has been slowly integrating Atmel chips such as AVR/SAM/ATtiny/ATmega into the MCP toolchains and workflows.

For that reason, the PICkit is powered by a advanced 300MHz ATSAME70 chip, which provides ICSP, MIPS EJTAG, SWD, AVR JTAG, AVR UPDI & PDI, AVR ISP, TPI and debugWire. To do that, there's an 8-pin 0.1" socket connector on the end, you're expected to select the right grouping of pins for whatever chip you're targeting. You can make a custom wire harness, but we think you might be best off also picking up the AC102015 Adapter Kit (https://www.digikey.com/short/tr3bhf52) which comes with every popular cable adapter.

OK since we are talking about a PICkit, it's not surprising that all of the PIC microcontrollers are supported - these use an "ICSP" programming method (https://ww1.microchip.com/downloads/en/DeviceDoc/30277d.pdf) with power, ground, two data pins and a VPP high-voltage line for FLASH reprogramming. We still use this interface to program chips like the PIC12 on the pixie 3W LED driver (https://www.adafruit.com/product/2741) This interface is ancient and will program basically every PIC12, PIC16 and beyond - Microchip was thankfully very consistent on this interface.

Of course, you probably are also using Cortex-based chips: these use JTAG and SWD (https://developer.arm.com/documentation/101636/latest/Debug-and-Trace/JTAG-SWD-Interface). Those are also supported! Since this is a programmer plug debugger, you can also connect SWO for trace. The same JTAG/SWD interface is used for programming and debug.
Supporting AVRs is also included, and for less than the price of the ATMEL ICE (https://www.digikey.com/en/products/detail/microchip-technology/ATATMEL-ICE-BASIC/4753381) you get all the same chips supported. Aaaand there's a lot more required to support the whole AVR family. For example, many small older ATtiny chips, you'll be using TPI (https://ww1.microchip.com/downloads/en/Appnotes/doc8373.pdf) because you only have a couple pins available. On newer ATtiny chips (and maybe even ATmegas) the async-uart-single-wire UPDI interface (https://onlinedocs.microchip.com/pr/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B-en-US-4/index.html?GUID-9B349315-2842-4189-B88C-49F4E1055D7F) is becoming more popular, that's available with an optional high-voltage mode which would let you use the UPDI pin as a reset pin as well. Standard ISP is supported for programming those Arduino compatibles you've got in a drawer, and there's also debugWire support! This was a one-wire debugging interface for AVRs that we never got to try out, so maybe now I will be able to! Don't forget you'll want that AC102105 Adapter Kit (https://www.digikey.com/short/tr3bhf52) to make wiring to various dev boards easier.

The most interesting new features that we haven't seen on other programmers is the 'Programmer To Go' field-reprogramming capability which allows burning full programming configuration files off of a micro SD card to any target, it can even be powered from the target if needed! Use MPLAB X to create the file that contains all the fuses and data to be transferred. Save to any FAT32 formatted uSD card, then on site you can press the button to re-program the device. The indicator LED strip will give some visual feedback so you know what it's up to. If you want more control over the setup, use the iOS or Android app to pair over Bluetooth, then select which file and also get error reports in readable text.

For any development needs you've got with PIC or AVR or SAM chips, the Microchip MPLAB PICkit 5 in-circuit debugger (https://www.digikey.com/short/fznt5mnh) is going to be the best and most-supported tool - being an official Microchip product means you don't have to worry about future chip support or historic chip maintenance. And best of all it is in stock right now at DigiKey for under $100.(https://www.digikey.com/short/fznt5mnh) Add one to your cart and it will ship immediately so you can be PIC'ing, debugWire'ing and UPDI'ing by tomorrow afternoon.