Wednesday, October 2, 2013

AVR programming

I spent the better part of my day today attempting to repair a cheap USBasp I got on ebay last year. I say repair, but that's not really the best word, seeing that it never worked in the first place...
I am using my Arduino Uno as the programmer, running LadyAda's USBasp, which has served me well, but I have this thing so I wanted to make it work.  
I found a solution a while back, which seemed pretty reasonable. (Click here to see it!) but when I tried it, it kept not working for some reason and I couldn't figure it out.
Today though, I had a realization that I could tie the reset pin directly into the programming unit and solder it to the usb key. So I got it all hooked up and it threw a "unable to sync" error... The nice thing about the LadyAdaAvr, is that she included a manual clock on pin 9 of the arduino, which is very handy when you burn your fuses before you have the clock circuit attached. Not that I would ever do something that dumb ;)
Knowing this from all the times I've needed it, I made a jumper from the crystal pin to pin 9 and Boom! It still didn't work...
As a last ditch effort I did a full chip erase, burned the fuses (again), and then flashed it, with all this still hooked up, and It worked! It seems all it needed was a good erasing lol. 
So I have a working USBasp now, as I realize that I have no chips I need to program right now...
I'll let you all know how it goes when I get a chance to try it out!

No comments:

Post a Comment