Instructables
What's with mint boxes and electronics? Beats me, but they are somehow made for each other. I had built ladyada's USBtinyISP v1.0 circuit on a breadboard which I used every other day. It worked sporadically(and never at hour of need), used up half of my breadboard and looked ugly. So I decided to try my hand at home PCB fabrication and build it in, of course, a tiny tic-tac box. Since I was a beginner, the circuit is easy and single-sided and uses crystal instead of ceramic oscillator.

Frankly, I didn't even expect it to work so didn't take any photographs. I recently decided to make it again with a few improvements(notice the old orange one has the top backwards) and document it for Instructables. You have to make one of these if you:
  • want to use bare-bones super-cheap arduinos in your projects
  • want to burn bootloader to a blank AVR for your Arduino
  • love working with AVRs
  • are thinking of buying a programmer

 
Note: You need to break out of the chicken-n-egg problem and get the program onto the ATtiny2313 used in this project. Check out  Step 4 for detailed information and possible solutions.

Edit: Modified board so resonator can also be used for timing! If using crystal, middle pin for resonator can be ignored. If using resonator, no need to solder capacitors C1 and C2.
 
Remove these adsRemove these ads by Signing Up
1-40 of 61Next »
principle1 year ago
Just finished mine works perfectly. I've had an old arduino uno in the draw for a while the usb on it dropped dead. TBO i though the entire unit was fried, I just brought it back to life with the Tic-Tac USBtinyISP Programmer. Usb on the uno is still not working but everything else is good, and now i can programme it again,

Thank you for the clear instructable, I'm new to making my own pcb's and i had a lot of fun making this one.

Cheers
Tic-Tac-USBtinyISP-Programmer.jpg
yours looks cool too
Antzy Carmasaic (author)  principle1 year ago
Woah! Can't believe someone tried out one of my crazy designs! And that looks awesome. Hard to believe you're new to PCB fabrication.

I also fried my Arduino long back. A change of IC brought it back, except for USB connection. Just like your case, Tic-Tac USBtinyISP came to the rescue. Later I tried DFU programming and managed to restore serial transmission from Arduino to PC, but could not fix PC to Arduino. That meant I still had to rely on USBtinyISP for programming but could now read serial data sent by Arduino.

You should give DFU a go. Here is the thread I started for it:
http://forum.arduino.cc/index.php?topic=127017.0;wap2
Hope it helps.

I'm really really really glad you made and shared it. :-)
Thanks for the tip i'll check it out :)

I actualy wanted to make your ArrDrownHo! which is what got me to this instructable, this one seemed easier so i decided to start with this. I'll be building the ArrDrownHo! this week i'll post the images as I go wish me luck with my first double sided board!

Thanks again
Dave
Antzy Carmasaic (author)  principle1 year ago
That's great. You'll love ArrDrownHo! Now I hardly ever use my Arduino as ArrDrownHo! does all that, and is also breadboard friendly. It's harder to solder than tic-tac USBtinyISP, and all the components are a bit crammed together but the end product will be worth it. Best of luck for the build.
Nichigo6 months ago

Hey ,

Tried to recreate the schematic on a test board ,bought new parts etc, but I'm always gettin the message "This device has malfuctioned , This usb device has not been recognized " and it doesnt appear in the Device Manager as USbtiny but rather as an unrecognized device with error code 43.Tested it on win 7 x64 , win 8.1 x64 , win XP x86 with the same success. The circuit is tested by multiple people including myself and it seems to be correct . Any thoughts on resolving this ? (Firmware appears to be installed correctly onto the chip)

the same for me :(
Antzy Carmasaic (author)  Nichigo5 months ago

https://learn.adafruit.com/usbtinyisp/drivers

Try downloading driver for USBtinyISP from this link. New signed drivers for 64 bit windows are now available!

These drivers doesnt seem to help as the none of the pc's I've tested it on seem to recognise it as USBtiny but rather as "malfunctioned device ". The error code is 43 which is standard for the usb failures on the hardware end however I've checked the hardware and everthing seems to be in order ( checked multiple times and made other people verify my work ) Can't really figure out what I'm doing wrong.

Antzy Carmasaic (author)  Nichigo5 months ago

Try using different USB cable.

Try uninstalling and reinstalling driver(even if device isn't discovered).

Check polarity of diodes, capacitors etc.

Make sure you followed the step-5 EXACTLY and burned the fuses properly.

Make sure you are using components of proper value.

Triple check all soldering with a magnifying glass. There could be cold solder joints.

Make sure with a magnifying glass no traces are touching each other.

Lastly, try making a fresh circuit on a breadboard (that's how I used to program AVRs before learning to make PCBs).

Antzy Carmasaic (author)  Nichigo5 months ago

If you got it working, please hit the 'I Made it!' button and maybe post a pic if possible :)

Nichigo7 months ago

Hey man awesome guide , I soldered the parts together but i'm having trouble using an arduino to program the attiny2313. I particularly have difficulties finding the code to burn onto the attiny. Can you give me some pointers ?

Antzy Carmasaic (author)  Nichigo7 months ago

Do read through this:

http://arduino.cc/en/Tutorial/ArduinoISP

In short, the whole process is:

In Arduino IDE, go to File > Examples > ArduinoISP and "Upload" the code to Arduino. (the board should be Arduino Uno and correct port should selected).

Wire up the ATtiny to Arduino as mentioned in this link: http://www.ernstc.dk/arduino/2313.htm

Now you can follow step-6 of this instructable. The only difference is instead of using -c usbtiny, use -c avrisp for every command.

Hey ,

Followed your instructions and the attiny was successfully programmed ! However i ran into some other troubles . When i plug in the device into the PC, a message pops up saying " USB device not recognized . The device has malfunctioned. " Tried the various solutions posted on the adafruit forums and some other helpful sites , installed numerous drivers even through the hdwwiz.exe but i couldn't get my PC to recognize the usbtiny. This was done on win7 x64 and win8.1 x64. Got any suggestions on how i should proceed ?

skumar1317 months ago

u mentioned BOOT LOADING ,actually when you programmed the chip is it necessary to boot load or what actually , i am lil confused as am new to this stuff :) can u plz explain

Antzy Carmasaic (author)  skumar1317 months ago

A programmer(like USBtinyISP) is necessary to program an AVR IC(which is the brain of the Arduino). Instead of using a programmer everytime to write a new code, AVR used in Arduinos have a special program called bootloader written on them during manufacture using a programmer. This takes up a small part of the AVR's memory space.

The benefit it provides is now you don't have to use a programmer and program it using serial communication. Since IC for serial is already on the Arduino for connecting to PC via USB(Universal "Serial" Bus), the Arduino IDE software on PC can talk to the bootlader and send it your code. The bootloader writes it in the remaining memory on the AVR. So simply said, mainly bootloader is a program to allow you to write another program using serial communication.

Keep in mind that the bootloader takes care of a few other functions, and that both your program and bootloader are coexisting on the IC. The AVR just runs the bootlader and the bootlader in turn runs your code. If you upload your code using a programmer, you will overwrite the bootloader. If you need the bootloader again, you'll need to write it again using a programmer. I hope this clarifies things a bit....

skumar1317 months ago

i am gonna sure try this ,thanks for the awesome post :)

Ploopy7 months ago

Cool!

Nice Job :)

would it be ok if i asked you to post a schematic picture ?

(my computer is running on the old version so i can't open Eagle)

Antzy Carmasaic (author)  Ploopy7 months ago

Thanks!

Here's a screenshot of the schematic...

USBtinyISP schematic.png
schel10 months ago

Hey! Great 'structable! Much Thanks for sharin' the info! Q: if I wanted to use a 328 instead of the ATiny and changed the crystal to a 16 mhz and, a 28 pin IC holder. would everything else be the same / work using a 328 to load 328s?

Antzy Carmasaic (author)  schel10 months ago

Using a 16MHz crystal is not possible since the USB protocol will require very accurate timing which will be off since the code is written according to a 12MHz crystal. The code is written in avr-c, so to use it on an ATmega328P, you might need to change the pins as well in code.
If you are talking about uploading this code onto an Arduino or one of its clone(ATmega328P and 16MHz sounds like an arduino), then I'd suggest to go with ArduinoISP.

Uh..Duh! I wondered about that 12 mhz thing...of course not knowing WHAT I dont know...I bought 2 USBasp s! Thanks, this is the first clear answer / direction I've gotten on this. On the flip, I'm looking at a UNO clone that has the 10 pin header for asp connection. Hey, so now I have 4 atmega chips and 3 different type boards to put 'em on! ...I'll keep buildin' until I can get a programmer to work on one! Much Thanks!

matstermind11 months ago

just finished mine, i uploaded the main.hex file and avrdude said it verified correctly, but windows won't recognize it, and it says the diver file is not compatible with my hardware. do you have any idea why it would be doing that? did i need to burn a different hex file?

Antzy Carmasaic (author)  matstermind10 months ago

Which windows are you using? If it's Windows 8 or 8.1, the procedure is slightly complicated. Instructions to install drivres on all Windows systems can be found here:

http://learn.adafruit.com/usbtinyisp/drivers

Give it a through read. If it still won't install the driver, send me a screenshot of the error, and I'll try my best to help you out.

P.S. If your project is finished, can you please post an image? I love to see people making my Instructable :)

parth_bhat1 year ago
what ur telling is right but if avrdude don't have atmega8L in his file then how it is reading the atmega8L chip when I connect it with usbasp?? I type " avrdude -c usbasp -p m8 " it gives me the proper answer. but when I change the programmer from usbasp to usbtiny den the errors comes. I'll try again troubleshooting as yesterday night I read the whole adafruit tutorial which u have described in ur tutorial also they have told the same error message which am getting. and they are telling if u get the error message den the programmer is not spking with atmega8L or there is wiring errors. but I've checked for wiring errors it's not there. pls u also once see that tutorial. so that u'll exactly understand what problem am facing. pls check under " stuff that can go wrong" thanks for ur quick replies. but slowly slowly am loosing my hopes on the programmer :-(
Antzy Carmasaic (author)  parth_bhat11 months ago
Hi,
Did you have any breakthrough with your problem?
I recently bought an ATmega328 instead of ATmega328P. avrdude wouldn't accept it. I followed this instructable to fix the problem:
http://www.instructables.com/id/Bootload-an-ATmega328/step6/ATmega328-PU-workaround/
parth_bhat1 year ago
heyy, just now I tried to check weather the atmega8L is spking with usbtiny or not and its not spking it's giving me an error " initialization failed , rc=-1 double check connections or try again or use -f to override this check " and the same error is even been seen on arduino IDE when I burn bootloader on atmega8L or I upload any sketch. and this problem is only with atmega8L not with atmega328. and if I try to do same thing with usbasp then no problems. so can you pls tell me some solution. :-)
Antzy Carmasaic (author)  parth_bhat1 year ago
I checked my avrdude and there is no ATmega8L listed in its parts. It's possible there is significant difference between ATmega8 and ATmega8L. I checked the ones I programmed and they are without an L. If you have one, can you try with ATmega8? If this is the problem, you will have to change avrdude config file to include ATmega8L.
parth_bhat1 year ago
the programmer does works with atmega328 it burns the bootloader on atmega328 but not on atmega8L. the error is lyk " avrdude fail and not in sync" u can find these errors on internet if u look for arduino as isp. people have came across these types of errors. besides that the main aim to burn the bootloader on atmega8L is its of Rs. 70 only. whereas atmega328 is of 500 and above. I'll check weather the usbtiny is reading atmega8L or not. but everything works gr8 if I try with usbasp. pls any other alternative would be helpful
parth_bhat1 year ago
actually finally I finished the Project and I was eagerly waiting for ur rply. the programmer works but it's not burning the bootloader on atmega8L. and my main purpose was to program atmega8L. " Mehenat ka faal mitha nahi mila meko " :'( but. am able to program atmega8L with usbasp. pls can you give me some suggestions or can help me. I have even posted on ur site.
Antzy Carmasaic (author)  parth_bhat1 year ago
By your comment 'the programmer works', do you mean you are able to program other ICs? Or just that the computer recognizes it? What is the error you are receiving with ATmega8L? Are you selecting a board with ATmega8 in the Arduino IDE?

You can try checking through command line using avrdude if it can talk to the ATmaga8L. If using windows, open cmd and type: avrdude -c usbtiny -p atmgea8
Detailed tutorial here: http://www.ladyada.net/learn/avr/avrdude.html
parth_bhat1 year ago
it's really very very very very very best instructable on this website. u have shared the most detailed things for making this project which people usually don't share easily. again thanks for the instruuctable. I have one question :-) in the video of ArrDrowHo. which avr u used? was it atmega8L ?
Antzy Carmasaic (author)  parth_bhat1 year ago
Thank you! I think I used ATmega328P in the video. I tried using Atmega8 earlier but the bootloader takes about 8 seconds to start code execution after power-up(which looked alarmingly long in video), while ATmega328P's bootloader takes 1 second or less usually. But the bootloader burning time is waaay longer for ATmega328P so I sped it up in the video.
nerd74731 year ago
cool!
Algaja1 year ago
Hello
First of all very nice instructable, but could you explain me something?
I dont understand the purpose of R2 and R3. Why are they necessary, to prodect the pins after the target has been programmed? Also C3 is for smoothing the power supply, but what is C6 used for? I saw a instructable that used ATtiny85-20 with only the zener diode part for the programmer, no resistors on MOSI SCK and no C6..

Thank you
Antzy Carmasaic (author)  Algaja1 year ago
A discussion thread on adafruit tells us that R2 and R3 are not strictly needed and are there just for safety, probably from some externally connected load to MOSI/SCK pins while being programmed.

C3(0.1uF) and C6(100uF) are both decoupling capacitors, connected across the power supply to remove both high frequency and low frequency noise. This combination ensures a smooth power supply to ATtiny2313 over a wide range of power supply noise frequency.

I'll quote the following text from a decoupling tutorial:
For effective supply de-coupling that frequency has to cover as wide a range as possible and certainly the range of noise being generated by the circuits. So this is why we often see two different values of capacitor used in parallel. One large one to filter out the low frequency variations and a small on for the high frequency noise. Typical values are 47uF and 0.1uF or 0.01uF (10nF)

Glad you liked my Instuctable. :)
Thank you very much for your reply, it helped a lot.
DoxxRoxx1 year ago
In all actuality, it will hurt even more than, 'like hell',  for that chicken to lay an IC ... mainly because that's a picture of a rooster!  OUCH!  ;-)

Nice instructable!  I'm going to give one of these a go.
Antzy Carmasaic (author)  DoxxRoxx1 year ago
Hahahaha. Nice catch. Then instead of laying, it probably came out in the rooster's toilet pot in the morning ;P
Dylon1241 year ago
great project, but does it actually work and can I use a 3 pin 12 MHz resonator?
1-40 of 61Next »