I am having fun with the Lufa library right now but am having a problem with avrdude and the device signature check not being consistant.
I am using a USBasp programmer and my AVR is soldered to a breakout board (attached). I rebuild this schematic on a breadboard.
http://www.sparkfun.com/datasheets/DevTools/AVR/ATmega8U2_Breakout-v11.pdf
When I plug my programmer in and immediately enter
avrdude -p atmega32u2 -c usbisp
it checks out fine but when I do it again, even 1 second after, it gives some crazy device signature like "0x10ffff" (this number changes every time).
The strange thing is I also have a atmega8u2 and it does the same thing.
I found someone with a similar problem and it was a timing issue so I thought it might help to get a new crystal. I replaced that and the 22 pf caps with new ones of different brands, it didn't help.
I then read this in the data sheet
This Crystal Oscillator ....may be more susceptible to noise in noisy environments.
So I looked around and started turning things that might be noisy off; baby monitor, power supply, etc- didn't help. I went to the other side of the house- nada. Trimmed the leads on capacitors and the crystal so they are flush with the breadboard- nope.
I thought maybe it was my programmer so I pulled out some over AVR's I had and the atmega8 and atmega328 checked out fine- I don't think its my programmer. (note: these are not compatible with lufa and thus wont work for me here)
So, I am unable to program either my atmega32u2 or my atmega8u2 because of this problem and I don't know what to check next. Any ideas?