ATmega328-AU with CH340G - "Programmer is not responding" Error

Hello everyone,

I'm working on a custom board using the ATmega328-AU microcontroller and the CH340G USB-to-serial converter. I'm trying to upload a sketch using the Arduino IDE, but I keep getting the following error:

Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
An error occurred while uploading the sketch
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x58
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x58
...

My Setup:

  • Microcontroller: ATmega328-AU
  • USB-to-Serial Converter: CH340G
  • Clock: 16MHz external crystal with 22pF capacitors
  • Power Supply: 5V regulated
  • Arduino IDE Version: [Your IDE version]
  • Board Selection:
    • Tools > Board > Arduino Nano
    • Processor > ATmega328P (Old Bootloader)
    • Correct COM port is selected in the IDE.

Troubleshooting Attempts:

  1. Verified that the CH340G driver is installed (COM port is visible in Device Manager).
  2. Tried both "ATmega328P" and "ATmega328P (Old Bootloader)" options.
  3. Checked all wiring and ensured proper pull-up resistor on RESET.

Here is the schematics and PCB:

Questions:

  1. Are there any specific settings for the CH340G that might help?
  2. Does the ATmega328-AU come with a pre-installed bootloader, or do I need to burn it manually? I watched a video where the person confirmed that the AU version comes with a bootloader. Am I correct?
  3. Is there anything else I should check in my circuit?

Any help or suggestions would be greatly appreciated!

Thanks in advance.

It is possible to purchase chips that are pre-flashed with a bootloader. However, this is not a standard thing. So if the seller of the chip did not explicitly state that the chip has a bootloader, then it is certain that it does not have a bootloader.

One of the possible causes of the error you got when uploading is the absence of a bootloader.

This can be solved by flashing the chip with a bootloader. You will need an ISP programmer to do this. If you don't have access to a dedicated ISP programmer, you can use a spare Arduino board as an "Arduino as ISP" programmer.

It will be a bit challenging to flash the bootloader to the chip on your specific board though because it requires making electrical connections to the SPI bus pins and the reset pin. You could temporary solder some magnet wire to the pins.

2 Likes

You need wire up ISP to that 328 I'm afraid. For next version of the PCB, connect and put a pin header fingerprint. When the board is made, you can skip to populate the header, but if the need arise, it's easy to solder it in.

Thank you for your response, @ptillisch

I reviewed a video from a well-known YouTuber, who mentions that ATmega328 ICs with the "-AU" suffix come with a pre-installed bootloader:
Video link

Additionally, I have referenced the datasheet for the ATmega328-AU from LCSC:
Product link

However, I could not find explicit confirmation regarding the presence of the bootloader in the provided documentation. Could you please verify this information?

Furthermore, I would like to inquire if there are alternative methods to upload the bootloader without requiring hardware modifications such as soldering. The board is currently with my customer, who lacks soldering experience, and I am seeking a feasible solution for them.

Your insights would be greatly appreciated.

First he talks about the -PU suffix. Second there's no mention of the source for that claim. Sure he's well known (I've watched a few of his vids), but it doesn't mean they're always right.

I can - me neither. I've heard, that some chips had bootloader installed, but if you buy them from the authorized resellers that would / should not be the case.

Edit: Besides this would add nothing to your existing knowledge since you cannot verify this in the particular 328 we're discussing.

Sorry can't help you there. Signals cannot be made to jump. Ship them another board with a bootloader?

Win 11 and CH340G drivers have had (at least in the past), problems. Just search the forum here.

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