| You are here: Hello world / Howto / Atmel AVR Butterfly Mini-FAQ for Linux | Mini-FAQ for the AVR Butterfly evaluation kit by Atmel for linux users. |
This is a collection of questions I asked myself and answers I gathered while experimenting with the AVR Butterfly evaluation kit by Atmel.
German visitors might prefer this translation.
My first contact with the AVR Butterfly was caused by the article Vielfältiger Schmetterling by Nils Faerber in the german Linux Magazin volume 2004/07.
Although I tried to make this page free of errors, nobody is perfect. If you notice a mistake, don't hesitate to contact me! Use the information on this page at your own risk.
Unfortunately there is an error in figure 1. You can find the right pin assignment on page 3-12 of the AVR Butterfly User's Guide. The pins are as follows:
| JTAG | |
| 1 | PB3/MISO |
| 2 | VCC_EXT |
| 3 | PB1/SCK |
| 4 | PB2/MOSI |
| 5 | RST |
| 6 | GND |
I've received the following figure from Walter Weber-Groß. Thank you Walter!
Yes! Regarding to the remarks by Martin Thomas on the above mentioned Linux Magazin article, it is indeed very advisable to prefer programming via serial cable and a bootloader.
The following steps are necessary to use the bootloader to program the AVR Butterfly via the serial port:
avrdude -p m169 -c butterfly -P /dev/ttyS0 -U flash:w:main.hexAs soon as avrdude connected to the bootloader, you may release the joystick.
Most probably you have unknowledgeable removed the bootloader while programming your AVR Butterfly via the parallel cable and isp. The next paragraphs guide you through the steps which are necessary to install a bootloader again.
Add the following to PREFIX/etc/avrdude.conf:
programmer id = "swppi"; desc = "Simple wire parallel port interface for ISP connector"; type = par; sck = 1; mosi = 2; miso = 11; reset = 16; ;
The numbers above describe the pins of the parallel port connector to which the four relevant wires are connected to. The numbers in this example correspond to the configuration described in table 2 of the Linux Magazin article mentioned at the beginning.
If you know what you are doing (or have an existing cable), you may of course use (slightly) different pins. See also the existing programmers in the configuration file named dt006 and bascom which are very similar, but use other pin configurations.
avrdude -p m169 -c swppi -P /dev/parport0 -U flash:w:main.hex
As described in the AVR Butterfly User's Guide, no special assignment is necessary (if you know what the pin assignment of a 9-pin serial connector is).
| AVR Butterfly | 9-Pin serial connector | ||
| RxD | 1 | 3 | TxD |
| TxD | 2 | 2 | RxD |
| GND | 3 | 5 | GND |
Try the page of Martin Thomas. Although he mainly describes the windows port of the gnu toolchain, most of the information is useful for linux users, too :-)
|
Author:
Tobias Jahn Public key fingerprint: 0556 B7D8 93FB 0304 B868 9FBA 3A71 E4F9 AE03 4AAD |
Last modification of this page: 2004-08-13 16:33 GMT Last generation of this page: 2007-06-16 20:26 GMT |
| Valid HTML 4.0! |