First of all, to any mod, if I've posted this in the wrong area of the forum, please feel free to move it!
Here's my problem:
I have been programming ATTiny85s successfully for a while using a Uno as an ISP and a TinyShield AVR programmer shield, but now I'm trying to program surface mount ATTiny85s with the same program and its just not happening. I keep getting the error message:
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check
I made my own adapter to allow the programming of the smd chips and I've double and triple checked its correct wiring and all's ok there.
The through hole chips still program ok. The only difference, apart from the chip format, is that the through hole chips are -20PU and the smd chips are -10PU. Does this mean the loading of bootloaders? I'm a bit vague about this area of knowledge I'm afraid. The through hole chips took the programming without any need, so why don't the smd chips?
I realise that the answer is probably obvious to some, but not to an old newby like me I'm afraid!!
All the connections seem to be ok, but I'll double check in the morning (its late here).
As to the target's clock - I don't know how to check this - but I haven't changed anything on it at all.
Its brand new (and I've tried three others, all new , with the same result)
I haven't changed the fuses - to be honest I wouldn't know how or why to do it!
Errr, no I haven't set any fuses. I've just accepted the default speed (1MHz?) on the through hole chips as they are only handling a couple of leds with no real complicated timings.
Am I right in thinking I have to load the chip with a bootloader to set the clock? I did actually try to burn a bootloader using the IDE drop down option, but only got the device unrecognized message again.
STDummy:
Errr, no I haven't set any fuses. I've just accepted the default speed (1MHz?) on the through hole chips as they are only handling a couple of leds with no real complicated timings.
Am I right in thinking I have to load the chip with a bootloader to set the clock? I did actually try to burn a bootloader using the IDE drop down option, but only got the device unrecognized message again.
If you look in your 'boards.txt' file you'll find fuse settings. These are burnt when you do a 'burn bootloader'.
(In fact this is how I do custom fuse settings - edit that file...)
Your problem doesn't seem to be that though.... I don't see how you can get a device signature of 0x000000 unless there's a bad wire or something.
I was thinking myself that it just has to be the connection side of things. The through hole ATTiny85s fit in a socket onboard the programming shield but the surface mount chips are held onto an adapter board (ic footprint etched onto copper clad board with a spring loaded clamp) which is connected via 6-way ribbon cable to an 8-pin socket. That in turn plugs into the programming shield socket. I made the adapter assembly myself - so that has to be the problem :*. I did check the wiring all the way through, but it has to be the prime suspect!
I think I'll try temporarily soldering some fine wire to the relevant legs of a sacrificial chip and attempt to program straight from the Uno. That should clear the connections doubt up. I'll report back if it works - or not!
The usual way to program SMD versions of Atmel mcus is to include a 6-pin ICP header (or equivalent) in your pcb layout. Then the device is soldered in when you program it and the connections are likely to be OK.
You do need to be careful what you connect to the MOSI/MISO/SCLK/RESET pins in your design, so that the programmer can drive those pins.
Unfortunately, due to a very tight space to fit the board in, I don't have room on the board for any programming pins (the finished board is only a half inch square)
I'm going to go over all the connections with a fine tooth comb tonight as I will have to program about half a dozen of these little ics
If you have a multimeter or continuity tester, I would use it to make sure that the pins on the attiny are properly contacting with the adaptor you are using.
Good point Tom, I'll check that first - might take a day or two though as there's just been a birth in the family, so its all on the back burner for a day or two!!!
You were sort of right all along guys and I was a stooopid dummy! Whereas there was absolutely no problem with the ATTiny85 making good contact with the pads on my adaptor, and good continuity between the pads and the 8-pin socket that plugged into my programming shield, the continuity went to the wrong pins!! I'd made the newby mistake of wiring pins 1 - 8 anti clockwise on the 8-pin socket instead of clockwise. No wonder the chip wasn't recognised.
Thanks for your patience with a doofus guys
For those still interested, heres a photo of my homemade adapter: