I am attempting to re-burn a bootloader onto a breadboarded ATMEGA 328p using Nick Gammon's excellent bootloader sketch. I have used it in the past with perfect results, but this time around I've run into a frustrating problem. The sketch at first appears to run normally, giving the following output:
Atmega chip programmer.
Written by Nick Gammon.
Version 1.21
Compiled on Dec 17 2014 at 11:40:27
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F
Processor = ATmega328P
Flash memory size = 32768 bytes.
LFuse = 0xFF
HFuse = 0xDE
EFuse = 0xFD
Lock byte = 0xEC
Clock calibration = 0xA0
Bootloader address = 0x7E00
Bootloader length = 512 bytes.
Type 'L' to use Lilypad (8 MHz) loader, or 'U' for Uno (16 MHz) loader ...
However, when I type "U" to continue, nothing at all happens. No messages, no lights, nothing. I have tried with a different ATMEGA 328p that was already working as expected, and received the same result. Wiring has been checked and re-checked, and is correct to the best of my knowledge.
If you haven't modified the code and there is nothing wrong with your Arduino and your wiring is OK then there is nothing wrong.
But it doesn't work so one of these things has changed.
Show us a image of your wiring.
I have followed all of your suggestions with the same results, unfortunately. The sketch seems to be talking to the target chip just fine, as indicated by the fact that it can read the fuses and whatnot. I'm wondering if the problem is somehow related to the serial signal not reaching the Uno.
Pin 8 is connected to ground. This breadboard does not have split power rails.
Run a Blink type of program to check that all the pins on the Arduino are working.
9, 10, 11, 12, 13
Also run a digital input program on the Arduino to make sure the same pins work as inputs.
What voltage do you measure between pins 7 and 8 on the target chip?
Are you leaving out any steps from Nicks procedure?
Rebuild the circuit at a different part on the breadboard incase you have a bad connection.
Maybe try re-downloading nicks software incase you clobbered something.
I'm taking a break from this problem for the moment, since it's not critical to my project. Once I've got a bit more time to fight with it, I'll post back here again with my latest attempts. Thanks for all the suggestions!
No matter what I tried, I could not get this to work the way it has in the past, until I realized that one thing had changed from last time: The computer. It has never worked on this Windows 8 computer. I installed the IDE on a Windows 7 computer that was handy, and gave it a shot... Worked flawlessly. For some reason, the Windows 8 computer doesn't seem to be able to send serial data TO the Arduino through the serial monitor utility, though it can receive just fine. Does anyone know of a way to fix this?
Thanks for pointing out yet another problem with Windows 8. Glad I'm sticking with Windows 7 as my primary OS on my main PC's.
On a side note, in credit to Mr. Gammon, I just want to say "THANKS!! Months ago when I first got away from Arduino boards and started embedding Atmega328p's into custom PCB's I needed a quick, effecient and easy way to flash bootloaders and I wasnt getting much of anything but headaches until I stumbled across your bootloader sketch. Its been smooth sailing ever since in that regard. I reference him all the time and highly recommend his work. I made a shield for a tiny and cheap Pro-Mini that accepts the DIP Atmega328p and programmed his sketch into the Pro-Mini. This allows me to bootload Atmega328p's without any jumper wires at all Arduino Bootloader ! / Pro Mini Clone follow up - YouTube
Did you try any other terminals than serial monitor?
See if the Win8 machine Hyperterminal works and maybe try PuTTY.
I run XP because I run much that was made for Windoze so I can't say about Win8 but I like PuTTY best since it sends keystrokes, not entries, and that allows for key-interactive user-entry.
PuTTY has options that serial monitor completely lacks. Cursor control, file operations.
Hi,
I am wondering if the folks on this thread still exist on this forum.
I have a custom PCB that has an ATMega328P, and a 16MHz crystal (and associated circuitry), and I need to flash a bootloader onto it.
I've tried the circuit and process as described on the Arduino website here
I've tried this option with setting the Board to Uno/Duo/Nano and all of them return "Yikes! Invalid Device Signature". I've followed several posts on the forums to deal with the problem, and neither of them apply to my case/solve the problem
And I've tried Nick Gammon's program as described in this thread and as available on Github here and I get the error "Failed to enter programming mode. Double-check wiring!"
which I've checked with a multimeter using a continuity check between the pins of the ATMega on the ArduinoUNO board and on the ATMega on my custom PCB (I'm even bypassing the jumpers and connectors), so it is definitely not the wiring.
Here are two possible openings:
I cannot check whether the crystal is properly connected or if there is extra capacitance around the crystal. The crystal is SMD; I don't have access to its pins, and the traces are under a silkscreen. The capacitors are 22pF capacitors. This is the datasheet for the crystal
I am using the Arduino UNO board's 5V line. Some forum posts have asked to use a power supply which I don't have at the moment.
Lack of extra capacitors on Vcc/gnd? I don't have those at the moment and I will check tomorrow to get a power supply and appropriate capacitors.