AVRISPmkII Connection Status: Unknown status 0x00

SOLUTION: see answer below

Okay .. I searched the Internet from many angles .. but I could not find a solution to my problem. The last time I used my AVRISP2, it worked fine. Now I get the following message when I try to write my program in UC:

avrdude: stk500v2_command(): command failed avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. 

I found many posts on the Internet, but there were no solutions. Does anyone know what could be the problem?

I already checked the contacts, I updated the ISP firmware (blinkdemo works).

Thanks for any tips.

+6
source share
3 answers

I needed some friends and me, but after several hours of searching, trying, and debugging, we were able to fix this problem. I hope this helps other people who got the same problem to solve this problem.

The problem was that the ISP, in my case USB-Prog 3.3, was talking too quickly with my Atmega8, which only worked at 1 MHz. Thus, there are two possible solutions:

  • slow down the speed of your ISP
  • speed up Atmega8

I am somewhere red that the ISP should not be faster than 1/4 of the speed of the underlying microcontroller.

The following lines saved my day:

He sets Atmega8 to 8 MHz and gives him 64 ms to increase this frequency.

 avrdude -p atmega8 -P usb -c avrispv2 -U lfuse:w:0xe4:m -U hfuse:w:0xd9:m -B 22 

Here is an excerpt from the avrdude man page:

 `-B BITCLOCK' Specify the bit clock period for the JTAG interface or the ISP clock (JTAG ICE only). The value is a floating-point number in microseconds. The default value of the JTAG ICE results in about 1 microsecond bit clock period, suitable for target MCUs running at 4 MHz clock and above. Unlike certain parameters in the STK500, the JTAG ICE resets all its parameters to default values when the programming software signs off from the ICE, so for MCUs running at lower clock speeds, this parameter must be specified on the command-line. 

In addition, I want to recommend AVR Fuse Calculator for Android, which is apparently a very useful tool for microcontroller programmers.

+4
source

First of all, I would recommend that you check the microcontroller itself. I have the same error message, and I found that my Atmega is damaged. A permutation for the new fixed the problem.

0
source

Another (general?) Problem may be the missing crystal when trying to flash firmware on the layout. I forgot about it twice and got this error message. Therefore, in addition to connecting the ISP pins, you must also connect the crystal and capacitors to the ATmega's XTAL1 and XTAL2 pins if it is configured to use an external oscillator (see ATmega Table).

0
source

All Articles