Atmega328p-au bootloader error

Bought a new atmega328-au and uploaded a 8MHz bootloader using an Arduino UNO. Bootloader was successful and the LED connected to pin13 started blinking.

I removed the connections from the Arduino board after the bootloader and connected FT232RL TTL with the atmega328-au and uploded the blink code and it shows the following error.
image
It shows that code was uploaded successfully but the LED doesn't blink according to the code.

the selected board from the tools is:
Atmega328 on a breadboard (8MHz internal clock)

and the programmer is:
AVRISP mkll

This is the schematic that i used is:

Tried Arduino IDE 1.0.5 and Arduino IDE 1.8.18 but same error


int led = 13;

void setup() 
{                
  pinMode(led, OUTPUT);     
}

void loop() 
{
  digitalWrite(led, HIGH);  
  delay(1000);               
  digitalWrite(led, LOW);   
  delay(1000);               
}

Hi @waleed007

Could you instead of posting the image below, copy and paste the text into your original post, and format the text as code please.

avrdude: stk500_getsync(): not in sync: resp=0x00

Do you choose Upload or Upload Using Programmer from the menu, do you press the Upload button?

i pressed the upload button

this the error when i upload the code using
'upload using programmer'

avrdude: usbdev_open(): did not find any USB device "usb"

Alright, and the Uno you used as programmer is disconnected? Have you picked the right port before Upload?

yes i choose the right PORT

Did you use a bootloader included in the IDE, or some other, like the one from Minicore?

IDE bootloader
i used this method describe in the video to bootload and upload the code using internal 8MHz crystal

https://www.youtube.com/watch?v=nHZllsSoZp4

I have no idea if the file he used is ok, I use the Minicore board package for my projects.

Now, if you would hook up the Arduino Uno as ISP to your 328P, can the same bootloader be burned again, have you tried that?

no
didn't try to upload the same bootloader again

Blink sketch worked directly after bootloader upload?

Picking the right Port, then normal Upload (not by Using Programmer) would not give that error - stik500 is a programmer.

I'm curious if that would give an error as well. If so, the MCU could be bricked.

Btw, you could provide more information such as the OS you use, also what IDE you got there.

windows 10 and Arduino IDE 1.0.5

https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoToBreadboard?_gl=11oq2jj4_gaNTE2NzIwMjMxLjE2ODg5Njk5ODg._ga_NEXN8H46L5*MTY5NTI3Mjc5OS42NC4xLjE2OTUyNzMxNjUuMC4wLjA.

I uploaded the same old bootloader and it was uploaded without any error

image

1.0.5, wow that's old - 10 years. Current version of 1.x is 1.8.19, perhaps time to upgrade.

What I would do here, besides upgrade the IDE, is to connect the 328P to the Uno and see if bootloader (THE SAME 8MHz, Internal IMPORTANT) can be burned again. If that work, upgrade the IDE, get Minicore and install that bootloader instead. And finally, hook up your USB serial adapter and see if you can install sketches.

Edited

I also tried with the 1.8.18 and the the latest 2.2.1 but no response from the MCU

So the chip seems to be working after all, good.

Now run 1.8.18 or 2.2.1, go to File - Preferences. In Additional boards... , add this:

https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json

If you got existing URLs, add a comma at the end, and insert the above after that.

Restart IDE. Go to Tools, Board, Board Manager. Find Minicore and install.

In the same place, Board: Pick Minicore - 328. Back to Tools, Bootloader -> Yes UART0, Clock -> Internal 8 MHz, Variant -> 328P.

Programmer -> Arduino as ISP. Now burn bootloader.