Just done a first pass of the butterfly version of the arduino12
You can download my files from http://www.brokentoaster.com/arduino012_butterfly.zip
Any thoughts or feedback most welcome.
Things you need to do to make it work:
* copy the files & folders into your arduino Hardware directory.
* change preferences.txt to upload.using=butterfly
This preferences file is found in this folder:
* /Users/<USERNAME>/Library/Arduino/preferences.txt (Mac)
* c:\Documents and Settings\<USERNAME>\Application Data\Arduino\preferences.txt (Windows)
* ~/.arduino/preferences.txt (Linux)
* push the button when uploading starts
* dont hold the button down the entire time.
Things to do in the future:
Butterfly library for
- light sensor
- check analog pins (jtag port)
- check digital pinouts on port b and D
- check all the timmings
- check it makes sense.
These are things I've done in the files to make it kind of work. They may or may not be necessary.
I tried using conditional compilation but I wasn't being picked up so I just copied the core and
made changes to that.
* added following to boards.txt to support as a target compilation board
* added Bf_boot to bootloaders dir
- copied hex from bf_boot up to bootloaders/bf_boot and renamed bf_boot.hex
* removed second external interupt from hardware/cores/arduino/WInterrupts.c: -> changes not picked up??
* changed boards.txt core = butterfly
- copied arduino core folder and renamed to be buttefly
- changes to hardware/cores/butterfly/WInterrupts.c
- changes to hardware/cores/butterfly/wiring.c TCCR0 - > TCCR0A
- changes to hardware/cores/butterfly/wiring_analog.c: In function 'analogWrite':
- changes to hardware/cores/butterfly/wiring_digital.c: In function 'turnOffPWM':
* added avrispv2 to programmers.txt
* added butterfly to external programmerswww.brokentoaster.com/arduino012_butterfly.zip