What things to take note between 3V3 and 5V Atmega328?

Hi Arduino experts,

I understand Atmega328 can operate at 3V3 as well as 5V. Amazing. What are the things to take note when using different supply voltage for Atmega328? Here is a list I can think of based on what I read so far. Please tell me if I miss out anything else.

  • Crystal frequency. Higher crystal frequency when using higher supply voltage.
  • Change fuse value to reflect different crystal used

Is there anything that needs to be changed on the firmware side? Will the UART TTL levels be changed according to the supply voltage automatically?

Thanks.

If you look at the clock speed vs supply voltage chart in the datasheet you will see that at 3.3V you should not be running the ATmega328P at 16 MHz. Since the next lower Arduino clock rate is 8 MHz you can run it at that speed.

Connect an 8 MHz crystal or resonator.
Select "Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328" from the Boards menu.
Burn the bootloader.

Then you can treat your ATmega328P as an "Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328".

Alternatively you can use the internal 8MHz RC Oscillator:

Connect an 8 or 16 MHz crystal or resonator if the previous fuse settings require it.
Download a boards.txt file for an ATmega328P with internal oscillator.
Save that file in the hardware sub-folder of your sketch folder.
Re-start the Arduino IDE.
Select "ATmega328 with internal oscillator" in the Boards menu.
Burn the bootloader.

1 Like

lightaiyee:
Hi Arduino experts,

I understand Atmega328 can operate at 3V3 as well as 5V. Amazing. What are the things to take note when using different supply voltage for Atmega328? Here is a list I can think of based on what I read so far. Please tell me if I miss out anything else.

  • Crystal frequency. Higher crystal frequency when using higher supply voltage.
  • Change fuse value to reflect different crystal used

Is there anything that needs to be changed on the firmware side?
There is also a fuse setup for the voltage brown out detector setting.

Will the UART TTL levels be changed according to the supply voltage automatically?
Yes, all digital output pins HIGH voltage value will be reflected by the operating voltage
of the chip, and all digital and analog input pins will have a maximum voltage input rating also reflecting
the operating voltage.
Lefty

Thanks.

I want to use a 328 for a project that at the moment I use CMOS chips for.
It runs from a 3v battery.

I am happy to use the internal 8 Mhz clock that johnwasser mentions in this thread. I need to get the unit to report approx every 24 hours, so I want to try and use the watchdog timer, and increment a counter until it gets to 24 hours. ( I still have to work this out )

I also have to be able to have an interrupt send a code at any time when an input is triggered.

I will be using VirtualWire to transmit, and would normally have the baud rate set to 4000 for the cheapy rf modules I am using, will I have to set the boardrate to 8000 to get the same baudrate for the receiver to detect?

And will the watchdog timing be twice as long?