Atmega328p-pu full setup 3.3v 8mhz

Hi,
I have been looking for days for a solution on how to run an Atmega328p-pu at 3.3v.
The problem arises with wanting to run a small battery project with an atmega328p at 3.3v, so I inquired and saw some video showing that you can use this 3.3v chip with 16mhz. I tried to make it work at 3.3v with 16mhz but I can't (for example with a blink, the led does not turn on), plus I discovered that with this configuration you are at the limits of the safe area according to the datasheet, so I found on the internet a solution and says to use an 8mhz crystal. I tried to make it work at 3.3v with 8mhz, but even here the led does not turn on (as well as the delay is double, but that I understand why). Can anyone get me a little guide on how I should go about making an Atmeg328p-pu work with 3.3v? the crystal can be either 16mhz or 8mhz, preferably 8mhz for battery saving.

Thank you all <3

Yes, you probably could, most of the time, but it's out of spec. So don't rely on it...

No, you're well beyond them.

Or even the internal RC oscillator, which won't be as precise as a crystal, but for many applications it may well be accurate enough. See the datasheet, page 30. https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf

Shall we start by going over the schematic of your circuit and a good photograph of how you've built it? Then when we've established that the hardware is OK, we can focus on the software side.

I'm gonna check for the 8mhz internal crystal.
By the way, this is my circuit, and with the multimeter tester is all OK:

The led is a debugger. Anyway i have another atmega328p in a breadboard, with a led, but i can't make it work.
Another images of the transmitter:

This is the circuit equal to an internet video where i tested the two crystals and different voltages (the led is connected to digital pin 9, 220 ohm):
schen

Ok, did you notice in the pinout of the 328p-pu that there's two pairs of GND and Vcc pins? You've only connected one of each at least on the breadboard version (can't tell if it's also the case on the perfboard ones). Try connecting ALL GND and Vcc pins, otherwise the chip won't (shouldn't) work.

The second VCC is the AVCC? i will try now connecting all GND and VCC

No.
Pins 8 + 22 are GND. Both need to be connected.
Pins 7 + 20 are Vcc. Both need to be connected.
Pin 21 is Aref. You can leave that one unconnected.

Btw, those wires sticking into your female headers are a marginal solution. Soldered connections are far more reliable.

Also, did you verify the correct value of the capacitors around the crystal? They should be 22pF. In practice 18pF to 33pF will likely work OK. It's a common error for people to connect 22nF, which won't work.

1 Like

Another exercise in "creative head-banging". :roll_eyes:

A 3.3 V Pro Mini is inexpensive (or used to be before Wuhan), contains all necessary parts in a tried and tested form, and just works.

I tried connecting as you said, and work perfectly!:

Is the Pro Mini better for a battery project than the atmega328p? i know that somebody remove the led on board of the pro mini. On my project i will wake up atmega328p every 1 minute for just 5 seconds.

1 Like

Now if i would set the Atmega328p to work with the external 8mhz? i have to use the board manager MiniCore?

Exact same processor, just in the SMD form. Two extra analog-only input pins available due to the different package.

Not necessarily better or worse, but you buy it fully assembled with all support components (and a couple not necessary) in a form that is proven to work and it tends to cost no more (and generally less) than purchasing the separate components.

Yes, for battery operation you remove the resistor that connects the pilot LED and the regulator which was always pretty useless.

Cool, nice to see that it works now!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.