MPLAB® SNAP¶
The Physical MPLAB® SNAP board¶
In my odyssey trying to find a low cost off the shelf debugger, I kept coming across the MPLAB® SNAP. The following features compelled me to buy one to experiment with:
- Low cost of ~$35.00
- Free MPLAB® X Integrated Development Environment (IDE) software that runs in Linux,macOS, and Windows)
- Debugging and programming of PIC, AVR, and SAM Flash MCUs used in Fab Academy
- Target voltage of 1.20V to 5.5V
- Powered by a high-speed USB 2.0, no external power required
- Under active development and support (As of Oct 2022)
The price was very good compared to the Atmel-ICE which costs ~$80 for a bare board.
These features were enough for me to order a MPLAB® SNAP board from Newark for $34.76
MPLAB® X IDE¶
The MPLAB® X Integrated Development Environment (IDE) software looked interesting and helpful. Because of the following features:
- Plugins like the MPLAB Code Configurator (MCC) a free graphical programming environment
- MPLAB v3 is the migration path from Atmel Studio (a clunky windows only software)
I followed the guide Installing MPLAB® X IDE to get the MPLAB® X IDE setup on my Linux Mint OS. The guide has really nice easy to understand icons and tabs for helping you to download install on all common computer OSes, Nice!
Note: that you need to replace the vX.XX with the version matching your download file.
For example I changed
sudo ./MPLABX-vX.XX-linux-installer.sh
to
sudo ./MPLABX-v6.00-linux-installer.sh
Ummm well this was one of the smoothest installs of microcontroller software I have had. However there was an awful closed source proprietary license agreement which takes a sh*t on open source in one of the clauses. The software install wizard also has buttons for sharing info selected by default, I clicked them all off. If the IDE is easy to use for my elemnatary, middle and high school students however, I will be ok.
Also a pop up window message at the end of the installation worried me a bit, would it mess up my usb drivers for my other scratch built programmers. Or maybe the opposite would occur, would they work better? In addition section 9 of the install guide had some worrying security concerns.
Reboot Advised The udev rules have been updated. Some distributions require that you re-start your computer for the changes to take effect otherwise USB communications and/or hotplug will not work.
In step 9 they had all kinds of fancy terminal work with old school text editors, I did this the modern way instead navigate using the file explorer to /etc/systemd/system/systemd-udevd.service.d/ right click and open as root. Right click in the new elevated privileges window and “create new document” “empty document” Cut and paste this into the document editor: ```[Service]
IPAddressAllow=localhost```
save the document as override.conf, close it.
Then re-start the service: sudo systemctl daemon-reload
Finally check the override.conf has been loaded: sudo systemctl status systemd-udevd
which returned this:
…
● systemd-udevd.service - udev Kernel Device Manager
Loaded: loaded (/lib/systemd/system/systemd-udevd.service; static; vendor >
Drop-In: /etc/systemd/system/systemd-udevd.service.d
└─override.conf
…
Which means the override.conf file was working
The executables for MPLAB X were installed here /opt/microchip/mplabx/v6.00/mplab_platform/bin on my computer, which is a bit different than outlined in the install document. I just guessed correctly and found the mplab_ide file there could be double clicked to run.
put window MPLABXIDE01.png image here xxxx
Once in the MPLAB X IDE, I navigated to Import Prebuilt, then followe the wizard
Prebuilt Filename: TinyPugBoardLED.ino.hex (prebuilt from adrunio ide) Family: 8-bit AVR MCUs (XMega/Mega/Tiny) Device: ATtiny3226 Hardware Tool: Snap-(SN:your boards serial number)
Note if you can’t see your Hardware Tool (Snap in this case) in the pull down, then your board is not connected or you need to re-visit step 9 in the installation instructions.