# Can I generate frequencies faster than 32 MHz with ATTINY85?

I believe I can use the 64 MHz PLL clock with PWM to toggle every cycle and thereby generate a 32 MHz square wave output on an IO pin, right?

Is there a trick to generate an even higher frequency (with at least 1V of swing) without needing external components? For example, can I get the 64 MHz PLL output itself off the chip?

According to the datasheet:

6.4 Clock Output Buffer

The device can output the system clock on the CLKO pin (when not used as XTAL2 pin). To enable the output, the CKOUT Fuse has to be programmed. This mode is suitable when the chip clock is used to drive other circuits on the system. Note that the clock will not be output during reset and that the normal operation of the I/O pin will be overridden when the fuse is programmed. Internal RC oscillator, WDT Oscillator, PLL, and external clock (CLKI) can be selected when the clock is output on CLKO. Crystal oscillators (XTAL1, XTAL2) can not be used for clock output on CLKO. If the System Clock Prescaler is used, it is the divided system clock that is output.

So as long as you aren't using a crystal oscillator which would consume both the CLKI and CLKO pins you should be able to output the PLL's clock output directly through the CLKO pin.

• But, the datasheet also says the chip always divides the PLL clock by 4 when using it for the system clock, so I think this technique would limit me to 16 MHz, right? "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. When selected as a system clock source, by programming the CKSEL fuses to ‘0001’, it is divided by four like shown in Table 6-4." – bobuhito Aug 19 '19 at 19:31
• I have never liked Atmel datasheets. It's very unclear, since in one place it says you can output the PLL (as one of a selection of items), and in others it says it's the system clock it outputs. It makes no sense. Just try it and see what you get I guess, since the datasheet is crap. – Majenko Aug 19 '19 at 20:01
• I'm using Digispark (and have already bricked 2 of my 4 units) without the normal serial programmer, so burning fuses isn't something I want to do unless I am sure it will work...but I might do so if answers here leave me uncertain. Also, I don't have any equipment to check the output waveform frequency. – bobuhito Aug 19 '19 at 21:02