Atmega 328P-au standalone

Hello dear community,

I have a project running, which has cost me a lot of time and nerves.

I developed the whole project in the Arduino IDE and tested it on a Nano Clone with 5V/16Mhz (external crystal). So far all is well, the program runs.

Now comes the tricky part that "destroyed" me mentally for 2 weeks:

I now have several new Atmega328P-Au chips, which I now want to have written with the program. However, I forgot that the chips should be operated standalone (with 3.4V voltage and without any capacitors or external crystal). I have a socket where I can place the chips, I just need a programmer and an approach how to proceed.

What do I have to consider or what do I have to calculate with when I change from 5V/16Mhz/external crystal to 3.3-3.4V/8Mhz/internal crystal?

Thanks in advance for any answer.

Translated with DeepL Translate: The world's most accurate translator (free version)

Hi @cano62. As far as code goes, if you use a board definition that is configured for an 8 MHz clock then no changes at all are typically needed.

The timing-related Arduino core API code will automatically adjust to the clock speed so something like delay(1000) will still produce a delay of 1000 ms even though the clock is running at a different speed than your board with a 16 MHz clock.

I recommend the excellent MiniCore boards platform for use when programming an ATmega328P 8 MHz based project:

https://github.com/MCUdude/MiniCore#minicore

After you install it, you can configure Arduino IDE for your microcontroller and clock by making the following menu selections:

  1. Select Tools > Board > MiniCore > ATmega328 from the Arduino IDE menus.
  2. Select Tools > Clock > Internal 8 MHz from the Arduino IDE menus.

+1 for the MiniCore core.

Decoupling capacitors are required.

New chips, delivered from the manufacturer, have the clock fuses set to internal 8 MHz and the divide by 8 fuse set, so the clock speed is 1 MHz.

You mean for programming or running it standalone?

Is it maybe possible to get an arduino Mini with 3.3v and 8Mhz and desolder the chip and replace it with a factory atmega 328p au, Programm and remove it?

How would this help?
How good are you in desoldering/soldering?

Flash the Minicore bootloader once on your 328p-au with ISP and afterwards program it with your FTDI adapter.

I finally solved it.

I burned the breadboard 328p 8Mhz internal clock bootloader via USBasp.

Afterwards used the USBasp dongle again to write the hex file via avrdude.