Last night, the absent-far-too-often urge to fire up the soldering iron and make something hit me, so I warmed up the Weller and did this:
Soldered one of @EMSL ISP shield kits together tonight, and burned a bootloader on 328. #babysteps pic.twitter.com/0vXo2Wewie
— Mark VandeWettering (@brainwagon) February 24, 2015
I bought this kit quite a while ago, and it has been sitting on the shelf mocking me for a long time. It’s available from Evil Mad Science for a reasonable $13 or so, and is a very easy kit to assemble, consisting of a crystal, three caps, and seven resistors, plus some headers. My soldering skills are a bit rusty, but it wasn’t difficult, I had it done in a leisurely 40 minutes or so, including my hunt for some bare ATMEGA328s that I had stashed in a box somewhere.
If you aren’t really up on this, you might ask “okay, what does it do?”
Long time readers of my blog may remember that I had previously used an Arduino as a programmer, in that case to program some small 8 pin Atmel chips like the ATTINY13 or ATTINY85. These chips are too small to use the regular boot loader that is common on the ATMega328 chips that are used on the Arduino, so you need to use the ISP (or In System Programming) method to get software onto the chip. If you want to program the Arduino bootloader onto a bare ATMega328 chip, or write software directly to such a chip, you also need to use the ISP interface. If you have a breadboard, you can pretty easily set up the programmer, but it’s a little inconvenient: I have to look up all the right jumper wires, double check them, maybe wire up a crystal oscillator, it’s just not fun. Hence, this shield. You plug it into an Arduino (I used one of my oldest Arduino Duielfoovena, whatever that word is) and flash the AVRISP sketch that comees with the Arduino software, and voila, you are ready to program. It has a nice ZIF (zero insertion force) socket, which allows you to insert your 28 pin DIP (either a ATMega328 or ATMega168) and has four LEDs that can serve as status indicators. If you want to burn a bootloader onto a chip, you select the “Arduino as ISP” Programmer type, and then tell it to burn the bootloader. Voila!
The ISP also includes the classic six pin header that you can use to jumper to any Atmel board that provides such a header, and you can program the chip inside the system, including non-DIP versions.
So, why would you want to do this?
Well, you can build your own Arduino compatible boards now, for much less than what you would typically pay (although, perhaps not cheaper than you could pay getting them from China). A bare ATMega328 costs about $3.50, which isn’t super cheap, but it won’t break the bank either. Add in a little 5v or 3.3v regulator, two caps and a crystal, and for less than 5 dollars in parts you can put together a homebrew microcontroller than you can program with the Arduino environment. Pretty useful if, say, you wanted to embed a little microcontroller in a radio project you wanted to try.
Apologies for the long gap between posts. I’ve got more stuff in mind, I’ll try to get back to doing more stuff and blogging more stuff.