2

Now I have these Arduino Pro Mini from Sparkfun. They are the latest version that I know (yeah, it's the one that have those horrible misaligned pins). Now they are designed around the ATmega328P and have a 16MHz crystal on them.

Now, my question is: Can I run an ATmega328 with a 16MHz crystal while supplying ONLY 3.3V.

The reason I'm doing this is because 5V / 16MHz Pro Minis from China are way cheaper then 3.3 / 8MHz.

Facts that I already know:

If I follow the datasheet to the the letter, this configuration should not work. BUT... After some test, it did work.

Also, I want an answers based on personal experience (NOT OPINIONS) and not datasheet and specs.


[EDIT] Including a way to use the internal clock (at 8MHz) of the ATmega328P would really help!

  • 4
    I doubt anyone here has personal experience testing all the peripherals and instructions of the chips, on hundreds of samples, over the full operating temperature range. That's why, when you care about reliability, you rely on the datasheet. If reliability is not an essential requirement of yours, you already know it works. – Edgar Bonet Oct 19 '16 at 15:37
  • The OLIMEXINO-32U4 can be jumpered for 5V or 3.3V and uses 16MHz. The manual has more info about this on page 14. – gone Oct 19 '16 at 17:17
  • Set the crystal driver to full-swing and initial prescaler to /8, and then switch to /2 in one of the initialization sections. – Ignacio Vazquez-Abrams Oct 19 '16 at 23:56
  • Including a way to use the internal clock (at 8MHz) of the ATmega328P would really help! - what does this mean? You want to know how to use the internal clock at 8 MHz, or run it at 16 MHz using the internal clock? – Nick Gammon Oct 21 '16 at 4:04
  • 1
    @canadiancyborg the point was not to regulate it down, but you dont have to step up everything. Just the feed to the AT chip. – Magic-Mouse Oct 21 '16 at 11:41
6

Officially, no. Practically, often but not always.

If I follow the datasheet to the the letter, this configuration should not work. BUT... After some test, it did work.

The data sheet does not say that it "should not" work, it says that it is that the part is not qualified for operation at 16 MHz below some voltage higher than you want to use. That does not mean that a given chip cannot work there, it only means that a chip that fails to may not be considered "bad". Failure may be total and obvious or subtle.

In practice I have seen it work, both on small modified import boards and those with switchable power supply voltage. But I also recall seeing it fail to work.

Two factors that can make a theoretical difference are part-to-part manufacturing variation and operating temperature.

Note that with an ISP setup you can change the fuses to run the chip on what was sold as a 5v external crystal board, to operate from the internal 8 MHz oscillator instead, and you can do this even while leaving the crystal on the board. If you also change the brownout detector fuse, you can lower the voltage further, for example to operate without a regulator directly on two AA cells. Of course that applies to the ATmega itself - any other active components on the board would have to be qualified for the intended voltage too.

3

According to the datasheet you need 3.78V to run at 16 MHz, and 3.3V isn't that far off. I would be surprised, for example, if it stopped working at 3.77V, because that would mean that the operating at 3.78V was marginal.

I have operated these chips out of spec, for example under voltage, or with a 24 MHz crystal. They seem to work. However I would guess that Atmel's position would be: if you operate out of our specs, don't come crying to us if it is unreliable.

A few percent out of spec will probably work - and 3.3V is 87% of 3.78V. They write those specs to allow for fluctuations in the manufacturing process, and are confident that all their chips would meet them. Probably a lot of chips would be over spec.


Including a way to use the internal clock (at 8MHz) of the ATmega328P would really help!

Set the fuses appropriately. See Engbedded Atmel AVR® Fuse Calculator

For the Atmega328P making the low fuse be 0xE2 should do it.


The reason I'm doing this is because 5V / 16MHz Pro Minis from China are way cheaper then 3.3 / 8MHz.

Be cautious that cheap clone boards may be manufactured with manufacturers' "seconds".

  • Thanks. Just as a note that the cheap chinese board i have look EXACTLY like originals by sparkfun. all the trademarks are there, and even the oshw logo is there. i doupt they are fake and if they are, well they still did a lot of effort. – Dat Ha Oct 21 '16 at 11:33
3

I've built a few 3.3v home-brew-duinos with 16Mhz crystals (because I have a bag of 50 xtals!) - they run fine in the conditions I've put them in so far (on my desk). Some of them may be closer to their margins than others, and might fail at at some otherwise in-spec temperature, for example. If these were intended to go outside (enclosed, of course), I'd have to test them against the conditions they might be subjected to. Or redesign them to keep them in spec in the first-place.

I think the only way to know is to try it on your board and see. I don't have or know of a test-suite for the chip; I've just uploaded known-working sketches to my experimental boards and had no obvious glitches. Yet.

2

A little test, not very scientific, but shows it runs fine on 3.3V - https://www.youtube.com/watch?v=If0eOa0Uj5I.

Again, if you would like to stay withing the specification just use a "clock divider/2" and run your MCU at 8MHz if they have a 16MHz Crystal:

clock_prescale_set(clock_div_2)

http://www.nongnu.org/avr-libc/user-manual/group__avr__power.html

  • 1
    If you set this in software, it requires first booting at 16 MHz. If you want to use the clock divider this seems like a better proposal, though I can't say I've tried it: arduino.stackexchange.com/a/5413/612 – Chris Stratton Oct 20 '16 at 5:33
  • Good point, the fuse sets thw clock prescaler to clock_div_8, you can bring it back to clock_div_2 on the first line of your code. Don't forget you'll need the bootloader with the correct speed if you plan to use code upload via usb/serial. – Talk2 Oct 20 '16 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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