Author Topic: AVRRISP MKII Connect Failed  (Read 15196 times)

0 Members and 1 Guest are viewing this topic.

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
AVRRISP MKII Connect Failed
« on: July 04, 2012, 05:21:33 AM »
I am trying to program my $50 robot using the hold servo hex file.

I have my board all setup.

I am trying to do this through AVRStudio since I have the 6 pin AVRRISP MK II.

I have a greeen light indicating the USB is connected properly, then I connect it to my board with power on, and I get a green LED status indicator light, which means idle with target power.

When I try to connect, I repeatedly get connect failed.

I have the hex file open.

I have tried all 3 USB ports on my computer, and each time I keep getting the connect failed.

I am reading the pdf from Atmel and under troubleshooting in this scenario, all it says is make sure you have an active self powered USB Hub, which I do.

Can anyone using this programmer help me out?

I feel completely stuck, I have been working on this board for a long time, and now I cannot program the damn thing, very frustrated!

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: AVRRISP MKII Connect Failed
« Reply #1 on: July 04, 2012, 02:12:41 PM »
Could probably be a problem with soldering to one of the other pins. Check the wire that goes to the RESET pin of the mcu. If that looks ok then also look at the MOSI/MISO wires.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #2 on: July 04, 2012, 08:13:37 PM »
Could probably be a problem with soldering to one of the other pins. Check the wire that goes to the RESET pin of the mcu. If that looks ok then also look at the MOSI/MISO wires.

Webbot, Thanks.

I double checked, than triple checked all of the connections. I am pretty confident that they are all correct.

This does bring up an interesting question though.

At the point of connecting, in AVR studio, I have not even selected the micro controller yet, so how does the studio know that these things are connected properly?

I was assuming that if it had power, it should be able to connect. Once connected, I assumed that you would enter the chip, and then at that point it would know if the connections were right?

Either way, I am quite sure my connections are right, but this is just not working.

Thx.

Offline KurtEck

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 12
Re: AVRRISP MKII Connect Failed
« Reply #3 on: July 05, 2012, 07:11:54 AM »
I may be barking up the wrong tree here, but you may want to verify that you have the right USB driver installed for the AVRISP MKII.  That is there are two different types of drivers for them.  The one that works with AVR Studio and the other that works with AVRdude...  It took me awhile to get my system to work again with AVRDude and I had to uninstall AVR studio.  There is probably an easier way.

So if it were me, I would probably start off by uninstalling both (if you have both).  Then Install the latest version of AvrStudio.  Make sure to get the device drivers... Then I would plug in the avrisp and see if it works and/or wants an updated driver...

Good Luck
Kurt

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #4 on: July 05, 2012, 07:56:02 AM »
Kurt,

Thanks for your assistance.

At this point, I am so frustrated with this after spending almost a week on this, that I will try anything.


Are you suggesting I should try to un-install AVRStudio and all drivers, then install AVRDude, then re-install AVRStudio afterwards?

Thx!

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #5 on: July 05, 2012, 08:02:39 AM »
Just as a two-cents thing, when you start up AVRStudio and make a new project, you select the chip.  Did you do that, or are you just writing code?  Does your code build?  It might be trying to connect to the wrong chip because you may have selected the wrong one when starting your project.

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #6 on: July 05, 2012, 08:14:21 AM »
Just as a two-cents thing, when you start up AVRStudio and make a new project, you select the chip.  Did you do that, or are you just writing code?  Does your code build?  It might be trying to connect to the wrong chip because you may have selected the wrong one when starting your project.

MIKE

Mike, what I did was open the .hex file for modifying a servo from Admin's tutorial.

I did not do a project, could that be the problem?

I opened up the hex file, and hit connect.

One thing I did notice is I got a lot of messages, one of which says:


AVR Simulator: ATmega8 Configured OK

So I am assuming it knows the chip somehow, which I am not sure of.

Thx for your help!

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #7 on: July 05, 2012, 08:28:44 AM »
Try this:

Open AVR Studio, but don't open any files.  I assume you're using AVRStudio 4.something, because this is different (and horrifying) for AVRStudio 5 and 6.

Click "New Project"
Click "AVR GCC"
Name the project whatever you want.  We're just trying to connect here, so it doesn't matter.
Click NEXT

Now you get to choose a "Debug Platform".  Choose "AVR Simulator". I have no idea what this does, but I've never used debug mode anyway :-P

You'll see that there is a list of chips to choose.  Scroll down to the chip you have, which I guess is an ATMega8?

Select it and hit finish.

NOW try to connect and see if it works.  You won't be able to download anything yet (you'll need to put code into the project...) but you're just testing to see if you can connect to the chip.

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #8 on: July 05, 2012, 09:14:54 AM »
Try this:

Open AVR Studio, but don't open any files.  I assume you're using AVRStudio 4.something, because this is different (and horrifying) for AVRStudio 5 and 6.

Click "New Project"
Click "AVR GCC"
Name the project whatever you want.  We're just trying to connect here, so it doesn't matter.
Click NEXT

Now you get to choose a "Debug Platform".  Choose "AVR Simulator". I have no idea what this does, but I've never used debug mode anyway :-P

You'll see that there is a list of chips to choose.  Scroll down to the chip you have, which I guess is an ATMega8?

Select it and hit finish.

NOW try to connect and see if it works.  You won't be able to download anything yet (you'll need to put code into the project...) but you're just testing to see if you can connect to the chip.

MIKE

Mike, I am going to try this when I get home tonight.

I will let you know.

Thx for your help! Much appreciated!

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #9 on: July 05, 2012, 08:00:54 PM »
Try this:

Open AVR Studio, but don't open any files.  I assume you're using AVRStudio 4.something, because this is different (and horrifying) for AVRStudio 5 and 6.

Click "New Project"
Click "AVR GCC"
Name the project whatever you want.  We're just trying to connect here, so it doesn't matter.
Click NEXT

Now you get to choose a "Debug Platform".  Choose "AVR Simulator". I have no idea what this does, but I've never used debug mode anyway :-P

You'll see that there is a list of chips to choose.  Scroll down to the chip you have, which I guess is an ATMega8?

Select it and hit finish.

NOW try to connect and see if it works.  You won't be able to download anything yet (you'll need to put code into the project...) but you're just testing to see if you can connect to the chip.

MIKE

Mike, I am going to try this when I get home tonight.

I will let you know.

Thx for your help! Much appreciated!

Mike, I tried this exactly as laid out.

Still getting the same error message.

Any other ideas?

Thx! Erik

Offline agold

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 1
Re: AVRRISP MKII Connect Failed
« Reply #10 on: July 06, 2012, 02:56:21 AM »
Erik,

I had a similar problem, here's a list of things I tried:
  • Double check you have the latest 4.x version of AVRStudio
  • Update the firmware on the AVRISPMKII (Tools->AVRISP mkii Update)
  • Check in Device Manager (Control Panel->System->Hardware->Device Manager) for the driver. You should have a Jungo driver
  • Check that the AVRISPMKII light goes green when the robot is connected

Hopefully one of those will help solve the problem!

Adrian

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #11 on: July 06, 2012, 05:19:59 AM »
Erik,

I had a similar problem, here's a list of things I tried:
  • Double check you have the latest 4.x version of AVRStudio
  • Update the firmware on the AVRISPMKII (Tools->AVRISP mkii Update)
  • Check in Device Manager (Control Panel->System->Hardware->Device Manager) for the driver. You should have a Jungo driver
  • Check that the AVRISPMKII light goes green when the robot is connected

Hopefully one of those will help solve the problem!

Adrian

Adrian,

Thx for your help.

Yeah, through searching this problem I have tired all of those things and nothing worked.

i am going to dig out an older computer today from my basement and try it on that.

if that does not work, I am at a loss.

Thx.

Offline agold

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 1
Re: AVRRISP MKII Connect Failed
« Reply #12 on: July 06, 2012, 07:04:05 AM »
Erik,

Only a couple of other suggestions then,

a) if you haven't already try following this tutorial: http://www.societyofrobots.com/member_tutorials/book/export/html/290 (to make sure you have't missed a step and to see the debugging techniques mentioned)

b) read through this post http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=86205&start=20 not sure if it's fixed yet but at one stage apparently you had to run 'regsvr32 scomm.dll', probably worth a shot.

Adrian

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #13 on: July 06, 2012, 07:33:46 AM »
Erik,

Only a couple of other suggestions then,

a) if you haven't already try following this tutorial: http://www.societyofrobots.com/member_tutorials/book/export/html/290 (to make sure you have't missed a step and to see the debugging techniques mentioned)

b) read through this post http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=86205&start=20 not sure if it's fixed yet but at one stage apparently you had to run 'regsvr32 scomm.dll', probably worth a shot.

Adrian

Adrian,

Thx, I will definitely check out b), I have done a a few times.

I tried this on another computer and the exact same results.

I am now thinking either one of two things is the problem, either my board is messed up and I am not seeing it, or my microcontroller is messed up.

I am going to upload pics of my board, if anyone can take a look at it and be a second set of eyes, I would really appreciate it.

I have used my multimeter to make sure that all points I think should be connected are connected (0 resistance on ohms setting) and that all points not supposed to be connected, again that I think should not be connected are not connected (10-20kOhms for all of them).

In addition I have plugged in my batteries and verified that my servo buses are getting the right power (~9v) and my sensor busses and microcontroller and programmer connections are getting the right power (4.98 V)

If anyone can take a look as a second set of eyes, I would appreciate it, please excuse my sloppy drilling, it is all working but not pretty!

I am including my original etch, my top and bottom of my board unconnected.

This is all based off of webbot's pdf.

Also, if anyone has any suggestions on how to check my microcontroller, I would appreciate it.

I appreciate everyones help!

I desperately want to get this thing working, I have put a lot into it and really want to do more in robotics.
I am having a hard time getting the attachments to upload for some reason, I will follow up this post with my attachments.

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #14 on: July 06, 2012, 07:37:31 AM »
If your uC is not soldered in, you can check it fairly easily using a solderless breadboard.  All you need to do is set up a power circuit and the SPI pins (the pins that are used to program it).  Then try all the steps you otherwise went to in order to connect.  If that doesn't work, the uC is broken somehow.  Try it with another one (they're only like $1 aren't they?)

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #15 on: July 06, 2012, 07:45:54 AM »
For some reason my attachments are not uploading, so here are links using dropbox:










Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #16 on: July 06, 2012, 07:48:27 AM »
If your uC is not soldered in, you can check it fairly easily using a solderless breadboard.  All you need to do is set up a power circuit and the SPI pins (the pins that are used to program it).  Then try all the steps you otherwise went to in order to connect.  If that doesn't work, the uC is broken somehow.  Try it with another one (they're only like $1 aren't they?)

MIKE

Mike,

Thanks, this is a good suggestion.

I originally tried to breadboard the whole thing, but I figured I would just try to work it out for real.

I think I will do this, thx.

In the meantime, if anyone sees anything wrong in my pictures, please let me know!

Thx again everyone for your help, much appreciated.


Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #17 on: July 06, 2012, 07:58:36 AM »
Mike,

Now I am remembering why I did not breadboard it.

I could not figure out how to build the 6 pin connector on the breadboard, since the pins would be connected.

I supposed I could use alligator clips to connect male header pins to my board, is that how its done, or is there another way?

Thx

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #18 on: July 06, 2012, 08:03:23 AM »
Hm, although it's not the clearest picture, it LOOKS like either MISO or MOSI has a solder connection to 5V, which will cause some problems.  Do you know how to check continuity in a circuit using a multimeter?

If not: take the multimeter, and you should have a setting that looks like a diode symbol (a triangle pointing into a bar).  Set it to that, and when the leads aren't touching, you will get either "1" or "OVERLOAD" or something to that effect.  When they touch, the reading should go down to 0, or it will beep or something.

Put one lead on MISO and one on GND, and check if there is a connection.  Do the same for MOSI, and then do both again for the 5V line, just to be sure.

Check all of your connections for continuity.  You should make sure not only that all of the pins are connected like they should be, but that none of the pins are connected to anything BUT what they should be connected to.

I'm intrigued to know if that's the answer, since setting up the ISP with these chips isn't super hard, so it's got to be a circuit problem, or the uC is broken somehow.

In order to breadboard it, you have to be a little...creative :-P  The easiest way I had of doing it was to take a small piece of board that I can solder to, and make the 6 pin connector, then attach a whole bunch of solid wires to each of the pins.  Plug in the wires into the associated uC pin and you're good to go.

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #19 on: July 06, 2012, 08:25:46 AM »
Hm, although it's not the clearest picture, it LOOKS like either MISO or MOSI has a solder connection to 5V, which will cause some problems.  Do you know how to check continuity in a circuit using a multimeter?

If not: take the multimeter, and you should have a setting that looks like a diode symbol (a triangle pointing into a bar).  Set it to that, and when the leads aren't touching, you will get either "1" or "OVERLOAD" or something to that effect.  When they touch, the reading should go down to 0, or it will beep or something.

Put one lead on MISO and one on GND, and check if there is a connection.  Do the same for MOSI, and then do both again for the 5V line, just to be sure.

Check all of your connections for continuity.  You should make sure not only that all of the pins are connected like they should be, but that none of the pins are connected to anything BUT what they should be connected to.

I'm intrigued to know if that's the answer, since setting up the ISP with these chips isn't super hard, so it's got to be a circuit problem, or the uC is broken somehow.

In order to breadboard it, you have to be a little...creative :-P  The easiest way I had of doing it was to take a small piece of board that I can solder to, and make the 6 pin connector, then attach a whole bunch of solid wires to each of the pins.  Plug in the wires into the associated uC pin and you're good to go.

MIKE

Mike, I did not do any continuity tests, instead I did check for 10k+ resistance on those pins.

I will do a continuity test as soon as possible and report back.

Makes sense on the breadboard, that was kind of what I figured was I would have to do something like that.

Thx again!

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #20 on: July 06, 2012, 09:19:32 AM »
Hm, yeah, sometimes it is a continuity problem.  Especially with the SPI interface, it's hard to know when that happens.  For example, if MISO is always +5V, then you can't receive any data from the slave, but how do you distinguish between "No data, accidental short" and "a really big string of 1's" :-P

IF it is continuity due to soldering, don't scrap the board.  It is possible to remove solder using solder wick, and it's a good learning experience.

I'm away this weekend, but I'll check back in on Sunday.  I'm interested in knowing if this was the issue.

Cheers,

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #21 on: July 06, 2012, 09:38:35 AM »
Hm, yeah, sometimes it is a continuity problem.  Especially with the SPI interface, it's hard to know when that happens.  For example, if MISO is always +5V, then you can't receive any data from the slave, but how do you distinguish between "No data, accidental short" and "a really big string of 1's" :-P

IF it is continuity due to soldering, don't scrap the board.  It is possible to remove solder using solder wick, and it's a good learning experience.

I'm away this weekend, but I'll check back in on Sunday.  I'm interested in knowing if this was the issue.

Cheers,

MIKE

Mike, just tried all of the continuity tests between Mosi and Grnd, Mosi and 5v, Miso and Grnd, Miso and 5v.

All seemed fine.

and to make sure, I ran the continuity test on the pins that were supposed to connect, and they did.

I am completely at a loss.

I am going to try a different Atmega8, I actually forgot I had another one.

This is frustrating!

Thx again for your help.
« Last Edit: July 06, 2012, 09:40:25 AM by ErikY »

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #22 on: July 06, 2012, 09:59:48 AM »
You need to do a second set of tests: there are pins that are supposed to be connected to each other, and they are.  But are there any shorts?  For example, is MISO also connected to GND accidentally?

If THAT doesn't work, then yeah, try another uC.

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #23 on: July 06, 2012, 10:03:19 AM »
You need to do a second set of tests: there are pins that are supposed to be connected to each other, and they are.  But are there any shorts?  For example, is MISO also connected to GND accidentally?

If THAT doesn't work, then yeah, try another uC.

MIKE

Mike, I think I did that.

I put it on the continuity test and put one on Miso and one on Ground, and no beep, same with mosi, and same with both miso and mosi on 5v, is that what you mean or something else?

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #24 on: July 06, 2012, 10:04:57 AM »
Nope, that was it.  Hm...try another uC in a solderless breadboard and see if you can get a connection to it, then.  This REALLY shouldn't be hard, so probably it's an issue that isn't related to anything you did, but it's a hardware problem or something that's causing the issue.



MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #25 on: July 06, 2012, 10:07:54 AM »
Just checking; is the 5V regulator actually giving you 5V?
Current project: tactile sensing systems for multifingered robot hands

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #26 on: July 06, 2012, 10:27:56 AM »
Nope, that was it.  Hm...try another uC in a solderless breadboard and see if you can get a connection to it, then.  This REALLY shouldn't be hard, so probably it's an issue that isn't related to anything you did, but it's a hardware problem or something that's causing the issue.



MIKE

OK, so, I swapped out my first atmega8 with another one, still failed to connect.

So now I have tried two different computers, two different atmega8's.

I have run through all of the driver updates.

I am using AVR Studio 4.13 with both service packs applied.

I have checked and rechecked, and rechecked again the connections.

I am at a loss.

I am going to try the breadboard, if that does not work, I am wondering if my programmer is bad.

This should not be that hard, I agree.

Very frustrating.

Thx for all your help, really appreciate it.

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #27 on: July 06, 2012, 10:29:22 AM »
Just checking; is the 5V regulator actually giving you 5V?

Yes, everywhere it is supposed to I have checked and it is registering at 4.98 on my multimeter, I have checked all the sensor pins, the vcc on the programmer connector, the vcc, AVCC and the AREF on the microcontroller, all have 4.98.


Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: AVRRISP MKII Connect Failed
« Reply #28 on: July 06, 2012, 10:41:25 AM »
What is the voltage on pin 1 of the uC?  It should be +5V.  If it isn't (if it's too low) your uC is in a continuous reset mode.  THAT is my last, best guess :-(

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: AVRRISP MKII Connect Failed
« Reply #29 on: July 06, 2012, 10:48:59 AM »
What is the voltage on pin 1 of the uC?  It should be +5V.  If it isn't (if it's too low) your uC is in a continuous reset mode.  THAT is my last, best guess :-(

MIKE

Mike, do you mean on the reset pin?

I got 4.6V on the reset pin, that is interesting, any ideas on why it would be that low, is that my issue?

 


data_list