After building a USBtinyISP programmer to burn new bootloaders to my Uno (and other devices) I wanted to test it before putting it in the case.
Unfortunately, the obvious place talks about programming with WinAVR and other random things that you don’t care about when you’re hot to see if the thing actually works.
Here’s what I did instead (using a Windows XP machine, since that is what’s claimed to cause the least trouble):
- I downloaded the USBtinyISP drivers and unzipped them into a directory.
- I plugged the USBtinyISP in (before putting the programming cables / case on yet). It was recognized as a USB device, and I installed usbtinyisp.inf from the unzipped driver.
- I immediately tried to talk to the device using the Arduino 022 IDE and “Burn Bootloader -> w/USBtinyISP”. It failed with the error message “Could not find USB device 0x1781/0xc9f”.
- So I unplugged the device and plugged it back in. This time I got “Initialization failed, rc=-1” which is correct.
Whew, that meant my device was talking – in other words, I’d probably put it together correctly. Next was to see if it actually could program my Uno.
- I plugged the 6-connector programming cable in. The red stripe went on pin 1 of the silkscreen of the USBtinyISP, and the pin with a dot on it on the programming header of the Uno. (At first it looked wrong, but when I turned the cable around it was fine. The cable goes across the whole length of the Uno.)
- Then I made sure the jumper on the USBtinyISP was off (not supplying voltage).
- Next, I plugged the USBtinyISP into my USB port and verified that the green light came on.
- After that, I plugged in my Uno (to a different USB port) so it was getting power and was recognized.
- Finally, I went to the Arduino IDE and did Tools -> Burn Bootloader -> w/USBtinyISP.
- The red light came on for about two minutes to program my chip. After it turned off, I uploaded a sketch to make sure it worked – and it did. “Done burning bootloader.” Yay!
Finally, I put the 10-pin programming cable in and the case on. I had to push the LEDs around a little (the green one was getting pretty close to the USB header). Then I was able to snap the case on and catch my finger in there as well, removing a little skin I didn’t need.
That was it – I now had a good programmer. I did another program with the case on to make sure it worked and I hadn’t broken anything.
Next I’ll look on the Arduino firmware github page to see if there’s any newer boot firmware.