Arduino-izing the AVR Butterfly
Forgive me for converting Arduino into a verb, but I think this is actually acknowledging an existing fact: Arduino has evolved into an action rather than a thing.
It seems to me that Arduino started out applying the Wiring IDE, libraries and simplification of C syntax to a specific hardware platform with 14 Digital I/O and 6 Analog I/O pins. There seems to be a movement to retain the Arduino-ness of a device while moving to different pin numbers, such as talk of an ATmega644 or Xmega Arduino.
Personally, I think that this transition has the potential of either destroying the core value of the Arduino brand, or cementing is as the best way to get started with physical computing. I hope to be able to participate in this process by porting everything Arduino to the AVR Butterfly platform. But, I am very new with the Arduino, so I will need guidance.
What you lose by using an AVR Butterfly
Most of the available Butterfly pins are multipurpose so if you want to use them one way, you lose the ability to use them another way (see Butterfly Alternate Pin Use in the download menu of www.smileymicros.com).
For instance, the digital I/O pins on Port D which conform to Arduino pins 0 to 7 are available on the Butterfly for general purpose I/O on a 10 pin dual row pad (8 signal, 1 Vcc, 1 Gnd), but these lines are also used for LCD pins 9,11-16,18 so if you use them for digital I/O you will see the pin state reflected in those LCD elements. This probably won't hurt anything since LCDs use very little current, they won't affect the I/O for the alternate use. There is some concern that the LCD may be damaged if you keep a DC voltage on them for too long, but in my experience (and I have a lot with these things) I have yet to see any damage occur. Then again, I've never plugged one of these pins into a wall socket, something I'm sure some newbie will try.
Also, in order to get 14 digital I/O pins, it will be necessary to re-map Arduino pins 12 and 13 to Port E where we have pins 4,5,6 available.
Finally, we lose 2 of the 6 Analog pins.
What we gain by using the AVR Butterfly
We gain three Analog pins that are connected to sensors: a resister divider for measuring voltage, a NTC resistor for measuring temperature, and a light dependent resistor for measuring light. The latter can be left off the board and the pad can be used to replace one of the two analog pins we lost above.
We gain the 5-way joystick button and a piezo speaker (both at the expense of re-mapping pins form Port B to Port E).
We gain the LCD with the caveat that we can only use it if we are willing to sacrifice 8 of the 15 digital I/O pins in order to be able to use the LCD.
We gain a real-time-clock since we have a 32.768 kHz crystal that is used for calibrating the internal oscillator and can be used for accurate counting of seconds.
What needs to be done.
A Butterfly-Arduino library should be written to allow Arduino-style use of the LCD, joystick, speaker, sensors, and real-time-clock.
Investigate the clock speed to conform to Arduino. I'm not sure how easy it is to adjust Arduiono libraries for clock speeds other than 16 MHz, nor do I know off the top of my head how to adjust the Butterfly to run at 16 MHz which at first glance I think should be doable, but I'll have to dig a bit to see how.[edit]The ATmega169 in the Butterfly can be calibrated to 8 MHz, so I'll need to figure out how to make the Arduino libraries work at lower clock speeds.[/edit]
If it is possible to Arduino-ize the Butterfly, then I need to learn more about how to get this chimera approved by the owners of the Arduino imprimatur. I would like early information on this process since I was already well on my way to creating something similar and if what I am doing is not actually Arduino-able then I should get back on that track and not waste anymore time here.
Oh, and I promise that even though my last name is Pardue, I will not to call this thing Parduino.
So, what do you folks think?
Smiley