Arduino as ISP Programmer, using Atmel Studio 6

Hello

I recently bought a new atmega328P-PU chip, and would like to program it with my Arduino Uno ISP.

So far, I succeeded in burning the bootloader into the chip and uploading the blink sketch to its breadboard circuit.

However, when I try to upload a program from Atmel Studio 6, it gives the following error:

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

I don’t know what’s the problem. The settings on the Atmel Studio external tool is:

Title: Arduino COM5

Command: D:\Arduino\hardware\tools\avr\bin\avrdude.exe

Arguments: -CD:\Arduino\hardware\tools\avr\etc\avrdude.conf -patmega328p -cstk500v1 -P\.\COM5 -b19200 -Uflash:w:"$(ProjectDir)Debug$(ProjectFileName).hex":i

Does anyone have a solution?

Thanks

What are the fuses?

http://www.gammon.com.au/forum/?id=11633

http://www.gammon.com.au/forum/?id=11635

http://www.gammon.com.au/forum/?id=11637

Hi Gammon

Thank you for the reply, problem solved xD.

I copied the avrdude command from arduino's verbose window (when uploading to external chip) into Atmel Studio's external tool UI. Tweaked a few properties, and it worked!

D:\Arduino\hardware/tools/avr/bin/avrdude -CD:\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\.\COM5 -b57600 -D -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i

Hope this helps anyone else with the same problem.

PS, neat site! I'm definitely gonna check out your tutorials, since I'm still new at avr.

Cool! That works great using the bootloader.

I was also able to upload via ArduinoISP. So if you don't want to use the bootloader, then I setup the External Tool.

Title: ArduinoISP

Command: C:\Documents and Settings\user\My Documents\arduino-1.0.4\hardware\tools\avr\bin\avrdude.exe

Arguments: -C"C:\Documents and Settings\user\My Documents\arduino-1.0.4\hardware\tools\avr\etc\avrdude.conf" -patmega328p -cstk500v1 -P\\.\COM6 -b19200 -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i

Actually I had trouble with -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i for the target being Release vs Debug.

This worked better for either target selected, -Uflash:w:"$(TargetDir)$(TargetName).hex":i

same thing was happening to me in the beginning even though im using tinyISP , i just keep it on release all the time now. you know somehwere there is an installer that ports all or most libraries from Arduino to work on the atmel studio, i just can think of the name or place i saw it.

eddiea6987: same thing was happening to me in the beginning even though im using tinyISP , i just keep it on release all the time now. you know somehwere there is an installer that ports all or most libraries from Arduino to work on the atmel studio, i just can think of the name or place i saw it.

You mean this one? https://arduinotemplateexpress.codeplex.com/

hiduino:

eddiea6987:
same thing was happening to me in the beginning even though im using tinyISP , i just keep it on release all the time now. you know somehwere there is an installer that ports all or most libraries from Arduino to work on the atmel studio, i just can think of the name or place i saw it.

You mean this one? https://arduinotemplateexpress.codeplex.com/

Yes sir. thats it. I installed it but i have never tried using it, i feel like it defeats the purpose of trying to learn the inner workings and how to program these chips
if all I do is rely on others libraries , while useful , i would like to learn exactly how to communicate via 2wire or spi etc… so thats my reason for using atmel and because it natevly supports programing for all their chips even the ones with the ARM cores