My hall has some attiny13a chips lying around, so I decided to give it a go programming them last night. Here’s my adventure of learning how to program a AVR.
I didn’t have a serial cable or a programmer, but I heard you could program these with an arduino as an ISP, and I had one of those. I turned an arduino nano into a programmer using a tutorial provided by the High-Low Tech Group at MIT.
One thing to note about the tutorial is that you should upload the program that runs the arduino as an ISP before wiring up the pins of the arduino per the tutorial’s diagram. Specifically, the wiring calls for a capacitor to disable the reset switch of the ‘duino. If you drop this cap in before uploading the ISP program, your computer won’t be able to reset the ‘duino to run the bootloader to upload the program. Rather, the capacitor is useful after uploading the ISP program. After the ‘duino ISP is running, the cap keeps the ‘duino from being reset by the computer, so the ‘duino can instead reset the AVR. I was confused by this, and it wasn’t immediately obvious what was going on without considering the ‘duino is reset before uploading programs to it.
Next, I also wanted to use the arduino IDE also to program the tiny. To do this, I followed instructions provided by another hacker which draw on instructions from the same group at MIT but update them for compatibility with the attiny13a. Here’s the result.
These are pretty cute.