April 14, 2011
The instructions on the Arduino DFU update page are pretty vague when it comes to updating to the latest firmware using the Atmel Flip utility. Here’s what I did to get my Uno 8U2 firmware updated using Windows XP:
- Install Flip from the Atmel webpage. If you don’t already have a JRE, you probably want the 20 megabyte package that includes one.
- Download the 8U2 firmware. That’s the “Arduino-usbserial-uno.hex” file. The “UNO-dfu_and_usbserial_combined.hex” is the Arduino Uno bootloader firmware for the 328p. If you try installing the 328p firmware onto the 8U2 in Flip, you’ll get an error dialog:
Address is out of range.
- I ended up cutting & pasting the hex file contents into a text editor because I couldn’t figure out how to download a single file from github, and I didn’t want the whole 200 megabyte wad.
- Hook up wires and touch them to the right spots on the Uno at the right time as described in this Arduino forum post by pluggy.
Update: Pluggy’s image has disappeared. Here it is:
I found it at www.ardumania.es/reflashear-el-8u2/.
You’ll know you did it right when Windows detects a new device. It took me a few tries to keep the first wire steady enough when touching the second wire. Make sure you’re going to the right pads – you could short out your Uno if you touch the wrong place!
- After Windows detects the new device, you don’t have to hold the wires in place any more. Move them to the side so you don’t accidentally short out something.
- When the Windows device installer comes up, select “have disk” and install the Atmel USB driver. By default the Atmel USB driver is installed in C:\Program Files\Atmel\Flip 3.4.2\usb\atmel_usb_dfu.inf
- Notice that the driver is AT90USB82, not ATmega8U2
- Although it tells you that you have to reboot XP when you install the driver, I didn’t bother.
- Start Flip from the Program menu
- File->Load HEX file->Arduino-usbserial-uno.hex
- Settings->Communication->USB and press Open
- At this point, you should be ready to program. Press the “Run” button on the main screen.
- Programming is quick, taking about 4 seconds. After it’s done, remove the two wires you put in earlier, then unplug the USB cord and reinsert it.
Once you’ve done that, your Uno should be out of DFU mode and back into normal mode.
You can go to My Computer->Manage->Device Manager->Ports (COM & LPT), right-click on “Arduino UNO” and select “Properties”. Under the Details tab, Firmware Revision should now be 00.01.
Update: Someone mentioned they couldn’t find the atmel_usb_dfu.inf file. Looks like there’s a copy here.
April 9, 2011
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.