2
\$\begingroup\$

The 8-pin AtTiny x5 MCU (ie. AtTiny25, AtTiny45 and AtTiny85) can be set to use it's internal clock source to something as high as 16Mhz without any external components by setting PLLCLK which would enable the internal PLL for high frequency clock generation (no crystal or capacitor or what ever is needed).

This feature can be used to implement a simple and cheap USB device as in V-USB with ATtiny45 / ATtiny85 without a crystal

Is there any AVR (AtMega or AtTiny) with more than 8 pins having this feature (referring to PLL)?

\$\endgroup\$
4
  • \$\begingroup\$ Are you sure ? USB requires stable clock sources to work. Internal RC oscillators are usually not stable enough or have too broad tolerances to be used as USB clock sources. (It MAY work if you calibrate the RC oscillator and only allows for very small temperature changes) which is not robust. \$\endgroup\$
    – Blup1980
    Nov 12, 2013 at 12:39
  • 1
    \$\begingroup\$ @Blup1980: There is a calibration routine inside V-USB that constantly recalibrates the oscillator. It chews up a timer, but it's a requirement if you want long-term stable operation. \$\endgroup\$ Nov 12, 2013 at 12:48
  • 1
    \$\begingroup\$ AVRs have an unexpectedly stable RC oscillator, I've discovered, much to my surprise. This despite there not being much marketing hype around any stabilization or laser die trimming techniques Atmel may be using for this. In contrast, the Texas Instruments MSP430 microcontrollers, which also have brilliantly stable internal RCs, have had a lot written about them in this context. \$\endgroup\$ Nov 12, 2013 at 12:52
  • 1
    \$\begingroup\$ @Ignacio Vazquez-Abrams I got it... It recomputes the calibration value by measuring the frame length when a USB frame is received. That's a quite nice tricks ! \$\endgroup\$
    – Blup1980
    Nov 12, 2013 at 12:52

1 Answer 1

5
\$\begingroup\$

There are several AVRs with more than 8 pins, that incorporate the PLL clock multiplier based on the internal RC oscillator. Unfortunately, this is not one of the parameters that can be searched for on the Atmel site.

There is, however, a work-around:

Search through all the include files (*.h) in your AVRGCC installation folder for the string PLLCSR. The headers for the AVR parts which do have the PLL will show up. After that, you would still need to go through the datasheets of that subset to check for number of pins, and to check for a line like this:

On chip PLL for fast PWM (32MHz, 48MHz, 64MHz) and CPU (12MHz, 16MHz); PLL source RC & XTAL

On a quick scan, I found the AT90PWM81/161 to meet the requirements, there are several others too.

\$\endgroup\$
3

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.