[CMD] avrdude results in error (not in sync). Even programs can be uploaded

Hello,

I got my Arduino Uno Rev. 3, ATmega328 today and would like to use it to flash some ATMEGA8 chips. So far I can compile, upload and execute programs using the Arduino debugger/programmer tool.
I'm following this guide in order to flash some ATMEGA chips.

But I'm stuck at step 3 where it tells me to execute the following line via CMD:

avrdude -p m8 -b 19200 –B 4 -c avrisp -P COM1

I changed it to COM3 since this port was auto-selected by the Arduino Debugger.
I can communicate with the Arduino Board. But I get the following error:

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

I googled a lot and tried unplugging the board, changed the COM Port and so on.
After that I tried some troubleshooting on CMD. Entered another device value (one that fits my board). I was unable to connect at all (since no COM was defined).
But as soon as I define the right COM (meanwhile it's COM6) I get the same error from before.

avrdude -p m328p -c avrisp -P COM6

Any idea?

Try “stk500v1” where you currently have “avrisp”. Add “-vv “ for additional debug info

This gave me the following:

C:\Windows\system32>avrdude -p m328p -c stk500v1 -P COM6 -vv

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 "C:\WinAVR-20100110\bin\avrdude.conf"

Using Port : COM6
Using Programmer : stk500v1
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done. Thank you.

C:\Windows\system32>

What are you using as isp programmer? If it is an arduino, did yoj remember to upload arduini as isp sketch to it?

DrAzzy:
What are you using as isp programmer? If it is an arduino, did yoj remember to upload arduini as isp sketch to it?

avrisp mkll

And you own an AVRISP MkII and have connected it to the ISP pins of the target processor?

What are you using as isp programmer?

avrisp mkll

In that case, I take back what I said about using "stk500v1" - from your initial post, I assumed that you were using the Uno as a programmer...

westfw:
avrisp mkll
In that case, I take back what I said about using "stk500v1" - from your initial post, I assumed that you were using the Uno as a programmer...

should I burn the bootloader or something?
I just did the exact same as told in the guide

Well, I have uploaded the ArduinoISP script and after executing:

avrdude -p m328p -c stk500v1 -P COM6 -vv

I've got the following:

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 "C:\WinAVR-20100110\bin\avrdude.conf"

Using Port : COM6
Using Programmer : avrisp
Overriding Baud Rate : 19200
Setting bit clk period : 4.0
AVR Part : ATMEGA328P
Chip Erase delay : 9000 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 MaxW ReadBack


eeprom 65 5 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500
Description : Atmel AVR ISP
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

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.

Still don't get the signature of my chip on the bread board. As soon as I connect the reset wire I get the not in sync error again.

EDIT: I had to wire the reset wire to PIN 10 and got the following:

avrdude: Device signature = 0x1e9307
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.

avrdude: Device signature = 0x1e9307

That matches an ATmega8, so that's good news.
To program the atmega8 you need the "-p m8" that you had initially...

westfw:
That matches an ATmega8, so that's good news.
To program the atmega8 you need the "-p m8" that you had initially...

Did that, everything worked fine :slight_smile:
Thank you