Electronic – ATmega 8: target doesn’t answer 1

atmegaavrdude

I am trying to connect my atmel atmega8 with usbasp (V0.2) to my PC.
I follow this tutorial to connect my atmega to usbasp.

I have a 6-pins connector:

o MISO   o VCC

o SCK    o MOSI

o RESET  o GND

Once I connect my usb to my PC, led turns on, and in Control Panel (win7) I see "libusb-win32 devices".
After having compiled main.c with winAVR "make" command, if I try to use "make program" command or I write in cmd this:

avrdude -p atmega8 -P m8 -c usbasp -U flash:w:main.hex

system tells me:

avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connection and try again, or use -F to override this check

How can I solve this problem?

Best Answer

Check the pinout, then check it again once more.

One frequent problem is speed - vanilla Atmega8 is too slow, USBasp has a switch that switches it to slower mode - you can try that.