1
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ 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)? \$\endgroup\$ – gbulmer Dec 25 '15 at 14:41
  • \$\begingroup\$ I don't think the AVRISP supplies voltage to the circuit under programming. \$\endgroup\$ – Cactus Dec 25 '15 at 15:01
  • \$\begingroup\$ I apologise, you're correct. I thought I'd powered a breadboard ATmega that way, but I must be mistaken. \$\endgroup\$ – gbulmer Dec 25 '15 at 18:16
1
\$\begingroup\$

I had a similar experience before wherein I was using the AVRISP MK2 for a project. I was programming an Atmega32 with it and had shorted it by mistake. So initially, I tried burning a small code on the Arduino Uno with it and it worked quite well. But with the AVR it still wasn't working. So I borrowed a USBasp from a friend and tried burning the code on the AVR and it worked perfectly fine. So I wrote a mail to Atmel describing the problem and they had replied that there could be a chance that since the arduino IDE uses avrdude to burn the bootloader, it maybe using a different driver for the ISP. Anyways they suggested that the AVRISP MK2 may be malfunctioning and asked me to replace it.

\$\endgroup\$
  • \$\begingroup\$ 'Anyways', did it work? \$\endgroup\$ – Transistor Dec 25 '15 at 14:55
  • \$\begingroup\$ I replaced the older avrisp mkii and it worked perfectly. \$\endgroup\$ – Rohan Narlanka Dec 26 '15 at 15:45
0
\$\begingroup\$

My problem turned out to be caused by a mismatched pull-up resistor on the AVR's RESET pin. I was using a 220 Ohm resistor by mistake. After replacing it with a 10 KOhm one, I am now able to program it with the AVRISP mk2 clone.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.