[SOLVED] Trying to program attiny's can you see what I am doing wrong?

I am coming back to programming attinies after a long period off.
I am using a home made board that worked fine before.


It is in pins 10,11,12 and 13 and gnd, 5v, 3.3v and reset.
I have two attiny85's, one is new just out of the packaging.
I have loaded the attiny library from Mr Mellis,
I have loaded the arduino isp from examples line 11 into the uno.
I have set the board to attiny 25/45/85, set the clock to 1mhz, processor to attiny85 and programmer to 'arduino as isp.'
If I alter the blink program to pin 0 I was sure it would load.
It compiles and then stops with
"a programmer is required to upload".
Can anyone see what I am doing wrong?

Can you post the schematic you are using ?

and what have you selected as programmer under Tools->Programmer ?
it should be 'Arduino as ISP'

Hi Deva_Rishi,
I don't have a cct diagram but I have altered this from something I do have. The LED is only to show a blink program is running and the capacitor only goes between live and neutral. The attiny is an 85 not a 13.
programmer sch
I don't recognise the programme that I used to put in the UNO (arduinoISP) I think it is that at fault here.
see the uno half way down this page

I set Arduino ISP to load the UNO's sketch and then changed it to Arduino as ISP to load the blink sketch into the attiny.

I have just wired it the same as the one on the web page above and I get the same result?
I have now wired a different UNO on a different port like the one on the web page above and got the same result.
It must be the software in the UNO.

Are you doing "Sketch -> Upload" or "Sketch -> Upload Using Programmer"? It must be the latter.

I have it the same, just on PB4, but that looks fine.

That is what i do I use my UNO as an ISP, and for that i use the sketch that comes with the IDE examples.
And i select Arduino as ISP. I don't have any ATtiny85's in use, i do have a few but no purpose, if i use an ATTiny then usually a 13 will do (for which i use a different core) but i do use 2313's with this core.
I have experienced that the UNO needs a reset before it works, and the ArduinoISP sketch has a LED on pin 9 to show a 'heartbeat' i do use that to verify the ISP sketch is running.
And then before anything else i set the clockspeed to 8MHz internal which will work just fine at lower voltages, and select 'burn bootloader'

Then i upload a blink sketch. I don't know what else to tell you.

Sorry for the delay Guys, I decided to make a new shield with the leds on it

When I first read this I didn't understand it.
After making the shield I looked at the 'sketch' tab and pressed 'upload using programmer', it worked fine and I now have a attiny blinking the light. If I do it on 8mhz it blinks very slowly but at 1mhz it blinks correctly.
I don't remember using that line in the 'sketch' tab before.
Thanks for the time you have spent Guys this forum comes up trumps yet again.

If you set it to 8MHz internal and hit 'burn bootloader' it will set the clock fuses for that and then blink will work correctly when you compile your sketch at that as well. For blink it doesn't matter much, but for complex things it might.

1 Like

Am I right assuming that my attiny has the clock set at 1mhz? Do I have to do it to each attiny?
I wonder why they set it at 1 if 8 is better?

According to the note for Table 20-5 "Fuse Low Byte" in the ATtinyX5 datasheet:

The default setting selects internal, 8 MHz RC oscillator.

I'm assuming, from what Diva_Rishi is saying, that the chip I have, purchased a long while ago as a set of 10 from e-bay, is set to 1mhz.
I have just done as he suggests, clicked on 8mhz and clicked on 'burn bootloader' and the led is now flashing at 1 second intervals with the clock set to 8mhz.

1 Like

Hello, @matelot - Do you see any need/benefit for a ceramic capacitor from ATtiny85 GND to ATtiny85 VCC?
(see this Spence Konde video at 2:50)

Only as a smoothing capacitor to prevent spikes.
I tend to put them in most things I do.
Mine is in fact a 10 micro Farad electrolytic on the test board.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.