I cannot seem to resolve what the issue is as I try to bootload a standalone ATMEGA328P-PU using the Arduino IDE.
I have a 10MHz Crystal and use an FTDI board to power the microcontroller to 3.3V. The AVRISP MKII is used for programming.
On the Arduino IDE I selected "Arduino Uno" for the board and "AVRISP MKII" as the programmer
I get the following message when I try to bootload:
avrdude: Device signature = 0x0000ff
avrdude: Expected signature for ATMEGA328P is 1E 95 14
Double check chip, or use -F to override this check.
I have attached a pic of the setup (hope it works, can't seem to preview it).
Can anyone point me in the right direction? I know the AVRISP MKII is functioning as I can program other projects with it and I am getting 3.3V for the rail.
CrossRoads:
The FTDI breakout board is supplying the power? MKii only monitors the power rail.
Couple things look funny:
ATmega328 0x1E 0x95 0x14 << so your avrdude.conf seems set wrong
ATmega328P 0x1E 0x95 0x0F
If you're getting 0x0000ff then the chip is not responding.
Yes the FTDI breakout board is supplying the power and the MKII is only monitoring it.
When I change the avrdude.conf to 0x1E 0x95 0x0F I get
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
I also find that if I modify the clock frequency in the "boards.txt" file to
uno.build.f_cpu=1000000
I get inconsistent device signatures:
trial 1:
avrdude: Device signature = 0x0000f0
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.
trial 2:
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
Assuming you removed the connection from AREF there is just one obvious wiring deficiency. You really should have two 0.1 µF capacitors connected from VCC to GND as close as possible to the target. I've programmed targets without bypass capacitors so that is probably not the problem.
Given what you've posted there are just three possibilities left...
Broken or loose wire.
Clocking problem.
Programmer's bitrate.
Only you can do anything about #1.
#2 seems unlikely. The capacitors are in range (12 to 22 picofarads). Everything appears to be connect correctly. There are two clocking options in boards.txt (internal oscillator and external crystal / resonator) so it is unlikely the fuses have been set to something "odd".
Which leaves #3. Your programmer has to be configured for a bitrate of 125K or slower. The avrdude command-line you posted does not include the option to set the bitrate which means it could be anything. I assume your AVRISP MKII has a way to set the default bitrate. I suggest ensuring it is set to a reasonable value.
@Coding Badly thank you for spending so much time on this.
I removed the Aref connection per your earlier post and it didn't solve the problem... but I left it unconnected
I added supply bypass caps close to the micro which also didn't solve it, but I left them in as they should have been there in the first place.
I doubted it was point #1 above as I completely rewired the system on a different breadboard with new wires.
Your point #3 gave me an idea. I hooked up the AVRISP MKII to AtmelStudio. Its clock was set to 2MHz (less than 1/4 of the 10MHz). I tried reading the part and it didn't work. I tried reducing the clock to 1MHz and it still didn't read the device. However, I set the clock to 125kHz and it DID read the device. I'll see if I can program the part now.....
Have you had any experience prior at getting the MKII programmer with uploading the bootloader? I have been failing all week at it (some great people have tried to help with no avail on another thread) and I was curious if you had worked with this before you started using the MKII. Also, I am considering buying the MKII and wanted to know if there was a specific way you changed the speed of it? Thanks, this thread was very informative.