2
\$\begingroup\$

I've designed a circuit to utilise the ATmega328P-AU on a PCBA. I'm having trouble uploading software to the chip, and wanted to check whether you think that it's okay to have both VCC connected to ground via the same capacitor (see picture of schematic). I'm wondering if this is causing problems.

Edit: Reset is set to +5V by default. AVCC is connected to the same power supply using a seperate capacitor between vcc and ground. (I am not using anything analog in this circuit). The chip is bootloaded to use the 8MHz internal clock. (bootloading was manual and successful as far as I can tell).

Edit: I'm utilising the Arduino IDE and the MiniCore library to bootload the chip and upload the software. Bootloading is successful, but during programming I get the error:

Edit: The example breadboard for programming which I designed into the PCB (the external crystal was not included). enter image description here

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xdd.

My schematic for the PCB based of the breadboard test. enter image description here

\$\endgroup\$
9
  • 1
    \$\begingroup\$ That's probably ok. Click the edit link below your question and please answer: What is Avcc connected to? What is the state of RESET? Where is the crystal/oscillator (and if none because of config bits, how are those bits to be programmed initially?) Most micros include config bits for a variety of internal and external oscillators - are you sure yours is set (or defaults) correctly? \$\endgroup\$
    – rdtsc
    Commented Jan 3, 2023 at 17:33
  • \$\begingroup\$ Hi, thanks for the reply. I've got it correctly bootloaded to use the 8MHz internal oscillator. I've edited the picture to include the other side which has AVCC \$\endgroup\$
    – Newbie
    Commented Jan 3, 2023 at 17:45
  • \$\begingroup\$ I've also edited the post to include the answers to your other questions. \$\endgroup\$
    – Newbie
    Commented Jan 3, 2023 at 18:17
  • 1
    \$\begingroup\$ What trouble you are having and how are you trying to upload firmware? \$\endgroup\$
    – Justme
    Commented Jan 3, 2023 at 19:29
  • 1
    \$\begingroup\$ The reset is wrong if resistor is on wrong side. The breadboard layout is extremely poor, I hope you are not using it as example. It even has ground disconnected, it won't work. If the bootloader requires a crystal then it does not work without it. If you use an internal oscillator it may not be accurate enough for UART. Please try to debug if you need a crystal or if the internal oscillator is inaccurate or just runs at wrong frequency. \$\endgroup\$
    – Justme
    Commented Jan 4, 2023 at 18:25

1 Answer 1

2
\$\begingroup\$

The capacitors on VCC and GND are fine. The RX and TX pins needed to be reversed (as TX > RX, and RX > TX), and the bootloaded oscillator speed lowered to 2MHz to provide consistent uploads.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.