I just received the USBtinyISP and put it together and it works great! I got it to program the atmega168 to use with the Arduino. After some trial and error, I finally got it programed, so I thought I would share how to do it.
Wolf Paulus' entry really helped me out,
http://wolfpaulus.com/journal/embedded/arduino2.html
I just modified his code to work with the USBtinyISP.
1. Unlocking the boot loader segment, erase the chip, and set fuses (set boot loader size to 1024 words [=2KByte]: 0xE00-0xFFF, set clock speed to external 16 MHz)
2. Uploading the boot loader
3. Re-locking the boot loader segment
- Code: Select all
avrdude -c usbtiny -p m168 -B 5 -V -e -U lock:w:0x3F:m -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m -U efuse:w:0xF8:m
avrdude -c usbtiny -p m168 -B 1 -V -D -U flash:w:ATmegaBOOT_168.hex:i
avrdude -c usbtiny -p m168 -B 5 -V -U lock:w:0xCF:m
EDIT: try different -B values if you're having issues. Thanks! -ada

