I am going to be brief here. So I got my Atmega328p(this is datesheet of atmega328p) microcontroller from Arduino Uno(I pulled it out of the board). And then I bought my USBASP programmer chip to program my MCU. I properly installed its x64 drivers. Then I made my program to turn an LED on. It got compiled successfully and generated the hex file nicely. BUT! when I try to program my MCU it gives an error like this:-

ERROR LOG:-

avrdude -p atmega328p -P usb -c usbasp    -U flash:w:LEDON.hex   avrdude: error: programm enable: target doesn't answer. 1  avrdude: initialization failed, rc=-1          Double check connections and try again, or use -F to override          this check.   avrdude done.  Thank you.  make.exe: *** [program] Error 1   

Then I try to program it using the -F parameter to know the problem more deeply, and I get this error:-

avrdude: error: programm enable: target doesn't answer. 1   avrdude: initialization failed, rc=-1   avrdude: AVR device initialized and ready to accept instructions   avrdude: Device signature = 0x000000   avrdude: Yikes!  Invalid device signature.   avrdude: Expected signature for ATMEGA328P is 1E 95 0F   avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed     To disable this feature, specify the -D option.  avrdude done.  Thank you.  

I have tried everything, but nothing is working. I am using WinAVR on Windows 10 x64 OS. I can put the code if you guys want. Also I have double checked my MOSI, MISO, SCK, RST, Vcc and GND connections. They are perfectly fine.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity