Can't upload to attiny85

Hello, I’m having trouble uploading the bootloader/blink sketch onto my attiny85. This is my first time ever trying to upload a sketch to an attiny.
I have followed the steps as seen in the following youtube video

I went to file, preferences, additional boards manager and pasted the following link:
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

I went to tools, boards, board manager, typed attiny and installed the attiny file.

Went to file, examples, Arduino as ISP, Arduino as ISP
Uploaded sketch.

Made sure under tools, board was attiny 85, processor was attiny 85, clock was internal 1Mhz, programmer was Arduino as ISP

Made sure my attiny85 was connected to the following pins:
Attiny pin 1: pin 10 on arduino
Attiny pin 4: gnd on arduino
Attiny pin 5: pin 11 on arduino
Attiny pin 6: pin 12 on arduino
Attiny pin 7: pin 13 on arduino
Attiny pin 8: 5 volts on Arduino
I made sure pin 1 was next to the little dot on the corner of the attiny and the pins from 1-8 go down making a U.

Went to files, examples, basics, blink, and uploaded the blink sketch. I just changed anything that said “LED_BUILTIN” to 3.
When I tried to upload the code I get this error message:

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

I also made sure to have a 10uF capacitor on gnd and rst when uploading the blink sketch to attiny85.
Tried uploading the Arduino ISP example with both

#define USE_OLD_STYLE_WIRING

And as

// #define USE_OLD_STYLE_WIRING

I bought the attiny’s from microchip.com and don’t know if the bootloader is installed. I tried going to tools, burn bootloader but I get the same error message.
When I try to verify the blink sketch it's fine so there is nothing wrong with the sketch. I get this error message when I try to upload it. Am I missing something?

1 Like

Please do this:

  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to "Show verbose output during: compilation"
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Repeat whatever the process is that is failing (the instructions apply to uploads and Burn Bootloader).
  • After the process fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

I did some research and found that the arduino uses a 328 p-pu chip and dislikes my attiny45 pu. The following is from another forum from 2012.

"Thanks Everyone! Error found I was using 328pu and not328p-pu…
For anyone having problems burning bootloader into fresh AtMega328 pu and not 328p pu(pico power series),Here’s what you need to do
Problem:
"pins_arduino.h: No such file or directory"
Solution:
Copy the contents from the downloaded boards.txt in your src/hardware folder to the boards.txt in App folder instead. On OSX: right click the Arduino app and browse Contents/Resources/Java/hardware/arduino/boards.txt.
You may also need to add the line below after the other text you pasted as it’s missing in the downloadable example file:
atmega328bb.build.variant=standard
After this, the ArduinoISP example compiled fine and uploaded to the Duemilanove board that I’m using for burning the bootloader. The next problem I bumped into was that when I selected Tools -> Burn Bootloader, avrdude couldn’t communicate with my board.
Problem:
1)stk500_getsync(): not in sync: resp=0x00
You can also get other hex numbers like resp=0x15 and resp=0xf0
Add either a 120 Ohm resistor (didn’t work for me) or a 10uF Capacitor (worked like a charm) between the Reset and 5V Pin.
http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection 48
I had to fiddle a bit to get this right and once it worked I ran straight into the next problem…
Problem:
Avrdude dislikes your lovely 328-PU chips and says “avrdude: Yikes! Invalid device signature.” or "avrdude: Expected signature for ATMEGA328P is 1E 95 0F"
Soln:- This problem happens becoz ur arduino uses 328p - pu and if u bought 328pu(a couple dollars cheap).
The soln is to modify Arduino > hardware >tools>avr>etc and open avrdude.conf file as word document.keep backup of this file incase u mess up.
find 1E 95 0F text under Atmega328 and change it to 1E 95 14 and save.
restart arduino environment and burn bootloaders on all ur chips.use status leds as mogul said.they help a lot.
After burning change the text in avrdude.conf file back to 1E 95 0F and restart arduino ide.Then u can uplode code normally."

I have absolutely no idea what he was taking about in this line
"find 1E 95 0F text under Atmega328 and change it to 1E 95 14 and save."
but I do get the exact avrdude error message. All I got was that the arduino ppu chip dislikes any pu chips. Anyone know how to be able to upload sketches on my attiny45 and 85 pu chips?

This is the error message I get when I try to upload the blink sketch.

Arduino: 1.8.13 (Windows 10), Board: "ATtiny25/45/85, ATtiny85, Internal 1 MHz"

Sketch uses 676 bytes (8%) of program storage space. Maximum is 8192 bytes.

Global variables use 9 bytes (1%) of dynamic memory, leaving 503 bytes for local variables. Maximum is 512 bytes.

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -pattiny85 -cstk500v1 -PCOM5 -b19200 -Uflash:w:C:\Users\elopez28\AppData\Local\Temp\arduino_build_363318/sketch_blinkattiny.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 "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"



         Using Port                    : COM5

         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 = 0xffffff (probably .avr8x_mega) (retrying)



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



avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)



An error occurred while uploading the sketch

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



avrdude: Device signature = 0xffffff (probably .avr8x_mega)

avrdude: Yikes!  Invalid device signature.

         Double check connections and try again, or use -F to override

         this check.





avrdude done.  Thank you.





This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

spiderman288888:
All I got was that the arduino ppu chip dislikes any pu chips.

You got it wrong. That post you found about ATmega328P vs ATmega328 has absolutely nothing to do with your problem. Please don't get distracted by it.

I'm pretty sure it's the part that says
"Avrdude: device signature = 0xfffff"

Anyone know how to fix that?

Start with adding the following to your preferences, board manager, preceded by a comma:
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

I added that to the preferences and now instead of 0xffffff it says 0x000000

spiderman288888:
I added that to the preferences and now instead of 0xffffff it says 0x000000

https://riteshkhanna.com/2016/04/20/programming-attiny45attiny85-with-a-usbasp-avr-programmer/

Aren't you supposed to 'burn bootloader' for every new chip ?

Deva_Rishi:
Aren't you supposed to 'burn bootloader' for every new chip ?

Indeed. As far as I remember this gets installed automatically when using optiboot or any of these preprogrammed loaders. Dr. Azzy on this forum had/has quite a bit to do with this.
The link above explains this process.

When I go to the website Programming ATtiny45/ATtiny85 with a USBasp AVR Programmer – Ritesh Khanna's Blog its asking me to download the drivers, but when I click on it, I get a Privacy error message and it doesn't seem reliable.
Do I need that device from Ali Express? Any way to do it without it? Were else can I go to download those drivers? I never thought burning a bootloader on a chip would be such as hassle and every youtube video makes it seem like it's the easiest thing in the world and don't even describe these extra steps.

Probably it's fine, but there's no need to go to some sketchy website to get the libusbK driver. There is a trusted source that is recommended by the original creator of the USBasp (not the Chinese USBasp clone manufacturers), as well as many others:

  • Download Zadig: http://zadig.akeo.ie/.
  • Plug in your USBasp
  • Start Zadig
  • From the dropdown menu, select AVRISP mkII. If it doesn't show up on the menu, then select Options > List all devices and check again.
  • Click the up or down arrows next to the Driver selection box on the right side until you see libusbK.
  • Click the "Replace Driver" button.
  • After it finishes you can close Zadig.

Is there a way to do it without the USBasp? I was hoping I can do this with just the arduino.

Yes, if you have a spare Arduino board you can use it as an "Arduino as ISP" programmer:

There's a lot of good information about the ATtiny family, as well as a boards platform that's far superior to damellis/attiny here:

pert:
(...)
There's a lot of good information about the ATtiny family, as well as a boards platform that's far superior to damellis/attiny here:
GitHub - SpenceKonde/ATTinyCore: Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8

Good to know; I used both board platforms but never got into the detail of either; can you let me know what the difference between both is, Pert? Thanks, Erik

damellis/attiny was one of the early 3rd party boards platforms, written by one of the founders of Arduino: David Mellis. It's a super minimal platform because it references all possible resources from the official Arduino AVR Boards platform (Uno, Mega, Leonardo, etc.). So there are some really cool things about this platform and its historical significance.

However, the damellis/attiny project is not actively maintained (though it actually holds up well due to how minimal it is). ATTinyCore is very actively maintained and even well supported here on the forum by DrAzzy.

damellis/attiny supports only a small number of ATtiny parts whereas ATtinyCore supports most of the classic ATtiny family (and SpenceKonde/DrAzzy's MegaTinyCore covers the modern ATtiny parts as well).

Due to referencing the Arduino AVR Boards platform's core library, damellis/attiny is reliant on whatever support that core and its bundled libraries happen to provide for ATtiny parts. Much of that code is applicable to any AVR, so it works out fairly well, but the Arduino AVR Boards platform was written to support the official boards of that platform which didn't use any ATtiny parts when the code was written (the "Gemma" ATtiny85 board was added later without much, if any, work on the code base to accomodate it). ATTinyCore provides its own bespoke core library and bundled libraries, which are tailored specifically to the ATtiny parts of that platform.

pert:
damellis/attiny was one of the early 3rd party boards platforms, written by one of the founders of Arduino: David Mellis. It's a super minimal platform because it references all possible resources from the official Arduino AVR Boards platform (Uno, Mega, Leonardo, etc.). So there are some really cool things about this platform and its historical significance.

However, the damellis/attiny project is not actively maintained (though it actually holds up well due to how minimal it is). ATTinyCore is very actively maintained and even well supported here on the forum by DrAzzy.

damellis/attiny supports only a small number of ATtiny parts whereas ATtinyCore supports most of the classic ATtiny family (and SpenceKonde/DrAzzy's MegaTinyCore covers the modern ATtiny parts as well).

Due to referencing the Arduino AVR Boards platform's core library, damellis/attiny is reliant on whatever support that core and its bundled libraries happen to provide for ATtiny parts. Much of that code is applicable to any AVR, so it works out fairly well, but the Arduino AVR Boards platform was written to support the official boards of that platform which didn't use any ATtiny parts when the code was written (the "Gemma" ATtiny85 board was added later without much, if any, work on the code base to accomodate it). ATTinyCore provides its own bespoke core library and bundled libraries, which are tailored specifically to the ATtiny parts of that platform.

Pert, your knowledge is worth gold! Thank you for that great explanation!

You're welcome.

pert:
Yes, if you have a spare Arduino board you can use it as an "Arduino as ISP" programmer:
https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP

When I go to the website, it states to use an arduino as a programmer and the other as the target. Can't my target just be the attiny85? When I go to Tools, programmer and choose Arduino as ISP, isnt that what I am essentially doing?