Hello, avrfreaks community!
I recently purchased several atmega328p chips from a well-known chinese online store (decided to go as low budget as possible) in QFP32 package for my next project. But I cannot seem to get them to work and cannot figure out what's the problem with them.
The atmegas arrived in the most ghetto package I've seen so far:
But that's fine with me as long as they work.
So I made a breakout board to test them (don't mind the crappy soldering, a continuity test was done so it's all fine).
I hooked it up to a USBASP and checked the connection with avrdude. It worked fine, it showed the fuse bits, the signature and all that goodness. Then I flashed it with the arduino bootloader. It showed the flashing process completed without errors, verification was also done without errors. Fuse bits were the same aflter flashing.
And then the funny part. After cycling the power (reconnecting the USBASP) the chip basically died -- the arduino bootloader-specific D13 led blinking at the bootup was not there. And it even stopped responding to serial programming!
I blamed my bad luck and figured the chip somehow actually died on me, but since I got em cheap I didn't bother much and just soldered another one in it's place. And from there on I was not able to get any of the chips I bought to work via USBASP. I've tried 5 out of 10 I bought so far.
I googled around and found some ideas to check -- like using an external oscillator or checking the "reset disable" bit.
Hooking up the chip to a 16mhz crystal (with 22pf caps) didn't work. But as far as I remember ICSP does not require an external oscillator at all since it's clocked with the SCK signal.
To check the "reset disable" fuse bit I borrowed a Dragon from an acquaintance of mine and hooked the board to it. This was the first time I was dealing with this beast so I didn't really know how to wire it correctly.
There are tons of info on how to do it with DIP-packaged ATMEGA but for QFP package there are only general suggestions like "get a QFP-to-DIP adapter and you're good", nothing concrete. I don't have one right now so I decided to make do with what I have.
I used this datasheet (http://www.atmel.com/webdoc/avrdragon/avrdragon.SCKT3200A2.html) to look up how to wire the HV_PROG pins to DIP pins and then used pinouts like these (https://it4it.club/uploads/monthly_2015_10/Atmega328P-AU.png.586d20b9b1c24ae595477930b3463353.png, http://cdn.instructables.com/F5B/UYWP/I63F0MTK/F5BUYWPI63F0MTK.MEDIUM.jpg) to correspondingly wire my QFP chip. So that, for instance, the pin#1 on HV_PROG connector wires to pin#12 on my QFP ATMEGA. But unfortunately that didn't work. Atmel Studio 7 device programming dialog shows it can read 5.0V but the device signature is 0xFFFFFF.
And as far as I understand if HVPP does not help then the game is over for good.
So here I am now. And before I go on and try to refund my money I'm asking you kind sirs to help me out. Maybe there's something wrong with what I was doing. Or maybe the answer is that it's just a cheap chinese crap.
Btw, my electronics skill level is noobish :D