program atmega8a using arduino as isp

i uploaded arduino isp on my arduino(atmega328p)... and i have hex file generated from winavr...i connected vcc,gnd,reset,MOSI,MISO,SCK pins of both arduino(programmed as isp) and atmega8....

and typed in cmd

C:\Users\ADMIN>avrdude -p atmega8 -P com11 -c arduino -U flash:w:main.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA8 is 1E 93 07
Double check chip, or use -F to override this check.

avrdude done. Thank you.

i got the signature of atmega328p not atmega8 y?? i didnt programmed bootloader on atmega8 becoz i'm using win avr not arduino IDE is this ok?

Try something more like avrdude -p atmega8 -P com11 -c stk500v1 -U flash:w:main.hex
What you are getting is avrdude talking to the 328 in your arduino, not the mega8. The 'arduino' protocol talks to the bootloader. The stk500v1 protocol talks to the ArduinoISP code.

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\ADMIN>avrdude -F -P COM11 -b 19200 -c avrisp -p m8 -v -e -U flash:w:mai
n.hex

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "E:\program files\winavr\bin\avrdude.
conf"

Using Port : COM11
Using Programmer : avrisp
Overriding Baud Rate : 19200
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done. Thank you.

C:\Users\ADMIN>avrdude -F -P COM11 -c avrisp -p m8 -v -e -U flash:w:main.hex

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "E:\program files\winavr\bin\avrdude.
conf"

Using Port : COM11
Using Programmer : avrisp
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done. Thank you.

C:\Users\ADMIN>avrdude -F -P COM11 -c arduino -p m8 -v -e -U flash:w:main.hex

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "E:\program files\winavr\bin\avrdude.
conf"

Using Port : COM11
Using Programmer : arduino
AVR Part : ATMEGA8
Chip Erase delay : 10000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page
Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack



eeprom 4 20 128 0 no 512 4 0 9000 90
00 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 45
00 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
calibration 0 0 0 0 no 4 0 0 0
0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0
0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA8 is 1E 93 07
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (104 bytes):

Writing | ################################################## | 100% 0.06s

avrdude: 104 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 104 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.09s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x12 != 0x1b
avrdude: verification error; content mismatch

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: Fuses OK

avrdude done. Thank you.

C:\Users\ADMIN>avrdude -P COM11 -c arduino -p m8 -v -e -U flash:w:main.hex

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "E:\program files\winavr\bin\avrdude.
conf"

Using Port : COM11
Using Programmer : arduino
AVR Part : ATMEGA8
Chip Erase delay : 10000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page
Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack



eeprom 4 20 128 0 no 512 4 0 9000 90
00 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 45
00 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
calibration 0 0 0 0 no 4 0 0 0
0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0
0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA8 is 1E 93 07
Double check chip, or use -F to override this check.

avrdude done. Thank you.

C:\Users\ADMIN>avrdude -p atmega8 -P com11 -c stk500v1 -U flash:w:main.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

got 0x00 as signature

Do you have the Reset pin connected? As a matter of fact, please post pictures of your setup. (Not schematics, pictures.)