# AVRISP mk2 clone can program Arduino Uno, but not stand-alone ATMega328P

I have an AVRISP mk2 knock-off that I can't get to work.

# Scenario 1: AVRISP mk2 clone vs. Arduino Uno: works

If I take an Arduino Uno, and plug the 6-pin ICSP cable of the AVRISP onto it, one of two things happen, both as expected:

• The cable is plugged in in the correct orientation, and I can use avrdude to query fuse status and upload .hex files

• The cable is plugged in reversed, and an orange light in the AVRISP starts flashing

# Scenario 2: AVRminiProg vs. ATMega328P on breadboard: works

Moving on, I have put an ATMega328P on a breadboard, connecting power/ground, and using jumper wires to connect the Reset and MOSI/MISO/SCLK pins to a 6-pin ISCP cable. I then take an AVRminiProg, plug in the other end of the ISCP cable, and hook up power/ground (unlike the AVRISP, the AVRminiProg supplies 5V on its own to the system under programming). I can measure the 5V on the breadboard, the ATMega328P works as expected, and I can use avrdude to query fuses / upload programs.

# Scenario 3: AVRISP mk2 clone vs same breadboard: doesn't work

The above two steps were just diagnostic; my actual goal is to use the AVRISP to program the ATMega328P on a breadboard, so I can supply my own voltage (my aim is to use 3.3V). So I take the same ISCP cable as in scenario 2, but plug it into the AVRISP instead of the AVRminiProg. I also attach 3.3V (from an Arduino Uno since that's already on the desk) to the breadboard.

However, the orange LED in the AVRISP immediately starts flashing, as if the cable orientation was wrong; even though the same orientation worked just fine for the AVRminiProg. If I try to swap just power and ground, it still doesn't work, but I get the voltage between them to drop to almost nothing.

In my desperation, I've actually ended up downloading the PCB design of the Uno to track the ICSP pins to make sure I am wiring stuff correctly. However, it seems if I just connect power and ground, and nothing else, and both the same way as they are in the Arduino Uno, to the AVRisp mk2, I already get the orange blinking. Yet connecting the same AVRisp mk2 to the ICSP pins on the Uno itself, it works as expected.

What am I doing wrong?

• I assume you have got a multi-meter? Can you measure the voltage supplied by the AVRISP (on its output header) when it is open circuit, and across a simple load (say 330ohm resistor)? – gbulmer Dec 25 '15 at 14:41
• I don't think the AVRISP supplies voltage to the circuit under programming. – Cactus Dec 25 '15 at 15:01
• I apologise, you're correct. I thought I'd powered a breadboard ATmega that way, but I must be mistaken. – gbulmer Dec 25 '15 at 18:16