I'm looking at using the ATTiny85 for a project, but have run into a snag. After following the tutorial found at https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide, I've installed the necessary files to be able to program an ATTiny85; however, the options given under "Clock" are 1MHz and 8MHz internal, as well as 8, 10, and 20MHz external.

Normally this wouldn't be a problem, except Digikey has no in-stock 8MHz flavored devices in the package I need (SOIC-8, don't have a reflow setup to use the QFN package).

If I buy the 20MHz version, will I be able to program them with the Arduino IDE set to the "8MHz Internal" clock option?

  • 1
    What do you mean by the 20 MHz version exactly? Are you suggesting that the Attiny85 comes in different speed grades? Where is the documentation supporting that?
    – Nick Gammon
    May 8, 2018 at 7:23
  • Digikey has no in-stock 8MHz flavored devices - can you provide links to these devices that supposedly come in different speeds?
    – Nick Gammon
    May 8, 2018 at 7:34
  • Here's the list I had narrowed down to: digikey.com/products/en/integrated-circuits-ics/… I believe these to be pre-set from the factory for the various clock options - but will it matter when I try to program them with the Arduino software? That is, is it expecting a specific clock speed that these aren't set to out of the box?
    – Phoxtane
    May 8, 2018 at 17:46
  • See my amended answer.
    – Nick Gammon
    May 8, 2018 at 21:51

1 Answer 1


I think you have the wrong end of the stick here. The Attiny85 is not a chip that comes in different speed versions. The datasheet mentions that it can run at 20 MHz. That doesn't mean you can buy a "20 MHz version". By selecting the appropriate clock option in fuses you can run at 20 MHz (or higher). From the datasheet:

High Frequency PLL Clock

There is an internal PLL that provides nominally 64 MHz clock rate locked to the RC Oscillator for the use of the Peripheral Timer/Counter1 and for the system clock source.

I believe these to be pre-set from the factory for the various clock options - but will it matter when I try to program them with the Arduino software?

That list is weird, it doesn't specifically say they are pre-set to any speed. Personally I would regard that list as meaning that the higher speed ones are manufactured to better tolerances, if indeed it means anything at all.

Maybe when they manufacture them they do a quick test at various speeds, and ones that don't run at 20 MHz are put into a different batch.

The datasheet specifies the default clock settings, it would be weird if Atmel made them with different settings unless you placed a massive order.

As for programming them, by default they don't come with a bootloader, so you would need to use ICSP programming anyway. You would need (in any case) something like the AVRISP device (which connects via USB to your computer, and the other end goes to your chip to be programmed). Or you can make up something like my AVR hex programmer which lets you put a hex file from the IDE onto a MicroSD card, and then use that to program the ATtiny85.

In all of these cases you can change the fuses to do what you want, including the clock options you prefer.

There is a board you can buy which is a pre-made gadget using the code I mention above, where you just press a button and the chip is programmed, which would be helpful if you are doing a lot of them.

CrossRoad programmer

  • I believe your theory to be correct as the ones with a higher MHz rating appear to be more expensive. Thanks!
    – Phoxtane
    May 9, 2018 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.