I am trying to convert a 328P removed from one of my 4 Arduino Uno Rev3s to run on a target board from EvilMadScientist. This is all being done in Windows 7 using the Arduino IDE 1.0.3. I have done the following:
Upload the ArduinoISP sketch to a fresh Uno Rev3 which I intend to serve as my AVR ISP - uploaded fine and the blink sketch was wiped off the Uno and the LED stays solidly lit now.
Double checked that the COM port is being detected correctly. Win7 thinks it is COM3 and so too does the Arduino IDE
I then pulled a 328P out of another Uno and I am trying to change the bootload on that chip to reflect the simple target board that I want it to run on so I want the bootloader to run at 3.3V and no crystal so use the 8MHz internal oscillator. I place this target 328P on my target board.
Connect my Arduino ISP to my target board in the following manner (connections verified by multimeter)
I now select Serial Port = COM3, Board = ATMega328 on a breadboard (8MHz internal clock), Programmer = Arduino as ISP in the IDE
Choose burn bootloader
I am almost immediately greeted with the following error message:
avrdude.exe: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.
The more I Google the more confused I become. Can anyone offer any next steps for me?
I went ahead and removed my 328P from my target board and replaced it into the Uno Rev3 from whence it came. I then uploaded a blink sketch and everything works fine. So my target microprocessor is fine and I did not fry it with static during handling or hooking it up incorrectly (I pay careful attention to the orientation of the notch since it is reversed between the Uno and the EvilMadScientist target board).
"Invalid device signature"? ?
I think that means that it's not a 328P, but, likely, just a 328 (i.e. a non-P device), a conflict in the avrdude.conf file.
Thank you all for your comments, I was beginning to become a bit disheartened. My shipment of 10 brand new 328P's arrived from Mouser today and I am working through Nick's page. I just successfully detected the chip and totally blank bootloader so at least I am making progress. I was using a 10K? resistor between Vcc and Pin 1 previously. I will keep proceeding as per Nick's instructions and report back if I hit a snag I cannot solve or succeed. Thanks again all!
EDIT: Excellent! I don't know if the difference was a clean 328P not already fused to use an external crystal (which I do not have), or Nick's software, or both but I now have a Lilypad bootloader on my 328P. With any luck I can use one of my Uno's as an ISP and get this badboy blinking an LED!
I was successful in getting sketches loaded to my clean 328P and running in my target board via the Arduino ISP. Thank you all for your assistance and especially Nick whose website is truly outstanding.
I gave up on that chip and just replaced it in the Arduino Uno Rev3 that I yanked it from. I'm still not sure why I was not able to get a different boot loader onto that chip. My suspicion is that it was because that chip was already expecting a 16MHz crystal oscillator and I did not have one to give it? I'm still waiting on my 18pf caps from Thailand (love those uber cheap parts from eBay, Hack Shack is insane). Once they arrive, I can test that theory.
ChemE:
I gave up on that chip and just replaced it in the Arduino Uno Rev3 that I yanked it from. I'm still not sure why I was not able to get a different boot loader onto that chip. My suspicion is that it was because that chip was already expecting a 16MHz crystal oscillator and I did not have one to give it?
That is correct, if a chip has it's fuse bytes set to expect an external clock source it will not work unless it has such an external clock source.
I'm still waiting on my 18pf caps from Thailand (love those uber cheap parts from eBay, Hack Shack is insane). Once they arrive, I can test that theory.
Thanks for the confirmation retrolefty. Does that mean that I could have used one Uno as an AVRISP and put the original chip back in its board (which does have a 16MHz crystal) and loaded the breadboard bootloader onto it? I suppose that is what I should have done. Oh well, hind sight 20/20.
My link above (or one of the pages it links to) provides a 8 MHz clock output from the programming sketch. That can bring a board back to life long enough to change the fuse to not require the crystal.