Avrdude problem uploading to ATMEGA328

Hello everyone.

I am trying to make a simple LED blink using the microcontroller ATMEGA328P on breadboard, serial port and Arduino from here .

However, I got his avrdude problem while trying to upload the code into the microcontroller. I also have refer the forum through here and try the possible suggestions but still not working . Kindly need your advices regarding this issue.

I'm using Win10 and Arduino IDE (latest version). I've done the following but the avrdude still occur:

  1. changed the board from UNO to Nano and select the 328P / 328P (old bootloader)
  2. Installed FTDI serial drivers, and use #include <SoftwareSerial.h) library
  3. Installed Minicore driver, use ATMega 328p board
  4. Changed the programmer from one to another
  5. Bought new ATMEGA328p without bootloader and burnt the bootloader into it

The error that I got appears as:

> vrdude: Version 6.3-20190619
>          Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
>          Copyright (c) 2007-2014 Joerg Wunsch
> 
>          System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
> 
>          Using Port                    : COM3
>          Using Programmer              : arduino
>          Overriding Baud Rate          : 57600
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
> avrdude: stk500_recv(): programmer is not responding
> avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x01
> 
> avrdude done.  Thank you.
> 
> Problem uploading to board.  See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

My code is :

#include <SoftwareSerial.h>

volatile int value = 1000; //Set the delay integer

void setup() {
// put your setup code here, to run once:

pinMode(13, OUTPUT); //Set digital pin13 as output
attachInterrupt(0, blink, RISING); //attch an interrupt module
}

void loop() {
// put your main code here, to run repeatedly:
Serial.begin(9600);
digitalWrite(13, LOW); //Set digital pin13 to Logic 0
delay(value); //Set delay value to milliseconds
digitalWrite(13, HIGH); //Set digital pin13 to Logic 1
delay(value); //Set delay value to milliseconds
}

void blink() {

value = value - 200; //Decrease the interrupt by 200
}

Is your circuit exactly as shown in the PDF at the "Schematics" download on that page, or have you made any modifications?

Make sure you have the exact same Tools > Board and all other Tools menu selections exactly the same when uploading as you had them set when you burned the bootloader.

Is your circuit exactly as shown in the PDF at the "Schematics" download on that page, or have you made any modifications?

Yeah I follow exactly the same as shown in PDF 'Schematics' and also on the video. Didn't made any modifications. You may refer the image below:

Make sure you have the exact same Tools > Board and all other Tools menu selections exactly the same when uploading as you had them set when you burned the bootloader.

Yes I follow exactly the same as here

I don't see the series 0.1 uF capacitor on the DTR line (C5):
Clipboard01

I don't see the required decoupling caps, Vcc to ground and AVcc to ground.

What is the pushbutton connected to the TX pin doing? Why a pull down resistor? What value resistor?

Sorry for that. I forgot to reconnect it after plug out from the circuit as I saw someone ( i lose trace which person ) said in the forum it works fine for him when he disconnect it from the circuit but it didnt works for me.. You may refer the new connection as below:

Hi, I cant understand what do you mean. can you clarify more on this ? I also read 2 different sources from here and also here. I'm getting confused with it.

The pushbutton connected to it act as se/reset button to trigger the void blink () function decreasing the interrupt for 200 and makes the LED blinks faster.

The resistors that connected to the LED are 100ohm while the others are 10k ohm. The pulldown resistor needed to set the pushbutton to be actively low (correct me if i'm wrong).

There needs to be 0.1uF caps from Vcc to ground and from AVcc to ground.
AVcc needs to be connected to 5V.

attachInterrupt(0, blink, RISING); //attch an interrupt module
If the pushbutton is to generate an interrupt on interrupt 0 the push button needs to connect to pin 2, not the TX pin. And if the pushbutton is active low the interrupt should be FALLING.

I got a closer look at the wiring of the pushbutton. Now I see that the resistor is to Vcc (a pullup) and so is the other side of the button. The green wire should go to ground to make an active low pushbutton.

You mean like in the picture below ? I try it but it not resolve the problems for now.

I have tried change it from the pin 3 to pin 2 as you said, the result is still the same, the code still cant be uploaded into the ATMega328p.

You might see it wrong. Only 1 resistor is a pullup resistor which is the first pushbutton (near the RED LED) because it connects to the VCC. The other pushbutton is a pulldown resistor as it connects to the ground. You may refer again to the latest picture that I've uploaded. Maybe this picture is clear than the previous picture.

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