(Solved) Attiny85 SOIC-8 20U impossible to program

Hello,

I have problem of programming ATTINY85-20U SOIC-8

I can do program without any problem ATTINY85-20U DIP-8 but when i just change to SOIC-8 also 20U, i get an error code:

avrdude: Expected signature for ATtiny85 is 1E 93 0B
         Double check chip, or use -F to override this check.
Failed programming: uploading error: exit status 1

I tried to do it with two and it's the same problem.
Why?



Capture d’écran 2023-10-04 à 23.06.20

Most likely, bad or incorrect connections. Please post a close up, focused photo of the your programming setup, showing the problematic chip.

I beeped all pins with multimeter to see if there is some short cuts.
And to see if all are connected between Arduino and adapter.
It's all the same like for DIP-8.

Here is the pictures of adapter for SOIC-8 to DIP-8








Did you buy them from a reputable source? I remember that I bought a few years back from Aliexpress or Ebay and got them with the reset disabled, so had to make a HV programmer on my Uno to get them back to working order.

It's Aliexpress Attiny's.
How can i test to know if my "reset" are disabled ?

Who knows what might be in those SOIC packages?

Genuine ATTiny's cost a bit more from an authorized dealer, but they work.

1 Like

With power off, use a DMM to check pin to wiring continuity.

DMM ?
What is that ?

I'm going to ask you to post the full verbose output from an upload attempt.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: compilation in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
  5. Attempt an "Upload Using Programmer", just as you did before.
  6. Wait for the upload to fail.
  7. You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code tags icon on toolbar
  10. Press Ctrl+V.
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code tags before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

"Digital multimeter"

In file included from /Users/kayumba/Documents/Arduino/libraries/FastLED/src/FastLED.h:75:0,
                 from /Users/kayumba/Downloads/gbc-rgb-led-2.0-main/source/GameboyLEDs/GameboyLEDs.ino:1:
/Users/kayumba/Documents/Arduino/libraries/FastLED/src/fastspi.h:157:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sketch uses 8188 bytes (99%) of program storage space. Maximum is 8192 bytes.
Global variables use 305 bytes (59%) of dynamic memory, leaving 207 bytes for local variables. Maximum is 512 bytes.
"/Users/kayumba/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/kayumba/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -pattiny85 -cstk500v1 -P/dev/cu.usbserial-1110 -b19200 "-Uflash:w:/private/var/folders/87/8v1dnm9n3rx2227m0mm_wj400000gn/T/arduino/sketches/0947090EED7773D4637C3BE8F530648A/GameboyLEDs.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/kayumba/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/kayumba/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-1110
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATtiny85
         Chip Erase delay              : 400000 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    12     4    0 no        512    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      8192   64    128 30000 30000 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Failed programming: uploading error: exit status 1

This is the information I was interested in. The non-verbose output only tells us that the read signature was not as expected. The verbose output tells us the actual value of the read signature.

This value has diagnostic significance. For example, if it read a valid signature of a different chip, we might conclude that you received a mislabeled chip. Or if it read a seemingly random signature value, we might conclude that the signature data was somehow corrupted (either on the chip or during the read).

But the 0x000000 has a different significance. This indicates that the programmer was not able to communicate with the chip at all. That supports the hypotheses already advanced in the prior discussion that either there is a problem in the connections between the programmer and the target, or else the target is configured in a way that prevents the communication with the programmer.

One possibility is that the fuses on the ATtiny85 have been configured to use an external clock source. A factory fresh chip is configured by default to use the internal RC oscillator, which means it can be programmed without the connection of an external clock source (e.g., a crystal oscillator or ceramic resonator). But if for some reason you received a chip on which someone had previously set the fuses for an external clock, then the chip doesn't run without such a clock source, which can cause this error. So it is worth connecting a clock if you have one on hand. It won't do any harm even if the fuses are set for the internal oscillator as expected.

Oh, ok.
I think that what i already done.
I checked every pins with "beep mode" to see if there is some wrong connection or "short cuts".
Everything is same like with DIP-8.

Thank you for answer ptillisch.
I will try to find one and to connect it like "external clock".
Can you give me please a reference for that "ceramic resonator" ?
And wiring diagram if you have.
Thank you very much.

Are this one ok?

It is only one possible cause of the error you got, so I can't make any promises that connecting a clock source will solve the problem. Those of us with a hoard of electronics components usually have various crystals and resonators readily on hand and so connecting one would not require any significant effort, but I know that not everyone has such things lying around.

I remember there is a variant of the "ArduinoISP" sketch that also outputs a clock signal that can be connected to the target for this purpose, but I don't know where that sketch can be obtained off hand.

The ceramic resonator is an alternative to a crystal oscillator. There is some general information about it here:

For a hobbyist, the primary property of interest of the ceramic resonator is that it doesn't require load capacitors like the crystal oscillator does, which makes it easier to use in a prototyping application.

For a manufacturer, the primary property of interest of the ceramic resonator is that it can reduce the cost of manufacturing the device as a replacement for the alternative of a crystal oscillator and load capacitors.

The ceramic resonator is inferior in accuracy compared to a crystal oscillator. However, for many applications the accuracy is still sufficient. In fact, you would likely find ceramic resonators in use as the clock source for the primary microcontroller on some of the microcontroller development boards you are using (though the UNO derivative board in the picture you shared actually does use a crystal on the ATmega328P as well as the CH340).

No. You need to connect load capacitors to the crystal

Even though best practices would be to refer to the datasheet of the specific crystal in use and obtain the appropriate capacitance value, in practice you will be fine if you simply use the common value of 22 pF.

You don't need a crystal, resonator or capacitors, if the clock fuse setting is the problem. Just about any oscillator will work as a clock or crystal, as long as you obey voltage levels (including an Arduino tone() or timer pin output). I've even used an audio oscillator to recover the settings on a AVR chip.

See this tutorial (scroll down for the details on connecting an external oscillator signal) Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board

Problem should be somewhere else.
I desolder one Attiny from Digispark board (like on picture), and tried to program it.
No succes. I got the same error with Device signature = 0x000000
Will try to check one more time all pin connections.

Nice work on troubleshooting!

Make sure to check the connections all the way through to the UNO derivative board. The jumper wires can sometimes not have electrical continuity due to manufacturing defects or damage.

ehh....isn't this digispark board the board where you can use the reset pin as the sixth IO pin, since the board is programmed via a bootloader and therefore they can afford to disable the reset pin?

The Specs:
..............
6 I/O Pins (2 are used for USB only if your program actively communicates over USB, otherwise you can use all 6 even if you are programming via USB)
.............

To your question about the HV programming
here is a description that describes a DIY version

I built one not as fancy as the one in the article, but it works, straight off an UNO, thanks to a tiny 5V >> 12V boost converter.

1 Like

Thank you.

Just to let you know...
I done successful flashing of Attiny85 SOIC by using .HEX file and programmer "TL866".
Anyway, I will build my own "HV Programmer" (thank's hmeijdam) than I can see if the problem was that.