Connected the SPI interface (MOSI, MISO, pin 10 to reset, SCK and power)
as soon as I run "avrdude -p m16u2 -c avrisp -P COM7 " the duty cycle of the heart beat stops (pin 9) and I get an error in pin 8 of the Arduino Mega, a few seconds later I get:
"C:>avrdude -p m16u2 -c avrisp -v -P COM7
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 : COM7
Using Programmer : avrisp
avrdude: stk500_getsync(): not in sync: resp=0x00
Is it ok to use "-c avrisp" for the Arduino Mega?
I believe the Atmega16U2-MU is working fine. I was able to program it using the Flip program via USB (Arduino-usbserial-atmega16u2-Mega2560-Rev3.hex); however, I need to change one of the fuses because the baud rate is not correct (1/8 of the desired speed) . So my final goal is to change the fuses and that is why I'm using the Arduino Mega to program the Atmega16U2-MU.
Thanks!
Stk500v1 used to be used with "Arduino as ISP". The new version uses -c arduino, which is why you need a 10 uF capacitor between Reset and Gnd on the Arduino used as Isp.
Success! I tried -b 19200 again. Why do I have to use that option?
Thanks.
Patricio
C:>avrdude -p m16u2 -c avrisp -v -P COM7 -b 19200
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 : COM7
Using Programmer : avrisp
Overriding Baud Rate : 19200
AVR Part : ATMEGA16U2
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC6
RESET disposition : possible i/o
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 :
If you look in the ArduinoISP sketch around line 140, you will find where the baud rate is configured.
// Configure the baud rate:
#define BAUDRATE 19200
// #define BAUDRATE 115200
// #define BAUDRATE 1000000
Is there a reason you are using old information? There should be a newer
Avrdude available.