Problem with programming atmega328 using ch340

I have a little pcb which uses atmega328 and i’ve been trying to program it but i constantly get error

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

which 100% works because i successfully programmed arduino pro mini (atmega328 5v) with it, but for some reason i can’t program the uc on my pcb, schematic is the following


I tried almost everything all the connections are correct (rx to tx, rx to tx), i chose arduino pro mini (atmega328 5v) and avrisp as programmer, any idea what might be wrong?, the only thing i can try is replace the uc, do you think the aref connected directly to 5v instead through a 100nf capacitor might be a problem

i am using this programmer and i soldered a wire to dtr pin of the ic and connected it to reset pin of the uc

do you have a boot loader in your atmega328?

Your schematic is missing the required decoupling caps. 0.1uF from Vcc to ground and 0.1uF from AVcc to ground.

Not a source of your trouble, but Aref should not be tied to Vcc. Tie Aref to ground through a 0.1uF cap.

Totally forgot about bootloader, that was the problem, now it uploads without a problem, thanks a lot :kissing_heart:

we’ve all been there I’m sure :slight_smile:

have fun

And can we upload the code to the microcontroller using the IDE by bootloader

Not sure what you mean. If the right bootloader is installed, you can upload code via the serial port.

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