Standalone atmega328PB circuit errors

Dear friends, I've had a lots of problems with atmega328PB. So, I use it for my project. It's standalone circuit, an in it schematics is only atmega, 16MHz crystall, 2x22pF and 10K pullup for reset. So my question is do I did this schematics correct? Is reset pullup ok for atmega328PB? Sometimes I suceed in flashing code via AVRISP (Arduino nano with uploaded ArduinoISP code on it), but that is not often. It happens 1 in 50 tries. I don't know, is it programmer or bad circuit.


Hope someone helps.

Thanks in advance!
Djordje Kostic.

Did you study:

See also:

https://microchip.my.site.com/s/article/AVR-Hardware-Design-Considerations

and, of course, the chip datasheet

Do you have a LED on the Reset pin powered from the 10k pull up resistor?

1 Like

AVRISP is not the same as Arduino as ISP
You need to select Arduino as ISP for programmer

Also, note @mikedb comment

What are you monitoring for your success?
are you using a led,,or serial messages?

Debugging status will help you figure out what’s wrong.

No, I dont have any LED's

Curently via serial

Are you selecting Arduino as ISP for programmer?
Not AVRISP.

Yes, of course. Also, I tried with Usbasp and still dont work.

Could be any of these:
layout issue
bad solder joint
wrong xtal type
wires to long between board and programmer

I see a 4 way connection dot on the RST line. Those type of connections can be deceiving as to what is actually connected.

My friend posted question before. We changed footprint to matching one. I've checked rst connections with multimeter and everything works. I jus dont know what should a problem be anymore. Im tired of it, but I really want to get it to work. Thanks for replying.

Here is pcb picture. I think that traces are not too long.

Can it be bad auto router problem?

You actually used an autorouter?

How many PCBs with microprocessors on them have you designed and have worked the first time?

Yes, I used autorouter on my shame. I've made 3 pcb designs. First one worked without problems. Even if I soldered 328p or 328pb on it. It was atmega328p footprint. Second one worked also, but as I said like 1 in 20 tries. Third one we suceeded in flashing code i think maybe 2 times.

Can it maybe be problem with SCK1 SCK0 MOSI1 MOSI0 MISO1 MISO0 ? I've connected it on zeros.

Where are your decoupling capacitors ?

Place a 100nF capacitor on RESET to GND for power up reset.

zero is correct.

Maybe that can cause problem🤔. I will add it.