Thursday, May 28, 2009

Saving an ATMEGA 168

Why did I write this mail to Jeff?: (it is a long story…)

http://mightyohm.com/blog/2008/09/arduino-based-avr-high-voltage-programmer/

He Jeff, thx, for the artschool in Rotterdam Holland (WDKA) I thought I could save a bit of money buying ATMega’s instead of Lilypads and Arduino’s. I ran in the same fuses trouble I found in your blog (having more experience in Iphone programming :-). Just in this holiday week I decided I could try building your shield. I had to be careful (so being not at all artistic) and indeed I succeeded in…yes! making a tiny shortcut in between two near pins, of course the 5.5V and the GND of the ARDUINO. Invisible to the naked eye, there was a microscopic soldering error on my board between the not even “used” pins!
USB protection saved me twice, but then amazingly my shield (a master copy of your shield) worked! I could recuperate the ATMEGA 168. (And the 9 others I had apparently meshed up!)

(See Bootloading the Arduino a blog of 27 januari.)

shield1.jpgyou see the Arduino is so rectangular, the lilypad is already nicer, but the single ATMEGA is even more small and “hideable”. Only, get this thing programmed! (Don’t forget to set the internal timer….)

shield2.jpgWhat happened? I wanted to try “the naked ATMega168″. But I ran into trouble: the hex file to bootload the ATMEGA was nt the right one. First i started altering settings, I didn’t know about fuses, lockbits, so….in the end I foudn the right HEXfile, see former blog about this. But then apparemtly I already had bad settings for quite a few of the 10 ATMEGA’s.

So I started digging the internet and found the blog of Jeff. But well, it took me a few weeks to decide to build this shield (picture above). And after some trouble it did save 7 out of 10 ATMEGA’s. For the last three i am writing in the file of Jeff on the ARDUINO the eraseChip function, but that does not save me at the moment. Anyway, you don’t save time buying naked ATMEGA’s :-) But i have learnt a lot! Being able t make a shield is perfect and from the script of Jeff i learnt the possibility of setting ports 0-7 at once using the DATA.

And in the end the best reward is when it actually works!

I lost this link several times: the datasheet, the page to program HIGH VOLTAGE stuff is around 297:

http://www.atmel.com/dyn/resources/prod_documents/doc2545.pdf

0 comments: