1

I currently have a barebone arduino built from just an Atmega 328P and a 16Mhz external crystal.

enter image description here

I planning to move this system down to 3-3.6V but I have read that on low voltage I have to use 8Mhz crytstal so my only question is that because of this change do I have to take the chip out to reflash with the programmer again or it will work as it did before?

What will happen if I do not change the oscillator and leave it on 16MHZ ceramic?

3
  • I think in particular case you may get working result, but in large sample: some set of devices won't work. This relate to internal construction of oscillator circuit.
    – imbearr
    Jul 6 '16 at 7:08
  • Software side could be easier than I thought: playground.arduino.cc/Learning/Atmega83-3V
    – JimmyB
    Jul 6 '16 at 13:56
  • If you use Serial to program the ATMege, you'd have to change the bootloader. Since it assumes it's running at 16MHz.
    – Gerben
    Jul 7 '16 at 9:17
4

...I have read that on low voltage I have to use 8Mhz crytstal...

Technically you can run anywhere below 13Mhz or so, so you have lots of choice.

You may also be able to use the prescaler to divide the clock by 2, either by hoping the ATmega can run the short time at 16MHz, or by programming the CKDIV8 fuse to start it at 2MHz.

...do I have to take the chip out to reflash with the programmer again...

If you move to a frequency within spec with either a clock change or prescaler use, yes. The bootloader and Arduino libraries expect a 16MHz clock, so you will have to rebuild the bootloader with the new clock rate, and sketches that use delay() et alia as well as the intrinsic delay functions will also need to be rebuilt.

What will happen if I do not change the oscillator and leave it on 16MHZ ceramic?

It may work, it may not.

2
  • So can I use a programmer circuit with 16Mhz code for the reprogramming of the firmware (an arduino uno)? Even if after programming it becomes unavailable in the uno and works in the final circuit.
    – Defiler
    Jul 6 '16 at 7:42
  • 1
    You would use a ISP programmer to program the bootloader for the new clock. After that you can program it as normal. Jul 6 '16 at 7:44
4

I planning to move this system down to 3-3.6V but I have read that on low voltage I have to use 8Mhz crytstal so my only question is that because of this change do I have to take the chip out to reflash with the programmer again or it will work as it did before?

Any time-sensitive code -- such as delays and UART I/O -- will run at half speed with the 8 MHz crystal. If any of this matters, you'll need to reprogram the chip. (This will include the bootloader, which will now run at half the baud rate it used to!) If this is OK, though, you can leave it alone.

What will happen if I do not change the oscillator and leave it on 16MHZ ceramic?

The ATmega328P isn't specified to run reliably at 16 MHz at 3.3V. Many chips will actually work at this speed, but some will fail, possibly in subtle ways or at inconvenient times. Don't rely on it working.

Your Answer

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