Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 53
Outta Steam
|
 |
« on: January 20, 2013, 05:15:02 pm » |
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!! Help! Bernie
|
|
|
|
« Last Edit: January 20, 2013, 05:17:17 pm by STDummy »
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 120
Posts: 10199
|
 |
« Reply #1 on: January 20, 2013, 06:02:05 pm » |
Post the verbose output from avrdude.
|
|
|
|
|
Logged
|
|
|
|
|
Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 53
Outta Steam
|
 |
« Reply #2 on: January 20, 2013, 06:11:19 pm » |
Sure thing, here's what I'm seeing: Binary sketch size: 2230 bytes (of a 8192 byte maximum) C:\Program Files\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Program Files\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny85 -cstk500v1 -P\\.\COM4 -b19200 -Uflash:w:C:\Users\Bernie\AppData\Local\Temp\build6217015721997741663.tmp\Ironman_ATTinySine.cpp.hex:i
avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
System wide configuration file is "C:\Program Files\arduino-0022\hardware/tools/avr/etc/avrdude.conf"
Using Port : \\.\COM4 Using Programmer : stk500v1 Overriding Baud Rate : 19200 avrdude: ser_open(): setting dtr avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Recv: avrdude: Recv: AVR Part : ATtiny85 Chip Erase delay : 4500 us PAGEL : P00 BS2 : P00 RESET disposition : possible i/o RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail :
Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 6 4 0 no 512 4 0 4000 4500 0xff 0xff Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- flash 65 6 32 0 yes 8192 64 128 4500 4500 0xff 0xff Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- calibration 0 0 0 0 no 2 0 0 0 0 0x00 0x00
Programmer Type : STK500 Description : Atmel STK500 Version 1.x firmware avrdude: Send: A [41] . [80] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: A [41] . [81] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: A [41] . [82] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: A [41] . [98] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown avrdude: Send: A [41] . [84] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: A [41] . [85] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: A [41] . [86] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: A [41] . [87] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: A [41] . [89] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us
avrdude: Send: A [41] . [81] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: A [41] . [82] [20] avrdude: Recv: avrdude: Recv: avrdude: Recv: avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00] [20] . [00] [20] avrdude: Recv: avrdude: Recv: avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85 avrdude: Send: P [50] [20] avrdude: Recv: avrdude: Recv: avrdude: AVR device initialized and ready to accept instructions
Reading | avrdude: Send: u [75] [20] avrdude: Recv: ################################################## | 100% 0.05s
avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.
avrdude: Send: Q [51] [20] avrdude: Recv: avrdude: Recv:
avrdude done. Thank you.
Hope that actually helps!! Bernie
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 120
Posts: 10199
|
 |
« Reply #3 on: January 20, 2013, 06:55:09 pm » |
avrdude: Device signature = 0x000000 Indicates there is no response from the target. Some possible culprits... • Wiring. Make absolutely certain: MISO to MISO, MOSI to MOSI, SCK to SCK, GND to GND, Pin 10 to RESET. Target is powered close to 5V. • Target's clock. Is the processor brand new? Have you tried to change the fuses? On the target, is anything connect to the SPI pins (MISO, MOSI, SCK)?
|
|
|
|
|
Logged
|
|
|
|
|
Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 53
Outta Steam
|
 |
« Reply #4 on: January 20, 2013, 07:10:02 pm » |
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! Thanks for the suggestions  Bernie
|
|
|
|
|
Logged
|
|
|
|
|
Valencia, Spain
Offline
Edison Member
Karma: 65
Posts: 2282
|
 |
« Reply #5 on: January 20, 2013, 07:44:48 pm » |
I haven't changed the fuses - to be honest I wouldn't know how or why to do it!
Have you never set the clock speed on your other Tiny85s? That's done with fuses.
|
|
|
|
|
Logged
|
|
|
|
|
Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 53
Outta Steam
|
 |
« Reply #6 on: January 21, 2013, 03:37:48 am » |
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.
Bernie
|
|
|
|
|
Logged
|
|
|
|
|
Valencia, Spain
Offline
Edison Member
Karma: 65
Posts: 2282
|
 |
« Reply #7 on: January 21, 2013, 06:12:08 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 53
Outta Steam
|
 |
« Reply #8 on: January 21, 2013, 06:56:46 am » |
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! Bernie
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4694
|
 |
« Reply #9 on: January 21, 2013, 02:16:23 pm » |
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.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 53
Outta Steam
|
 |
« Reply #10 on: January 21, 2013, 03:10:14 pm » |
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 Bernie
|
|
|
|
|
Logged
|
|
|
|
|
Leeds, UK
Online
God Member
Karma: 35
Posts: 989
Once the magic blue smoke is released, it won't go back in!
|
 |
« Reply #11 on: January 21, 2013, 03:40:34 pm » |
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.
|
|
|
|
|
Logged
|
~Tom~
|
|
|
|
Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 53
Outta Steam
|
 |
« Reply #12 on: January 21, 2013, 03:53:09 pm » |
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!!!
Bernie
|
|
|
|
|
Logged
|
|
|
|
|
Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 53
Outta Steam
|
 |
« Reply #13 on: January 22, 2013, 06:05:07 pm » |
Ooooops. Humble pie and time for confession. 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: http://www.flickr.com/photos/38926882@N03/8405986583/in/photostreamBernie
|
|
|
|
|
Logged
|
|
|
|
|
Leeds, UK
Online
God Member
Karma: 35
Posts: 989
Once the magic blue smoke is released, it won't go back in!
|
 |
« Reply #14 on: January 22, 2013, 06:18:46 pm » |
No harm done. We've all been there and done that at some point or other. If you never make mistakes, you can never learn, that's my motto  .
|
|
|
|
|
Logged
|
~Tom~
|
|
|
|
|