A small percent (see: https://www.avrfreaks.net/index.p...) of Butterfly users have experienced an error when programming the Butterfly. This error has the hex number 0x940c in the error message and basically means the Butterfly Bootloader is temporarily futzed and the bootloader will have to be reloaded with an ISP programmer. This is simple to fix. There have been many posts in a variaty of threads on this topic and it has become difficult to find the latest information on the problem. So the purpose of this tutorial is to post what we think we know. Please add your thoughts to the thread and I'll update this first post to keep users abreast of the problem.
* The newer (date unknown) Butterflies have a bootloader that allows setting lock bits. Earlier Butterflies did not have this capability and do not suffer the 0x940c error (I think).
* The problem seems to occur most reliably when the power drops below 2.7V while the bootloader is running. Since the RS232 communications use a lot of power, even a seemingly healthy battery might glitch during the bootloading causing the power to drop, the code to run wild, and the bootloader to set a fuse preventing further bootloading.
* Some folks have observed this problem when they pressed the joystick while the bootloader was running.
* Do not use the coin cell battery to do bootloader programming. It will drain rapidly and can cause the problem.
* Do not use rechargable external batteries in lieu of regular batteries. Two regular AA batteries produce above 3v, while some rechargable AA batteries only produce 2.5v
* If you use a regulated wall wart, make sure you filter the output. I recommend a 220uF cap between V and GND.
* If you use an external power supply of any type and a voltage regulator such as an LM317, then in addition to the 220uF cap, you must have a current sink to keep the regulator regulating since the Butterfly will not draw enough current and the regulator will bounce about. One way to do this is to use a power indicator LED to draw 6 mA.
*Any AVR programmer should fix the problem. I recommend using the Butterfly code from Martin Thomas' web site:
More specifically for the old (and better) bootloader:
*If you can't beg, borrow, or steal an AVR programmer, then send your Butterfly to me and I'll reprogram it for you. You pay all the shipping. (No guarantees since your Butterfly might really be zapped)(Also, I am insanely busy so it may take a few days for me to get to it.)
*Giorgo_k has made a bootloader without lock bit setting. It has the added advantage of being very small, thus freeing up an additonal 1k of space for your programs. You can get this at: https://www.avrfreaks.net/index.p...
*There is a post below by gutzeit that discusses a quick hardware construction project to fix this problem. He says he was able to do it in 3 hours, so give it a look if you are hardware oriented.
*On the second page of this thread, Cell "hacked together the 'bsd' programming cable as described here:
http://www.bsdhome.com/avrdude/ " He includes a picture and a link to a website with further pictures. Looks like a good cheap way to reprogram Butterflies, if you have a parallel port.
Just in (3/6/05) from Andreas at Atmel:
We have now reduced the functionality of the AVR Butterfly bootloader (ie. removed the possibility to program the lockbits). This should prevent people from encountering this problem. We have testet this bootloader on several Butterflies here in the office today and even when deliberately trying to program the lockbits, we were not able to change them.
I have attached the new bootloader to this post and notified our manufacturer, so that new Butterflies will be shipped with this bootloader.
Atmel AVR Technical support
Link to the download: https://www.avrfreaks.net/index.p...
This hopefully will fix the problem in the future.
*TODO - TUTORIAL ON DOWNLOADING THE OLD BOOTLOADER - COMING SOONER OR LATER
AND LIKE I SAID ABOVE, USEFUL CONTRIBUTIONS TO THIS THREAD WILL BE ADDED TO THIS TOP POST. SO PLEASE CONTRIBUTE.