Hello i been trying to program a 328p chip with a arduino mega and so far no luck i normally do it with a uno board and it works with no problem but at the moment my brother haves my uno board teaching him how to learn arduino a little so I'm stuck with the mega at the moment i did put the pins on the 50 though 53 on the menu because that is what it said and i did put the cap from the reset pin on the mega to ground i uploaded the arduinoisp sketch to the mega with no problem normally like i do with the uno same way but when i go to try to upload a blink sketch i get this error. avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check. i never seen it before and do not know what to do can someone help me please thank you.
When you open the arduino program (IDE) go to tools >> board >> then make sure you have the right board selected. I'm not sure if this will fix your problem, but it's what he is saying.
oh ok i understand this is how i did it. in software i select the mega 2560 with adk and then i selected the port and uploaded the ARDUINOISP sketch for the mega as i did when i use to use a uno. Then after uploading i power up the 328p chip and in software i went into tools and and in programmer i selected arduino as isp like i normally do with a uno then i normally hold down the shift key and click the upload button and then it will say upload using programmer. that's how i normally do it with a uno so i tried that and that's that I'm getting the error from but i know in mega the D10 D11 D12 and D13 are not the spi pins they are the 50 through 53 pins on the mega. so i figure out the pin out and still the same error then from what i seen to add a 10uf between the reset pin on the mega and ground so i did that and still same error. I'm not sure what else to do.
OK, well i was having some trouble with the Mega ADK as well. If your using an older arduino IDE (like v 1.0) it's a little complicated. I ended up having to download the newest IDE (which is v 1.5.5 if i'm not mistaken) and that solved it for me. If you are using the USB library i think you can go in and change the settings.h file to recognize the ADK. You just need to uncomment the line that say "//#define MegaADK" or whatever it is. That approach never worked for me, which is why i downloaded the newest IDE.
same thing I'm almost about to give up on this what a headache looking at alot of pages and alot of forums and nothing what am i doing wrong i don't get it.
If you want to use the Mega's USB--> Serial converter, as in your computer is plugged into the Mega and the Mega programs the 328p, connect a wire from the Mega's reset pin --> gnd(No buttons), connect the power wires, then connect a button from
the 328P's RESET pin to ground. Finally, connect the RX pin on the Mega to the RX pin on the 328p, and the TX pin on the Mega to the TX in on the 328p. Before you program, set the board on the IDE to Arduino Uno, Hit upload. Right before it starts uploading, press the button you wired up before a few times.
What this does:
The TX/RX wires connect your computer to the ATMega328p. Connecting the RESET wire on the Arduino Mega to ground 'shuts dpwm' the processor, so it doesn't get in the way. The button starts the bootloader on the 328p when pressed, allowing you to upload code.
i put tx from the mega to rx on the 328p i put rx from the mega to the tx on the 328p put the 5v and ground on also put a jumper on the mega reset pin to ground as you say and you say also push the reset button for the 328p a few times while uploading is that correct? and if so that is the error i got.
well from all the forum pages i was reading i figure out the problem it was the crystal when uploading was somehow messing up. so i change it to another one and uploaded the sketch and it worked now thank you.