go_away

Author Topic: Programming atMega168 with AVRISP MKII  (Read 24382 times)

0 Members and 1 Guest are viewing this topic.

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
Re: Programming atMega168 with AVRISP MKII
« Reply #30 on: January 27, 2008, 08:08:06 AM »
I don't have a schematic (never made one), but I can show the PCB layout, since this is such a simple board...

I'll also attach a better picture of the board itself.

I use AVRStudio to do the programming and setting the fuse bits. I'm using version 4.13, Build 528.

- Jon

« Last Edit: January 27, 2008, 08:10:37 AM by JonHylands »

Offline MaltaeronTopic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #31 on: January 28, 2008, 11:28:50 AM »
HAH Bioloid, not Bloloid!  :D

Huh, only thing I see that you are doing different is with the little orangish things on the power lines, are they capacitors? What is their purpose?

Thanks, again

Offline bukowski

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #32 on: January 28, 2008, 11:52:09 AM »
huh, your right. I just looked at my programmer and the plug is installed opposite of yours. wierd. I shouldve paid more attention.

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
Re: Programming atMega168 with AVRISP MKII
« Reply #33 on: January 28, 2008, 12:41:03 PM »
Huh, only thing I see that you are doing different is with the little orangish things on the power lines, are they capacitors? What is their purpose?

Yes, they are capacitors, as specified in the data sheet for the voltage regulator I am using (L4931). They help smooth out the voltage regulation, but if you want to know more than that, you should talk to someone who knows something about electronics (I'm really a software guy).

In my 2x3 programming header on the PCB, pin 1 is on the bottom left, btw...

- Jon

Offline MaltaeronTopic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #34 on: January 28, 2008, 02:42:46 PM »
Huh, well now I'm really stuck.

Considering what everyone else has said, I can't see what the problem is if not the programmer.

I repeat:
Considering that the problem might be with the programmer (like hardware or something), is there any warranty on it? I bought it from digikey, but I don't know if that makes any difference. Also should I bother trying this with atmel's support (if any?), as well, what is the real difference between the AVR ISP programmer and the AVR ISP MKII? Might the former work better?

Thanks

Offline bshir

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #35 on: January 28, 2008, 07:53:30 PM »
For reference, my software/firmware is:
AVRStudio 4.13 sp2,
HW: 0x01, FW Major: 0x01, FW Minor: 0x06 ... OK. 

I bought my two AVRISP mkII's from Digikey within the last week.  When did you all get yours?  I wonder if they have a batch of bad HW...  Anyway, I've opened a support call with Atmel, but haven't heard back yet.

Meanwhile, I ordered a USBtinyISP AVR kit from adafruit.com, and a parallel programmer for backup.  Sigh.

Offline tritical

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #36 on: January 28, 2008, 11:45:22 PM »
@Maltaeron: Don't go insane !

  I just registered here so I could chime in on this thread, after finding you all via a google search.  I've got two brand new AVRISPmkIIs that are exhibiting the same symptom: flashing orange whenever connected to target, regardless of pull-up resistor on RESET.  And this is with target boards that have known good CPUs on them, actually running code (that was previously flashed with an STK500).
  I've been over on the avrfreaks forum, talking with a couple of people there, and one person who is having the same problem.  I'm not sure about him, but the two AVRISPmkIIs I have were also recently ordered from Digikey.

@bshir:  I also opened a support request with Atmel, and am awaiting response.

FWIW:  I've been using Atmel parts since their introduction back in '97, and I've been using an STK500 for years now without problem.  I'm pretty confident that if this problem *is* the symptom of a bad batch of programmers, that once it's set right, the AVRISPmkII will be just as reliable as my STK500.

-jeremy

oh - and my software is AVRStudio 4.13 sp2, firmware is FWMajor=0x01, FWMinor=0x06

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
Re: Programming atMega168 with AVRISP MKII
« Reply #37 on: January 29, 2008, 07:41:37 AM »
That's really interesting. I have two of those programmers (AVRISP mkII), also bought from Digikey, but I bought mine a long time ago (almost a year ago for one, and probably nine months ago for the other).

They both work great...

- Jon

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Programming atMega168 with AVRISP MKII
« Reply #38 on: January 29, 2008, 08:45:03 AM »
tritical, thanks! please keep us updated.

Quote
what is the real difference between the AVR ISP programmer and the AVR ISP MKII? Might the former work better?
The MKII uses USB instead of RS232 to connect to your PC. The original ISP supports both the 6 pin and 10 pin connectors, where the MKII only supports 6 pin connectors.

I have a few of the originals around so I haven't bought the MKII yet. But I was planning to put an order in for one today, so maybe I should hold off until this problem is resolved?

Offline bukowski

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #39 on: January 29, 2008, 10:48:22 AM »
An email I received from digikey when I got my mkII:
Quote
Design Support Services Bulletin

Thank you for your recent purchase of the ATMEL ATAVRISP2 development system from Digi-Key Corporation.

Digi-Key Design Support Services (DSS) is ready to assist you with any questions or startup issues that you might encounter with this engineering tool. Our application engineers can provide you with in-depth design and component selection recommendations for your project, at no cost to you.

Learn more about Digi-Key's Design Support Services Team: Learn More

If you are not the ultimate user of this product, please forward this email to the requesting engineer.

Contact Us:
Toll Free: 1-877-DKDESIGN (1-877-353-3744)
Fax: 218-681-3380
Email: [email protected]
Staffing hours: 8:00am - 5:00pm Central Time

We look forward to discussing your application questions or concerns.

Regards,
Digi-Key Design Support Services Team
You might want to contact them also.

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: Programming atMega168 with AVRISP MKII
« Reply #40 on: January 29, 2008, 01:16:03 PM »
I bought my AVR ISP MKII about 7 months ago and it works perfectly fine after I set the frequencies and such correctly in AVR Studio.

My problem was that I had incorrectly mis-identified the pins MULTIPLE TIMES when I was attaching the 2x3 ISP header to my board. I desoldered it many times and resoldered it again and again to fix the problem but I still didnt get it right. Took me forever to finally realize my mistake. I was so pissed off at myself for missing such a detail... My troubles are logged in a thread somewhere on here about connecting the 2x3 AVR to the board :P Try taking a look at that thread to see if it helps you


Gotta run off to work now. Cya guys
« Last Edit: January 29, 2008, 01:18:01 PM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline tritical

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #41 on: January 29, 2008, 05:31:08 PM »
@bshir: the two mkIIs I have were purchased from Digikey within the last week or so.  Here is the info on the bottom of the two units I have:
date: 20071012 usb# 00B0024073
date: 20071012 usb# 00B0024254

@all:  at the suggestion of another avrfreaks member, I tried using one of my mkIIs via avrdude, instead of the programming window within AVRStudio4.  I had to temporarily switch USB drivers in order to do this, as the driver bundled with AVRStudio does not play well with the driver bundled with WinAVR.

and... Success !  Despite the flashing orange status, avrdude merrily instructs the mkII to go out and talk to the target.  Interestingly, after reading out the flash memory of my target, the status light went GREEN !  Of course, disconnecting then reconnecting the target cable gets you back to flashing orange.

cautious conclusion:   The mkIIs in question seem to work.  AVRStudio could probably talk to the target chip just fine, if it weren't so obstinate about stopping you at the "there's something wrong with your cable" dialog.

confident conclusion:  my hardware setup (cables, connectors, power supply) have been fine all along.

I would say we're looking at a defective batch of mkIIs, but am still awaiting response to the support ticket from Atmel.  I may also contact Digikey as suggested.

-jeremy

Offline MaltaeronTopic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #42 on: January 29, 2008, 08:37:29 PM »
What did you change the driver to? And did you just use the device manager to do it?

I tried this with the "normal" driver, which didn't work:

avrdude -p m168 -P usb -v -c avrispmkII -e -U flash:w:RobotMain.hex

Did not find any matching usb device "usb"

Thanks, and I'd love to hear the excuse behind all of this!  :D

P.S.

I am using avr studio 4.13.571 sp2
« Last Edit: January 29, 2008, 08:40:17 PM by Maltaeron »

Offline tritical

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #43 on: January 30, 2008, 12:07:37 AM »
@Maltaeron: yes, I suppose you could use the device manager to un-install just the Jungo USB driver that was installed by AVRStudio4.  On the machine I was trying this on, I went ahead and un-installed the whole AVRStudio4 package.

(bear with me, I'm writing this down from memory, and am not on the machine that I did the test on)

With the Jungo driver out of the way, I installed WinAVR.

So, now when you connect the AVRISPmkII to the PC via the USB cable, Windows will announce that it has found new hardware.  Choose 'specify driver location', and click OK.  On the next page, choose 'include this location in search', and in the drop-down, browse to '~/utils/libusb/bin', where ~ is the base install directory for WinAVR.  Windows should find the driver there and finish up the installation.

After all that, on my machine, avrdude was able to find the AVRISPmkII on the USB bus.

I hope that helps !  And I'm still waiting for any word from Atmel...

Offline MaltaeronTopic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #44 on: January 30, 2008, 05:07:37 PM »
HA, I am SOOOOOOO glad that that just worked!  :D

Also, I didn't even have to uninstall avr studio!

Now, lets see what the real thing behind this was... Waiting... Waiting...

:)

Offline bshir

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #45 on: January 30, 2008, 11:19:00 PM »
I've been talking with an AE at Digikey.  He believes that my AVRISP mkII's are defective, and suggests that I return them.  He also says that they are going to sort through their stock of mkII's and figure out if one of the batches is bad.  Tritical, you might send your serial numbers to [email protected] as well.  They seem to be responsive.

Also, an Atmel support rep has also gotten back to me, but I haven't convinced him that it's not just my wiring yet.  Maybe they'll believe Digikey.  ;D

Anyway, I haven't tried avrdude yet; I'll probably try that before returning the ones I've got.  I'd still rather have manufacturer-certified programmers than something I have to work around... it's a little unnerving not being able to use Atmel's official programmer with Atmel's official software to program Atmel's products.

Quote
cautious conclusion:   The mkIIs in question seem to work.  AVRStudio could probably talk to the target chip just fine, if it weren't so obstinate about stopping you at the "there's something wrong with your cable" dialog.
...
I would say we're looking at a defective batch of mkIIs

I agree.  On wrong reel of resistors, or baking incorectly and having cracked solder, could cause a marginal electrical problem that would trip the pedantic mkII protection circuitry, but everything else might still work.

My mkII serial numbers are:
20071012 00B0024270
20071012 00B0024079

If I'm reading these right, then my 2 units are from the same batch (2007/10/12?) as Tritical's. Interesting...

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: Programming atMega168 with AVRISP MKII
« Reply #46 on: January 30, 2008, 11:37:01 PM »
I've been talking with an AE at Digikey.  He believes that my AVRISP mkII's are defective, and suggests that I return them.  He also says that they are going to sort through their stock of mkII's and figure out if one of the batches is bad.  Tritical, you might send your serial numbers to [email protected] as well.  They seem to be responsive.

Also, an Atmel support rep has also gotten back to me, but I haven't convinced him that it's not just my wiring yet.  Maybe they'll believe Digikey.  ;D

Anyway, I haven't tried avrdude yet; I'll probably try that before returning the ones I've got.  I'd still rather have manufacturer-certified programmers than something I have to work around... it's a little unnerving not being able to use Atmel's official programmer with Atmel's official software to program Atmel's products.

Quote
cautious conclusion:   The mkIIs in question seem to work.  AVRStudio could probably talk to the target chip just fine, if it weren't so obstinate about stopping you at the "there's something wrong with your cable" dialog.
...
I would say we're looking at a defective batch of mkIIs

I agree.  On wrong reel of resistors, or baking incorectly and having cracked solder, could cause a marginal electrical problem that would trip the pedantic mkII protection circuitry, but everything else might still work.

My mkII serial numbers are:
20071012 00B0024270
20071012 00B0024079

If I'm reading these right, then my 2 units are from the same batch (2007/10/12?) as Tritical's. Interesting...

very interesting

when you do find your solution please post it up for others !!! ;)
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline MaltaeronTopic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #47 on: January 31, 2008, 12:02:54 AM »
Glad all you people are getting in contact. My serial number is:  20071012 00B0024057

Looks like again, the same batch.

And how is it that one returns something to digikey? I couldn't find anything on their site...

Offline bshir

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #48 on: January 31, 2008, 12:38:30 AM »
The DigiKey AE said to call their phone number (which from the website is 1-800-344-4539), ask for Customer Service, and request an Return For Evaluation (RFE).  I haven't tried it yet.

There's also an RMA request form on the website, under "Contact Us".

Offline bshir

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #49 on: February 10, 2008, 08:42:33 PM »
So just to follow up on this thread, DigiKey and Atmel have both agreed that the 20071012 batch of AVRISP mkII's may be prone to failure.  When I finally called DigiKey for the Return-For-Evaluation, they immediately overnighted me replacements free of charge.  DigiKey is covering all the shipping costs of the replacement, without waiting for me to send the old ones back, though they are in the mail now. (Good service!)

Anyway, the new AVRISP mkII's come in different packaging and are from date code 20070404.  I get an instant green-light when connecting to an Arudino, and I'm able to read a bunch of fuses & stuff off the Atmega168.  Looks like we have a winner.

Thanks to all on this forum for your support and participation in nailing down this issue.  Otherwise I'd have gone insane from the blinking orange light too!

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: Programming atMega168 with AVRISP MKII
« Reply #50 on: February 10, 2008, 11:10:51 PM »
ive got a 20061009
Im assuming that means mine was made September, 10th, 2006?
Mine works fine
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline tritical

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #51 on: February 11, 2008, 02:39:47 PM »
This just in - AVR have posted a firmware update for the AVRISPmkII programmer, which addresses the BOLOD (blinking-orange-led-of-doom) problem.  More info here:
http://www.avrfreaks.net/modules.php?op=modload&name=News&file=article&sid=643&mode=thread&order=0&thold=0

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Programming atMega168 with AVRISP MKII
« Reply #52 on: February 11, 2008, 02:46:28 PM »
Excellent!

Now I'll buy my programmer :P

Offline entwicklungswalther

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: Programming atMega168 with AVRISP MKII
« Reply #53 on: February 12, 2008, 12:26:36 AM »
Hello,
there is a firmware update available at:
www.atmel.no/beta_ware/
to fix the orange blinking problem.

 


Get Your Ad Here