The featured image of this post is based on a picture by Here and now, unfortunately, ends my journey on Pixabay on Pixabay

… to screw in a lightbulb? The correct answer to this question is: “None, this is a hardware problem!” But then: This is not the right question! The right question is: “How many ISP programmers do you need to burn a program into flash memory?”

The right answer in the Arduino universe is again: “None.” The reason is a bit different, though: “Because you have a bootloader!” However, the ATtinys do not have bootloaders, and sometimes you have to replace a bootloader (see previous post). So, once you get serious about embedded programming, you need an ISP (in-system-programming) programmer. Now, it is, of course, enough to have just one such programmer. But then, over the years, I bought some, and I also built a few on my own. Let me go through the gallery and tell you, whether I would buy them again these days.

mySmartUSB MK2

In 2010, when I started the journey into embedded computing, I did not buy an Arduino Uno. Why? Simply because I was not aware of them. Instead, I bought a soldering iron set, a myAVR KreativSet, and a mySmartUSB MK2. This is an ISP programmer and a UART/I2C/SPI bridge. I am not sure, whether this was the best choice, but it worked for doing the first steps. The programmer/bridge works best with the myAVR software, but the programmer can also be used as an AVR910 programmer by, e.g., avrdude. The company now sells an updated version, called mySmartUSB MK2b, for the same price I paid more than 10 years ago: €28. These days, I would not buy it again. If you are not planning to use the myAVR software, there are cheaper alternatives.

guloprog: A USBasp programmer

The cheapest and most minimalist programmer is the one I bought in 2013 from guloshop, the guloprog for €4. You can plug the PCB directly into a USB receptacle., but with the full kit, you also get a USB cable. It uses an ATtiny85 with the USBasp firmware designed by Thomas Fischl. While version 1, which I bought, had a 10-pin ISP header, the version 2 programmer has a 6-pin header (which everybody uses by now) and the pure PCB version costs €4.50. The complete kit with ISP header and USB cable is €4.95. The only problem is that you have a fixed voltage of 5 V. So if you want to program a 3.3 V target, you have to become creative, e.g., remove all parts that are not 5 V tolerant, before you start to program. Would I buy one of those again? It is great as a giveaway programmer, but I would probably look for a different programmer for my own work.

myMultiProg MK2

At the end of 2013, I bought an adapter called myMultiProg MK2 to program all the different AVR chips with a DIP socket (DIP8, DIP14, DIP20, DIP28, DIP40) off-board, provided they understand the ISP protocol. So technically, it is not a programmer. You either need a programmer of the myAVR family or any programmer with a 6-pin ISP cable. The good thing is that you can plug the MCU in order to program it. Furthermore, there is also an external crystal, which can be used if the fuses have been set in a way so that such an external crystal is necessary. Would I buy this adapter board again? Probably not! I meanwhile have a HV programmer with many different DIP sockets. So I can initialize (and resurrect) all MCUs that have a DIP socket. ISP programming itself is something, I usually do on board.

Bus Pirate

In 2014, I bought a Bus Pirate. This is actually a little tool that can be used for a lot of different things, listening and talking in many different protocols, such as I2C, OneWire, SPI, UART, you name it. It also can act as an ISP programmer. However, I must admit, I never used it as a programmer, though. So maybe it shouldn’t show up in this list. It costs around €30, and you spend a few bucks more for the probes and perhaps an acrylic case. Would I buy one of those again? I am not sure. It is nice to have the ability to actually generate signals for the different protocols or to sniff them. However, you can get by without it, since there are enough programs for Arduinos around for generating the signals, and it is enough to have a logic analyzer for sniffing (provided it has a protocol decoder). So, probably, I would not buy it again.

Another USBasp programmer

In 2015, I tried one of the Chinese USBasp programmers. It is able to switch between 3.3 and 5 volts. And it is not only the supply voltage that is changed but also the signal lines. It came with a cable and a 10-to-6-pin adapter. So basically everything you want for just €7.08, postage included. It took, of course, a few weeks since it was sent from China. Meanwhile, I have seen the same programmer for €4.99, postage included from a German eBay shop. I think, it is a good choice when you want to buy your first programmer, and you are budget-conscious.

DIAMEX USB-ISP-programmer for AVR

In 2019, I bought a new programmer, an STK500v2 compatible programmer in a nice acrylic case with 6- and a 10-pin ISP header. It has two DIP switches, which can be used to select the target voltage and whether the voltage should be applied to the target. Actually, when the supply is supposed to be disconnected from the target, the Vcc pin shows a voltage of 2.5 volts. Why this is the case, the support people couldn’t explain. And in any case, it does not hurt. The programmer cost around €20 when I bought it, now it is €22. It is quite a robust device. However, it only can program AVRs with the ISP interface, i.e., it does not speak TPI, PDI nor UPDI. Would I buy it again? This is not clear yet. The Atmel-ICE that I bought recently is faster (three times) and has many more features. However, it seems to be a good idea to have a backup.

Atmel-ICE

The Atmel-ICE is the premium programmer/debugger you can get when you want to work with AVR and SAM chips. Recently, Microchip came up with the SNAP programmer/debugger that is much cheaper (but it neither has any cables nor an enclosure). Atmel-ICE comes in three different versions:

  • ATATMEL-ICE-PCBA: Only the PCB, no cables, no enclosure,
  • ATATMEL-ICE-BASIC: Basic version with ISP- and USB-cable (good for AVRs with ISP programming),
  • ATATMEL-ICE: Includes encapsulated programmer with all cables, e.g., also for programming SAM MCUs and for JTAG debugging.

Recently, Waveshare came up with its own version (using the original PCB from Microchip), which they call Atmel-ICE-C. They put the PCB into an aluminum alloy enclosure and included all the cables of the standard ICE. As a bonus, it is cheaper than the standard ICE. The best thing about the ICE is that it uses USB as an HDI device and therefore is not prone to the effect that the USB serial interface lines always get new names under macOS, which is quite annoying when you have to set the serial interface name somewhere in a preference menu.

I got this particular Atmel-ICE-C from welectron, who appear to have very competitive prices. The basic version is available for €89, and the C version for €109. Would I buy it again? Well, I hope to use it to debug my systems in combination with Microchip’s MPLAB IDE. But let’s see and wait.

Fusebit Doctor

When it comes to resurrecting AVR chips with wrong fuse bit settings (see also my post on fuses), you need high-voltage programming. Unfortunately, there exist only the quite expensive STK500/600 boards by Microchip. For 8-pin AVR ATtinys, there exists the HVSP programmer by guloshop. And then there are a number of DIY boards (try out searching for HVPP and HVSP at tindie.com or eBay). I guess, the most famous one is manekin’s Fusebit Doctor, where the original web pages are meanwhile only accessible via the wayback machine. In 2013, I ordered a few redesigned PCBs in China. Interestingly, the PCBs contained two missing connections but worked most of the time (argh!). Instead of using the original (binary only) firmware by manekin, I wrote an Arduino sketch called RescueAVR that can also be used as a stand-alone program on a breadboard-based “fusebit doctor”. Would I build such an HV programmer again? Yes! I think it is a very valuable addition to my set of programmers. I usually collect “dead” AVR chips and then resurrect them once a year. And it wasn’t really expensive. I believe, less than €30. And I had most of the components in any case.

avrburn on a Gamebuino META

Finally, let me tell you about a little gadget I built in order to be able to flash MCUs in the field. And when I say “field”, I mean it (see photo). When I visited my geocaches in order to burn a new firmware, I had to take my notebook and a programmer in order to change the firmware. I thought that it would be much more convenient to have a small programmer that is nevertheless able to program single fuse bits (with a menu similar to the AVR® Fuse Calculator). I started to think about using a Gamebuino, but that was not powerful enough to support a large number of menus as it is needed with all the different fuses.

In 2018, I bought a Gamebuino META, the successor of the Gamebuino (now called CLASSIC). The specs of the META are just right:

  • 1.8” color display: 160 x 128 pixels,
  • SAM21D processor,
  • Arduino-compatible 8 GB memory card with 10 preinstalled games,
  • 1000mAh rechargeable battery.

Over a year or so, I then developed an ISP programmer as an additional “game” for the Gamebuino. The only problem was that the Gamebuino uses 3.3-volt logic and does not have 5-volt tolerant inputs. For this reason, I also developed a “backpack” board with level shifters. Now you can program any AVR MCU in the field, regardless of whether it is sourced with 3.3 V or 5 V.

The big question is whether it was worth the effort to build this system. Well, in the past years, I did not have many firmware updates in the field. And if I upgrade my firmware, I usually test the system at home before I deploy it. So, probably it was not worth the effort. However, as usual, I learned a lot. If anybody is interested, you can find the sketch and the Eagle design files in my avrburn GitHub repository. Further, I still have two leftover PCBs, if you need one.

Views: 24