Do I need to change the pins in the ArduinoISP code?
Or maybe, my NANO is just very dead. (When resetting or powering up, the led flashes once, if that is any indicator. Read that it is supposed to flash three times, to indicate, it is ok)
I didn't find the "Tools > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK"
I'm on mac, by the way. I found preferences under the Arduino menu, but nothing that looked like Show verbose....
Arduino: 1.8.0 (Mac OS X), Board: "Arduino Nano, ATmega328"
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbmodemFA131 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3, compiled on Dec 16 2016 at 13:32:25
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/HZD/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodemFA131
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude done. Thank you.
Error while burning bootloader.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I can't seem do get this to work.
I've tried following this video: https://www.youtube.com/watch?v=mq5PhM_Fz9Y
I've also tried to connect to the 2x3 pins instead of pins 10 11 12 13
Do I need to change the pins in the ArduinoISP code?
Or maybe, my NANO is just very dead. (When resetting or powering up, the led flashes once, if that is any indicator. Read that it is supposed to flash three times, to indicate, it is ok)
Arduino MEGA2560 has ISP on pins 53, 51, 50, 52. It is written also below the video you've linked. Of course, you can use ISP (2x3) connector on MEGA also - pins 1, 4, 3 instead of 50, 51, 52. It is the same but pin 53 must be connected to RESET on target device.
You need not to change the ArduinoISP code.
Arduino as ISP technique works pretty reliable. Response 0 points to wrong connection in 95% of cases.
Budvar10:
pin 53 must be connected to RESET on target device.
That video is using Arduino IDE 1.0.1. The ArduinoISP sketch included with all recent versions of the IDE always uses pin 10 unless you're using a HoodLoader board:
So even when using the Mega you still need to connect pin 10 on the board used as Arduino as ISP to the reset pin on the target board.
So, still no luck when using pin 10 on the MEGA connected to RST pin on NANO.
This is the error messages after the burn process fails.
Arduino: 1.8.0 (Mac OS X), Board: "Arduino Nano, ATmega328"
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbmodemFA131 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3, compiled on Dec 16 2016 at 13:32:25
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/HZD/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodemFA131
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude done. Thank you.
Error while burning bootloader.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
So I'm guessing, my NANO is in worse shape, than I hoped for. Right?
Mine won't work unless I put a 10uF Capacitor between Reset and ground on my Mega after loading the ArduinoISP sketch and selecting the Nano/Uno I want to put the bootloader on. I'm boot loading a Uno for my test.
Using Arduino as ISP is like playing the lottery. Some days I need the 10uF cap. and other days ,other Arduinos I don't need it. If you can't burn the bootloader, then try the 10uF cap.
Better yet, get a couple Usbasps and read up about putting the 1.06 version on it. I have been using the Usbasp for over a year and have burned 8Mhz internal bootloader on bare m128 chips that I soldered on pcb's (around 30) with very few problems. If you plug it in right it just works.
No, it is not. Arduino as ISP works reliably. It should use stk500v1 programmer for correct action (avrdude command, -c parameter) which is not generate reset pulse. Neither it is desirable. We do not want to reset the board with ISP sketch but the target. Reset pulse is generated by ISP sketch to the target board. Maybe this can help: [SOLVED] ArduinoISP & avrdude on linux - Microcontrollers - Arduino Forum.
Problem with Arduino as ISP is very slow uploading, 19200 baud. The speed can be easily increased to twice by excluding the indication. Finally, who is using this indication for additional LED. Uploads with the newest avrdude 6.3 are more efficient so the speed 19200 is no such big problem.
On the other hand, big plus is possibility to generate clock signal (small modification of sketch), e.g. for bricked chip.
OK, so maybe I exaggerated a little. But with thousands of people like me telling newcomers how to use Arduino as ISP there is bound to be many different stories.
This is my story this morning, maybe this afternoon I will have a different story. I know I have been able to burn bootloader without using the 10uF capacitor before.
Burning bootloader using Mega 250 with 10uF Capacitor between Reset and GND.
-v -patmega328p -cstk500v1 -P/dev/ttyUSB0 -b19200
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
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.02s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/home/kprims/ken/Downloads/arduino-1.8.3/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex"
avrdude: writing flash (32768 bytes):
Burning bootloader using Mega 250 without 10uF Capacitor.
-v -patmega328p -cstk500v1 -P/dev/ttyUSB0 -b19200
Using Port : /dev/ttyUSB0
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
Hmm... Is it directly from the command line? The stk500v1 surely doesn't generate reset pulse. It should be observable, the difference between e.g. -cArduino and -cSTK500v1.
BTW: You need not upload the hex for the test, just -v command for verbose output or any read is enough to be sure if it works or not. Don't waste flash writes. (K+ for your effort)
I did quick check of avrdude source code (v6.3), as I have doubts about my claim after your post. Exactly as I said, STK500v1 does not toggle DTR and RTS on serial port but Arduino yes. I'm out for couple days without possibility of testing on real board.
Today, I ran several tries using the command line.
I used a 6pin cable with the reset cut at one end (Gammon cable) so the reset could be plugged into pin 10 on the Arduino being used for the programmer.
I used this for input after uploading the ISP sketch, and only having to change -P/dev/xxxxxx.
Using mainly -cstk500v because that's what the Ide1.8.3 seems to select when using "Arduino as ISP".
Every board I checked worked without the capacitor, except for two Mega 2560 (Clone's).
The rest, Uno Clones both Dip and SMD and Genuine Uno and Pro Micro worked without using the capacitor.
I used -carduino on a couple of boards and had to use the capacitor.
My unprofessional opinion is it mainly depends on what boards you happen to be using.
Excellent, I do not understand what is with your Mega2560 clones but as I wrote -cSTK500v1 does not toggle DTR and RTS, on the other hand -cArduino is with DTR and RTS (during whole transfer). This is the only difference between them, I checked source code again. I tested it also only with my board with same result.
The conclusion (IMO) is that averdude with -cSTK500v1 parameter does not produce DTR and RTS pulse so the capacitor for keeping reset pin high is not needed.
Another thing can be possible: IDE also toggle DTR and RTS. On the older v1.0.x it was so. I don't know how it is with the newest version.