In between the bouts of readings, I typically would stumbleupon information that is very necessary to judge the current state of myArduino. For example, on a healthy board, when any code whatsoever is loaded(in the presence of a bootloader), every time the user would press the Resetbutton, the LED labelled L on the Arduino (the one connected internally to the13 th pin through a resistor) should blink.
That means a bootloaderis present.I would get the response as:avrdude stk500getsync: not in sync 0x00avrdude stk500getsync: protocol error, expect=0x14, resp=0x51.And 3 requests being send to the board and none received. Sorry that i cannot produce the exact error code right now, i did not have the making of this blog on mind when i was solving the problem. Kicked in the butt by failure4-5 hours later, after trying a few different burningtrials, I was devastated in the face of failure. I was still thinking that itis only a circuit trace gone bad in which case I might not be able to help it,but still I needed to know the problem.
Tried a few more times, and I actuallyended up trashing the bootloader on my Mega 2560, and it also started givingthe “not in sync 0x00” error. Frustrated, I left the problem, and ordered aUSBASP v2.0 LC Technology programmer and 2 bootloaded Atmega 328P-PU MCUs.
A packet of Rays of Hope Arrive (Programmer and bootloaded chips)Fast forward a few days, my programmer and the 2Atmega328P-PU chips arrived. The Programmer was fine but the packaging in whichmy Atmegas arrived made me wary of whether the chips were bootloaded at all toeven start with. It looked to me like factory packaging, having experience withfactory packaging after ordering components from Element14. The first thing Idid after that was to pop in the new Atmega328P-PU chip and try to program theboard hoping (even though I had never abused the board) that it might be ablown chip that was giving me all the trouble. But to no avail.
The new chips,both of them, refused to take code and gave slightly different errors, but on the same lines as the original one. Multiple Arduino Versions, Drivers, CablesStill, I tried to program the chip via the programmer I had justbrought. Multiple Arduino versions ranging from 022 to even the 1.5.7 one wereused, in case there was something about the Windows 8.1 compatibility. Eventried the different driver versions. The 1.5.7 version I had was one which camebundled with signed drivers for windows 8.1. I even uninstalled all drivers Ihad and tried all versions of drivers available easily.
The latest version, thelast version, and another driver not even for the Arduino, but one that people usedwhen the driver signing was not letting people use their Arduino boards ontheir Windows 8.1 machines. Nothing worked here too.
'Auto set sck (because the default is null)Please upgrade the firmware.initialization failed rc=-1Run with –F to ignore these'.So as it suggested, I ran it with –F (AVRDude was used, not Arduino). Again the verbose output would beAuto set sck (because the default is null)Please upgrade the firmware.initialization failed rc=-1invalid device signature 0x00000expected device signature is 1e 95 0Fplease recheck connections and try again.Damn. I was pretty close to ordering a new Arduino Uno. But the pain ofhardware just lying there because of my incompetence in repairing it wassomething I would not take. So I searched some more.Re-Introduction with the DevilFast forward a few more days. I sat down again, feeling determined to make thisthing work, my mind almost forgetting the failure I had endured the last twotimes. But the best thing was, I was taking up the problem with a well settled,untroubled mind, so I could take on to the problem with a new perspective.The first thought that occurred to me was to try and reflash firmware again,because it might have been problems with wiring the last time.
The error alwayssaid “Auto set sck time”. And all thesetiming troubles, well most of them, come from incomplete/incorrect circuits. Theprogrammer I had was the USBASP LC technology v2.0, so I took out a multi-meterto check for grounding. This particular version is 10Pin version.
Avrdude Stk500_getsync() Not In Sync Resp=0x00 Bootloader
The Arduino software said Burning Bootloader, this might takea minute. The L LED flashed on the Mega 2560, and no errors, no verbose text was reportedin Arduino. So I left it on for 5 minutes or so, then, believing that theprocess still did not work and from 1 bad Arduino I was officially onto 2 badones, I unplugged it and put it on USB to check for the Bootloader Blink (Bad idea, because unplugging the chip while bootloader is being flashed is a bad idea, NOT RECOMMENDED).
To myastonishment, the bootloader had been written, and clicking the reset button,blinked the L LED. Meant that the bootloader was now present on the Mega2560. I checked with Arduino, trying toupload the blink program and it worked flawless, to my relief. So I had passed the Blink Test on one Board atleaset. Fig X This is the circuit that should be at last, soldered onto the boardNote: I could have used a more 'Low Profile' Oscillator, like the one used for the Atmega16U2 on the board, but i did not have that on hand.
And i wanted the board working at any cost, so i went with the bigger one only.Note 2: The resistor connected in parallel to the Resonator is there for stability reasons. It is not needed for the Crystal Oscillator. So removing it is recommended. You can see this resistor in the Fig X of Mega 2560 on the right side of the Resonator. Desolder it.And I came up with a scheme to solder the Crystalremoving the remnants of the Resonator. I have a working UNO now. PS: Please dont mind the Pictures, I really did not have this blog in mind when i started the Fixing of the UnoPPS: LinksUSBasp Firmware Upgrade: Mega and Uno Programming: Arduino Circuit for Breadboard: Mod: little Different: above link, parkyjimbo's link, was very tempting, as i could have solved the problem with only a single wire.
But afraid of stability issues I.might. have faced (USB Timing, very crucial, not to be played with) I went with the addition of Crystal method.PLUS: My Uno's timings are more accurate now! YAY!I also foundPeople in problem, search search and search and you WILL find the solution is what i have learned from this experience. Arduino: 1.6.10 Hourly Build 2016/07/20 04:33 (Windows 10), Board: 'Arduino/Genuino Uno'Build options changed, rebuilding allSketch uses 4,792 bytes (14%) of program storage space. Maximum is 32,256 bytes.Global variables use 278 bytes (13%) of dynamic memory, leaving 1,770 bytes for local variables.
Many thanks for this. I have tried to build a “minimal” Arduino, but wanted to run it at 3.3V instead of 5V so used a 12 000 MHz crystal instead the normal 16 000 MHz one. Kept getting the “not in sync” error. Your article brought me to the idea about the crystal. So I replaced the 12 000 MHz crystal with a 16 000 MHz one and programmed at 5V. Worked!I can still run the programmed ATMEGA328-P with the 12 000 MHz crystal though, just can’t program it. Looks like I have to program and test at 16 000 MHz and 5V first and then use 3.3V and 12 000 MHz to run it.
Hi, I always used my arduino as isp without any problems, however, last night when i was testing something i got a little bit of dirt on my board, it works fine, the blinky blinks! But when i use it as a programmer, this is what happens with nothing but arduino connected to my PC.
The same happens when i connect my attiny:# sudo avrdude -p t13 -P /dev/ttyACM0 -c avrispavrdude: AVR device initialized and ready to accept instructionsReading ################################################## 100% 0.01savrdude: Device signature = 0x000000 (retrying)Reading ################################################## 100% 0.01savrdude: Device signature = 0x000000 (retrying)Reading ################################################## 100% 0.01savrdude: Device signature = 0x000000avrdude: Yikes! Invalid device signature.Double check connections and try again, or use -F to overridethis check.avrdude done.
In between the bouts of readings, I typically would stumbleupon information that is very necessary to judge the current state of myArduino. For example, on a healthy board, when any code whatsoever is loaded(in the presence of a bootloader), every time the user would press the Resetbutton, the LED labelled L on the Arduino (the one connected internally to the13 th pin through a resistor) should blink. That means a bootloaderis present.I would get the response as:avrdude stk500getsync: not in sync 0x00avrdude stk500getsync: protocol error, expect=0x14, resp=0x51.And 3 requests being send to the board and none received. Sorry that i cannot produce the exact error code right now, i did not have the making of this blog on mind when i was solving the problem. Kicked in the butt by failure4-5 hours later, after trying a few different burningtrials, I was devastated in the face of failure.
I was still thinking that itis only a circuit trace gone bad in which case I might not be able to help it,but still I needed to know the problem. Tried a few more times, and I actuallyended up trashing the bootloader on my Mega 2560, and it also started givingthe “not in sync 0x00” error. Frustrated, I left the problem, and ordered aUSBASP v2.0 LC Technology programmer and 2 bootloaded Atmega 328P-PU MCUs. A packet of Rays of Hope Arrive (Programmer and bootloaded chips)Fast forward a few days, my programmer and the 2Atmega328P-PU chips arrived.
The Programmer was fine but the packaging in whichmy Atmegas arrived made me wary of whether the chips were bootloaded at all toeven start with. It looked to me like factory packaging, having experience withfactory packaging after ordering components from Element14. The first thing Idid after that was to pop in the new Atmega328P-PU chip and try to program theboard hoping (even though I had never abused the board) that it might be ablown chip that was giving me all the trouble.
But to no avail. The new chips,both of them, refused to take code and gave slightly different errors, but on the same lines as the original one.
Source code sitem akademik kampus. Multiple Arduino Versions, Drivers, CablesStill, I tried to program the chip via the programmer I had justbrought. Multiple Arduino versions ranging from 022 to even the 1.5.7 one wereused, in case there was something about the Windows 8.1 compatibility. Eventried the different driver versions. The 1.5.7 version I had was one which camebundled with signed drivers for windows 8.1.
I even uninstalled all drivers Ihad and tried all versions of drivers available easily. The latest version, thelast version, and another driver not even for the Arduino, but one that people usedwhen the driver signing was not letting people use their Arduino boards ontheir Windows 8.1 machines. Nothing worked here too. Yuri 4 pc download full.
'Auto set sck (because the default is null)Please upgrade the firmware.initialization failed rc=-1Run with –F to ignore these'.So as it suggested, I ran it with –F (AVRDude was used, not Arduino). Again the verbose output would beAuto set sck (because the default is null)Please upgrade the firmware.initialization failed rc=-1invalid device signature 0x00000expected device signature is 1e 95 0Fplease recheck connections and try again.Damn. I was pretty close to ordering a new Arduino Uno. But the pain ofhardware just lying there because of my incompetence in repairing it wassomething I would not take. So I searched some more.Re-Introduction with the DevilFast forward a few more days. I sat down again, feeling determined to make thisthing work, my mind almost forgetting the failure I had endured the last twotimes.
But the best thing was, I was taking up the problem with a well settled,untroubled mind, so I could take on to the problem with a new perspective.The first thought that occurred to me was to try and reflash firmware again,because it might have been problems with wiring the last time. The error alwayssaid “Auto set sck time”. And all thesetiming troubles, well most of them, come from incomplete/incorrect circuits. Theprogrammer I had was the USBASP LC technology v2.0, so I took out a multi-meterto check for grounding. This particular version is 10Pin version. The Arduino software said Burning Bootloader, this might takea minute. The L LED flashed on the Mega 2560, and no errors, no verbose text was reportedin Arduino.
So I left it on for 5 minutes or so, then, believing that theprocess still did not work and from 1 bad Arduino I was officially onto 2 badones, I unplugged it and put it on USB to check for the Bootloader Blink (Bad idea, because unplugging the chip while bootloader is being flashed is a bad idea, NOT RECOMMENDED). To myastonishment, the bootloader had been written, and clicking the reset button,blinked the L LED. Meant that the bootloader was now present on the Mega2560. I checked with Arduino, trying toupload the blink program and it worked flawless, to my relief. So I had passed the Blink Test on one Board atleaset. Fig X This is the circuit that should be at last, soldered onto the boardNote: I could have used a more 'Low Profile' Oscillator, like the one used for the Atmega16U2 on the board, but i did not have that on hand.
And i wanted the board working at any cost, so i went with the bigger one only.Note 2: The resistor connected in parallel to the Resonator is there for stability reasons. It is not needed for the Crystal Oscillator. So removing it is recommended. You can see this resistor in the Fig X of Mega 2560 on the right side of the Resonator. Desolder it.And I came up with a scheme to solder the Crystalremoving the remnants of the Resonator. I have a working UNO now. PS: Please dont mind the Pictures, I really did not have this blog in mind when i started the Fixing of the UnoPPS: LinksUSBasp Firmware Upgrade: Mega and Uno Programming: Arduino Circuit for Breadboard: Mod: little Different: above link, parkyjimbo's link, was very tempting, as i could have solved the problem with only a single wire.
But afraid of stability issues I.might. have faced (USB Timing, very crucial, not to be played with) I went with the addition of Crystal method.PLUS: My Uno's timings are more accurate now! YAY!I also foundPeople in problem, search search and search and you WILL find the solution is what i have learned from this experience. Arduino: 1.6.10 Hourly Build 2016/07/20 04:33 (Windows 10), Board: 'Arduino/Genuino Uno'Build options changed, rebuilding allSketch uses 4,792 bytes (14%) of program storage space. Maximum is 32,256 bytes.Global variables use 278 bytes (13%) of dynamic memory, leaving 1,770 bytes for local variables. Many thanks for this. I have tried to build a “minimal” Arduino, but wanted to run it at 3.3V instead of 5V so used a 12 000 MHz crystal instead the normal 16 000 MHz one.
Kept getting the “not in sync” error. Your article brought me to the idea about the crystal. So I replaced the 12 000 MHz crystal with a 16 000 MHz one and programmed at 5V. Worked!I can still run the programmed ATMEGA328-P with the 12 000 MHz crystal though, just can’t program it. Looks like I have to program and test at 16 000 MHz and 5V first and then use 3.3V and 12 000 MHz to run it.
Hi, I always used my arduino as isp without any problems, however, last night when i was testing something i got a little bit of dirt on my board, it works fine, the blinky blinks! But when i use it as a programmer, this is what happens with nothing but arduino connected to my PC. The same happens when i connect my attiny:# sudo avrdude -p t13 -P /dev/ttyACM0 -c avrispavrdude: AVR device initialized and ready to accept instructionsReading ################################################## 100% 0.01savrdude: Device signature = 0x000000 (retrying)Reading ################################################## 100% 0.01savrdude: Device signature = 0x000000 (retrying)Reading ################################################## 100% 0.01savrdude: Device signature = 0x000000avrdude: Yikes! Invalid device signature.Double check connections and try again, or use -F to overridethis check.avrdude done.