AVRISP MkII won't program

Go To Last Post
23 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

New user here, trying to get into AVRs. I finally got my AVRISP MkII, but can't seem to get it to do anything.

My setup:
Brand new AVRISP MkII from DigiKey, Avr Studio 4.12.0.462, Windows XP SP2. Initial attempts were made from an iMac Core Duo with AVRDUDE 5.1, when that did not give results I tried the Windows software on my PC.

The drivers for the AVRISP seem to have installed properly, I updated the AVRISP flash and it did everything expected from the manual.

The cable is connected directly to an ATtiny15L on a solderless breadboard via jumper wires. There's nothing else but a 9V battery, 7805 linear regulator, filter capacitor across the 5V supply, and a white power indicator LED and resistor.

However, it doesn't seem to ever detect that it's plugged into anything. When I plug it into the USB line, the green USB light blinks on-off-on, staying on until I unplug it. The status light does nothing. I connect power to the AVR, still nothing. Connecting to the AVRISP results in a message that "No target was detected. Ensure that target has power." At this point, the status LED lights up red and stays that way until the ISP is disconnected from the USB cable. Looking at the Board tab and clicking Read Voltages gives me:

Getting revisions.. HW: 0x01, FW major: 0x01, FW minor: 0x02 .. OK
Getting VTARGET.. 0.0V .. OK
Getting ISP frequency parameters.. SD=0x3e .. OK

I've checked and rechecked the AVRISP and AVR pinouts numerous times, and substituted a second ATtiny15L, with no effect. I've set the ISP clock as far down as 100 Hz, no go.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome New User

When the status led turns red when first hooking up to the board ( with no power supplied to board) is ok . That means it has detected the ISP but not able to determine the status of the hookup ( no power yet) . When power is supplied to the board ,the MKII will check the lines for correctness and if they are correct then it will turn green . If not it will blink orange for a bad hookup ( reversed connection for one ) .

If the status light does not change when power is applied then I would say that the 5V and or the GND are not connected on the ISP header . Even though the MKII is powered by the USB it still needs to look at what voltage the target is at.

Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

digitool wrote:
When the status led turns red when first hooking up to the board ( with no power supplied to board) is ok . That means it has detected the ISP but not able to determine the status of the hookup ( no power yet) . When power is supplied to the board ,the MKII will check the lines for correctness and if they are correct then it will turn green . If not it will blink orange for a bad hookup ( reversed connection for one ) .

That is what I understood from the manual to be the correct behavior, but it is not what is happening. When it is first hooked up, the status LED is dark, and it remains dark until I attempt to do something through AVR Studio that requires a connection to the target, at which point it turns a steady red. Whether it is dark or red, applying power to the AVR (and thus the interface) does nothing. At no point does it flash orange.

digitool wrote:
If the status light does not change when power is applied then I would say that the 5V and or the GND are not connected on the ISP header . Even though the MKII is powered by the USB it still needs to look at what voltage the target is at.

They are connected. The ground and output pins of the 5V regulator are connected directly to Gnd and Vcc of the AVR, which are connected to Gnd and VCC of the AVRISP connector. The other pins are connected directly to the matching pins on the AVR. Again, I have checked and rechecked the wiring, even pulling it all out and starting again from scratch multiple times.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try just hooking up the 5V and the GND only from your breadboard to the ISP Header .

From the top view of the ISP header :

1 MISO VTG 2 isp cable red
3 SCK MOSI 4
5 /RST GND 6 isp cable

Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK I just did a little test with a tiny45 board . Removed the chip so that only the 5V , GND , and RST ( pulled high with a 4k7 ) were connected . The status light turns green . If I remove the RST line then the status goes to flashing orange . All this was done without even being in Avr Studio . The MKII on its own will check the lines since it is always powered by the USB .

Pete

P.S. My money is still on no power from breadboard to MKII

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finally found the problem...I was looking at the connector pinout upside down. Or rather, I was looking at the AVRISP connector when I should have been looking at the board connector, so my connections were mirrored from what they should have been. Plugged things in right and added a 4.7K pullup, and it worked.

However, it did not work without the pullup...and I could swear the datasheet said it had an internal pullup. Odd...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think the MKII likes to see some kind of pullup on the reset line . I use 4k7 with no problem but for some parallel programmers it might be a little much . 10k seems to be the preferred .

Good Luck
Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

digitool wrote:
I think the MKII likes to see some kind of pullup on the reset line . I use 4k7 with no problem but for some parallel programmers it might be a little much . 10k seems to be the preferred .

Good Luck
Pete

Hi, I am a brand new:).
I just got an avrisp makII from my advisor who wants me to learn how to use avr. Anyway, I have the same problem which is no matter how I connect the 6 pins the mkII always blinks orange light. According to the articles above I know I might have to add a 4k7 pull up. The question is what's 4k7 pull up? Could any body help me?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 4k7 or the 10k resistor is hooked up as such that one end goes to Positive supply ( used to power your chip ) and the other end goes to the rst line of the chip . This is called a pullup resistor ( makes sure that pin has positive supply applied to it through a current limiting resistor ) .

You don't say what chip you are dealing with so I am not going to name pin #'s for rst .

When everything is hooked up correctly the status led turns green .

Make sure to lower the ISP frequency to 125KHZ . This is done in the Board tab .

When you can read the signature of the chip then you know there is a good hookup .This should be the first thing before trying anything else.

I know you want to get right into it but do a little reading to get to know the chip you are trying to program.

Welcome to forum
Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for replying.
I am using Atmega16, so I add a 10k resistor from pin 10(VCC) to pin 9(RESET), but it still blinks orange light. Is there any thing I shold do?

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds like your ISP header wiring may be wrong ( looking at top but doing the bottom or which end is #1 )

The end with the red line on the cable is towards the positive voltage and the other end is where RST and GND are hooked up .

For the MKII 's status light to turn green all that is needed is POS , GND , RST to be hooked up correctly . This does not mean you can program though . The others have to be hooked up to do that.

Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yhu wrote:
Thanks for replying.
I am using Atmega16, so I add a 10k resistor from pin 10(VCC) to pin 9(RESET), but it still blinks orange light. Is there any thing I shold do?

thanks

Thanks everyone for helping me.
Finally, I have made the light on the mkII turns to green. However, I still cannot program the Atmega16. I am sure that I connect every pin correctly. The pop up window keeps asking me to check mkII's frequency in the "board" tab, though I have set it below 125kHz.

Sorry to ask so many questions, but my advisor want me to report him about using it tomorrow.......

Please help me.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yhu wrote:
yhu wrote:
Thanks for replying.
I am using Atmega16, so I add a 10k resistor from pin 10(VCC) to pin 9(RESET), but it still blinks orange light. Is there any thing I shold do?

thanks

Thanks everyone for helping me.
Finally, I have made the light on the mkII turns to green. However, I still cannot program the Atmega16. I am sure that I connect every pin correctly. The pop up window keeps asking me to check mkII's frequency in the "board" tab, though I have set it below 125kHz.

Sorry to ask so many questions, but my advisor want me to report him about using it tomorrow.......

Please help me.

Thanks

Hi, I should explain more detail about my situation. I cannot read the signature bytes in the advanced tab.

Right now, I only connect the six pins for the mkII connection. Is there any basic component that I should connect to my Atmega16?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make sure that on the mega16 that both GND pins ( 11 and 31 ) are connected and that AVCC ( pin 30 ) is hooked up to positive supply (VCC) .

Make sure that MISO goes to MISO( mega16 pin7 -PB6 ) and MOSI to MOSI (mega16 pin6 -PB5)

Make sure that the correct processor is selected in the Program tab window

Do not set any fuses yet. The mega16 will run fine with it's internal oscillator . Only after you have read and understood the meaning of setting fuses should you attempt to do so .

When you set the ISP freq. did you try to read it back ?

Setting the ISP freq. at 125KHZ seems to be a good setting for me.

Recheck your wiring if its on a breadboard . Someone here had some problems before he wiggled the wires .

Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yhu, Look at the tutorial for setting up the AVRISP mkii on the tutorial forum from the AVRfreaks website. I'll cover some of the basics, you may have made it further than I describe initally but perhaps not. There are two LEDs on the mkii the one closest to the USB cable turns green only if the USB driver is properly installed. I had trouble like this as well, make sure that the lines used for programming are not loaded by other circuitry. To make sure that you have the mkii hooked up correctly, connect it to the micro you want to program and then take a multimeter in ohms mode and touch one end to the USB shell (pop the case open on the mkii) and the other end of the ohm meter to the ground on the micro. This will tell you if you have proper orientation for the header.

If you pop open the case for the mkii and a looking at the component side of the circuit board with the USB connector on the right the pins are

Miso VCC
SCK MOSI
RST GND

hook your device to the mkii and ring out the connections with the ohm meter, keep the ribbon cable connected and probe on the backside of the circuit board on the mkii, go directly to the micro on your circuit if there isn't interface circuitry. Make sure you can read the voltage from the "Board" tab If it's not what you expect, figure out why. Then try to read the signature bytes,

Make sure you have all of the Vcc pins hooked up.

Let us know how it goes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks tambrose34's help.
I am pretty sure that I have connected all isp pins in right places, made the LED on the mkII turn green and read target voltage correctly. However, I still cannot read the signature bytes. Should I hook up any other pins except the pins hooked up with the mkII (indeed, according to someone's suggestion, I have hooked up VCC with AVCC and both GNDs).

Thanks a lot.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you set the correct processor in the Program tab to your mega16 ?

When you try and read the signature does the status light turn orange ( maybe flashing ) ?

Set your ISP freq. to 125KHZ ?

Can you draw a quick sketch of how its hooked up ?

Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, this picture shows how I hook up my atmega16 and mkII.
http://www.indesigntech.com/DSC03240.JPG
According to the datasheet of atmega16, from pin 6 to pin11 are MOSI, MISO, SCK, RESET, VCC and GND. I believe I hooked the six pins to mkII correctly. The green LED turns green, too. I can read target voltage, but I cannot read signature bytes (I selected Atmega16 in the device section).

Could any body help me?
Where did I wrong?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Yhu

The picture does not show your connector to the MKII . Did not see where Pin 31 (GND) and Pin 30 (AVCC ) are hooked up. Its ok to hookup AVCC to VCC for now. Also did not see a bypass cap between Pin 10 (VCC) and Pin 11 (GND) .

Looks like you are getting power from a Parallax ( Basic Stamp ) type board . Not enough processing power from the Stamp ?

I still think you might have your other signals ( MOSI,MISO,SCK ) mixed up. You did not say if you get the orange led ( blinking maybe) when trying to read the signature .

Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yhu, Does any error message come up on AVR Studio? I would go with Digitool's suggestion and add a .1uF cap from pin 10 to pin 11 as well as making sure the other grounds and VCC are hooked up.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What a picture is worth. Connect MOSI to MOSI MISO to MISO

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At first glance it looked like a picture of your guitar. :)

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

At first glance it looked like a picture of your guitar.

Not, it is his guitAVR...

Uh! Jeeez. I just dropped the best product name I ever stumbled upon into the public domain. (God knows which web-sites it will end up on..)

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]