Instructables

How to program a AVR (arduino) with another arduino

Step 5: Burning USBtinyISP firmware to an attiny2313

done.png
attiny2313isp.jpg
The USBTinyISP is a great programmer from LadyAda thats really cheap - 22$.
I had a spare attiny2313 and some parts so i decided to make one myself. If you don't have any experience in making PCB i advice you buy the kit cause it's higher quality than you can make yourself :). At least buy the PCB if you want to build one. You can get it from Adafruit.

Connect the ATtiny2313
In the last picture you can see the attiny2313 with the pins used for ISP in red. The picture is from LadyAda avr tutorial.

Burning the firmware:

Unpack the USBTinyISP firmware.

Go to the spi dir and run
$ avrdude -p pt2313 -P /dev/ttyUSB0 -c avrisp -b 19200
to check if everything is ok with the chip.

Now set the fuses:
$ avrdude -P /dev/ttyUSB0 -c avrisp -b 19200 -pt2313 -U hfuse:w:0xdf:m -U lfuse:w:0xef:m

Now you should attach the 12mhz external oscillator to the chip.

And burn the firmware:
$ avrdude -B 1 -pt2313 -U flash:w:main.hex -P /dev/ttyUSB0 -c avrisp -b 19200

Voila. Your attiny2313 has the USBTinyISP firmware.

 
Remove these adsRemove these ads by Signing Up
KarolisL1 year ago
Hi,

can you help me?
PC doesnt see my programmer. Everything is ok with wiring. I think i did something bad with firmware burning.

As i understood i should insert hex from spi folder only or I should compile makefiles in 1 hex from all folder?

Can u upload hex which you used?
Hi kabturek, I'm a little confused on this part. I'm not quite sure through what you're sending the commands to upload firmware onto the ATTINY2313. Are you using the Arduino as an AVR programmer to upload the firmware or are you using a USBTinyISP that you bought to upload it? And after this, don't you still need the hardware support files to upload an Arduino sketch onto the ATTINY2313? Help on this section would be much appreciated.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!