Programming frimware

iam trying to program atmega16 using my usbasp programmer it produces this error. i double checked the connection and tried but ending in same error

"make.exe" program avrdude -p atmega16 -P usb -c usbasp -U flash:w:main.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 > Process Exit Code: 2 > Time Taken: 00:00

i think this is due to frimware problem, so i tryied to re-burn frimware using another usbtiny in  winavr


the make file is

 


MCU_TARGET     = atmega8
FLASHER        = avrdude -c usbasp -p $(MCU_TARGET)

usbasp: fuses
    $(FLASHER) -B 1 -U flash:w:usbasp.atmega8.2011-05-28.hex

fuses:
    $(FLASHER) -B 200 -U hfuse:w:0xC9:m -U lfuse:w:0xEF:m
shell:
    $(FLASHER) -t


the error i get with winavr is


> "make.exe" all
make.exe: *** No rule to make target `all'.  Stop.

> Process Exit Code: 2
> Time Taken: 00:02

 

then i tried  pony prog...there also some error and probe test failed





To program an atmega16 you

To program an atmega16 you should use ‘-p m16’ and not ‘-p atmega16’.

Read this: http://www.ladyada.net/learn/avr/avrdude.html

EDIT: Seems that avrdude can also interpret the full name (I didn’t knew), but anyway the link it’s a good starting point.

EDIT2: Just to complement the most common error it’s problems with power supply.

connection is right ,i

connection is right ,i checked it right now. i think reburning the frimware can fix the prob