Hi all, I've been here a few times, but I've stopped lurking because I've got a problem.
Background: I bought two Nano ATmega328P clones, I needed to(and expected to) install drivers, due to them having ch340 chips for usb communication.
I think I got that right, both boards show up under "device manager" as ch340 devices, is that correct?
I did not expect the next problem.
I tried to upload a sketch, but that failed. It also turned out that out of the four leds on each board(PWR, RX, TX and PIN13), only the PWR led was working. The reset button, when pressed, also did not seem to do anything(such as blinking the PIN13 led).
After some internet searching, the cause that fit the symptoms turned out to be a corrupted/non-existent bootloader.
I took out my Mega 2560 clone and after a bit of thinking, started following the necessary tutorials for burning a bootloader via arduino-as-programmer. I ran into more problems, and could not burn a new bootloader.
I ran into the dreaded 0x00000/0x0ff000 nonsense signature error type of stuff, but the curious thing was that I got the same error, even when the nano clone was not wired up to the mega2560(acting-as-programmer).
So what could my problem be? Is there a chance that the ATmega328p chips on my nano boards are fine after all? Could there be a problem with the mega2560 clone preventing it from doing its job?
I don't think that I touched the fuses on the nano boards, unless pressing -F on my keyboard can do that(without changing any IDE settings)? :-[
If I am missing any out any info that could help solve the problem, just tell me and I'll post it. Its a bit late at night at the moment.
Ch340 sounds right to me, do they also show a COM number?
No flashing LED is a bit weird indeed. But now the million dollar question you left out, how exactly did you connect both boards? And what did you select / pressed?
Easiest thing about a Mega and a Nano is that they both have a programming header... So just connect all pins 1 to 1 from Nano to Mega except the reset of the Nano. Nano reset needs to go to Mega pin 53.
Or, if you don't want to use the header,
Nano 11 to Mega 51
Nano 12 to Mega 50
Nano 13 to Mega 52
Nano 5V to Mega 5V
Nano GND to Mega GND
Nano RST to Mega 53
Maybe it's obvious but don't connect the Nano to USB....
And after uploading the ArduinoISP sketch, did you do what the tutorial says (but is missing in the image) in big fat letters? (But I would say 100n is a bit tiny, arduino.cc calls for at least 10uF.)
And as far as COM ports, it's useless to scream COM5! If you can upload the ArduinoISP sketch you selected the right one.
And before trying to burn the bootloader, don't forget to change the board. And if you want to even upgrade your Nano's, select the Uno instead of the Nano. The Uno and Nano have the same microcontroller but the Uno bootloader is wayyyyy better. You only have to remember to select Uno when you want to program the Nano later
To clarify:
I used the pin to pin method that bypassed the ICSP headers, as you listed above.
I used a 100nf Cap
The usb was connected to the mega, not nano.
So, per septillion's suggestions:
I changed the wiring, ICSP to ICSP(with nano ICSP reset to mega pin 53, mega ICSP reset left unwired)
Cap size to 10uf.
Board in menu selection changed to Uno, not nano.
Error with Nano ICSP not wired to mega, left unconnected:
((Left rest of code out, as it is identical to everything before the "avrdude: AVR device initialized and ready to accept instructions" line in my previous post above))
Error while burning bootloader.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x00ffc3
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
avrdude done. Thank you.
Error with Nano ICSP wired to mega, connected:
((Left rest of code out, as explained))
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x00ff00
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
avrdude done. Thank you.
Wrong microcontroller found. Did you select the right board from the Tools > Board menu?
Thanks pert, but I'm getting the same types of errors with the correct wiring.
(Checked the orientation of the ICSP by looking for the '1' marker and working from there)