Not uploading the program to the AtTiny 85

Hello:
I followed completely this tutorial:

I have checked the wire connections three times and it still does not work. I'm using the exact same code:

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the Uno and
  Leonardo, it is attached to digital pin 13. If you're unsure what
  pin the on-board LED is connected to on your Arduino model, check
  the documentation at http://arduino.cc

  This example code is in the public domain.

  modified 8 May 2014
  by Scott Fitzgerald
 */


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(0, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(0, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(0, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}

It goes up to 98 percent in the upload bar before stoping completely. If any more information is required I will be glad to provide it. Thanks!

Do you have the same problem using my ATTinyCore?

Going to give it a try and post the results. Thanks!

Took a closer look at the tutorial - they are omitting a necessary component - specifically, a 0.1uF ceramic capacitor. This should be connected between Vcc and Gnd, as close to the tiny85 as possible. Doing it in breadboard, I usually put it across the top of the tiny85 to minimize the length of the leads. You need this for basically any digital IC unless specified otherwise in the datasheet.

Without this cap, often programming will fail part-way through, as you are experiencing (I once had to trash a set of 10 boards I had custom designed because of this!)

Any tutorial that describes the use of any microcontroller on breadboard, or really any digital IC, and omits the decoupling cap, should not be followed - the author doesn't know what they're doing if they don't include that part, and they have probably made other mistakes.

I have added the capacitor and used the ATTiny Core instead and I have got the same issue. However, the issue with the decoupling cap is real, in experience specially with MOSFET logic gates. I dont know if the problem here is the computer. I have tried another attiny and got the same issue. The only 'clue' I think might be important is that when I try to burn the bootloader it says: 1 out 10, 2 out 10... and in all of them says
avrdude: stk500_recv(): programmer is not responding. Any more ideas?

When you get the sync error, that's a totally different error than getting to 98% and having it hang - if you get the stk500 sync error when doing burn bootloader or upload using programmer, either you have the wrong board selected (ie, something that uses a serial bootloader, rather than the attiny), have not uploaded ArduinoAsISP to the arduino acting as programmer, or the arduino acting as programmer is resetting when the serial is opened via DTR autoreset, and so avrdude is not talking to ArduinoAsISP, but the arduino's bootloader (which uses a different baud rate, hence sync error) - try a 10uF cap between reset and ground on the programmer after getting ArduinoAsISP uploaded. Some people say they need the cap to disable autoreset, others say they don't - I don't understand why different people report different results here.

The 10 uF was already there. In fact, I have tried using a 120 ohms resistor between Vcc and Reset to see if the issue was there. I only get the error if I wait around a minute, all that time is hanging in the 98 % bar To be honest, I'm completely lost. What should I do? It is my first time with AtTiny and i am really confused

Oooh, ok, nevermind - I assumed you were seeing that immediately

And you've installed that 0.1uf decoupling cap?

The “burn bootloader” stage ran OK ?
It is not very prominent in the tutorial but you have to do it.

No, when I try to burn the bootloader I get this error:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
Problema subiendo a la placa. Visita http://www.arduino.cc/en/Guide/Troubleshooting#upload para sugerencias.
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03

And yes, I have installed the decoupling cap.

OK. But if you didn't get past the "bootloader" part (which in the case of an ATTINY85 sets only the fuses), then there was no point in attempting to load the sketch.
You have to be careful about which of the ATTINY board options you choose in the IDE. If you choose one with a crystal, you'll get a similar effect to the one you have shown unless there is a crystal present. Without a crystal, there is then no easy way of getting back.

No I chose from the beginning the internal 1 Mhz clock. I am sure of that because I read from somewhere that this could be a big problem

Then there is not much more I can suggest than this:

  1. Apart from the pullup resistor on ATTINY reset pin (c. 10k) and the 0.1uf decoupling capacitor, ensure that there are no connections which do not belong to the programmer. Eg remove the led from pin 0.

  2. Check again your pin numbering refers to the "Arduino" pin numbers and not the physical pins on the chip. I believe also some cores offer alternative pin numbering schemes (clockwise/anti-clockwise) so check that you have the correct option set.

Getting that "attempt 1 of ..., 2 of ..., etc." means that your programmer is not connecting the Tiny to the serial port of your computer. I have previously seen this error with a 32u4 when it doesn't find the proper port for usb programming. I've never seen it with a tiny before.

Double check that the correct programmer is chosen, and that you have the correct tiny chip/clock selected in the IDE. Are you using an Arduino Uno as the ISP? Is that what you selected in the menu?

Okay dont blame me but I got it working. It was actually very silly by my part and I have to thank all who have helped me. I thought I had to unplug the AtMega 328P. I have done the exact same thing with the chip plugged on and it works flawlessly!