NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Amtel AVR ISP mkii bootloader trouble

December 27, 2012
by exussum
exussum's Avatar

Hi all

Im trying to first clear an existing chip (old Audino chip) and put the nerdkits bootloader on there.

Ive installed the drivers and everything seems to be ok (2 green lights).

When doing the following command avrdude -c avrisp2 -p m328p -e

i get this back

avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout

Ive got the red side of the ISP and the nearest side to the cable going to vtg (pin 2)

http://i166.photobucket.com/albums/u117/rdshear/10-10-6.jpg

pin 1 above. And the rest wired as the diagram

Am i missing something ?

December 27, 2012
by Noter
Noter's Avatar

You need to specify the baud rate and comm port on the avrdude command line.

December 27, 2012
by exussum
exussum's Avatar

-P usb -b 9600 gives

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.
December 27, 2012
by exussum
exussum's Avatar

just tried in Atmel Studio 6. I upgraded the mkii ok but its not able to access it there either ill post pics tomorrow morning as im guessing its wired wrong now ...

December 27, 2012
by exussum
exussum's Avatar

Think i may have solved it - being an old Arduino chip i think the RSTDSBL fuse is enabled, How can i disable it ?

December 27, 2012
by Noter
Noter's Avatar

Assuming the chip is not fried, you will need a high voltage parallel programmer to make that change.

What type of PC are you using? I am not familiar with a comm port named "usb".

December 27, 2012
by exussum
exussum's Avatar

windows 7. the mkii doesnt make a virtual com port.

Its not fried, Is it possible to make one ? as for the sake of 1 chip i dont think its worth buying one

December 27, 2012
by Noter
Noter's Avatar

It is possible to make a parallel programmer and it is a lot of fun. All the necessary information is in the datasheet. Making your own will take a while so if you don't have the time or inclination, Ralph has a parallel programmer that runs about $50, the AvrDragon I think.

I took a quick look on the internet for "avr mkii usb avrdude" and there appear to be issues with usb driver conflicts for the mkii on windows when Amtel Studio is installed and then trying to use avrdude.

Maybe just save that chip. Or get a isp programmer that will work with avrdude via the virtual comm port. Or make one. It's a lot easier than a parallel programmer and you can follow along on this article in the library - Library > Nerdkit ISP Programmer

December 28, 2012
by exussum
exussum's Avatar

I live in the UK so its closer to £50 over here.

Ive tried it with my current nerdkit (which i know the reset line works) and its the same issue.

Here are some pictures which hopefully help

http://imageupper.com/g/?S020001008Y1356694282257167

December 28, 2012
by Rick_S
Rick_S's Avatar

It's really hard to tell from your photo exactly where the key is in the 6 pin connector but it looks (based on the red side of your IDC cable) that it could be wired wrong. This photo illustrates what each pin is for the PIN HEADER (The part connected to your breadboard) if you were looking into it.

ICSP PINOUT

So if you were to hold the connecter that goes to your breadboard, where you are looking at the pins with the key slot on the left, pin 1 is upper left.

Again, it's hard to see the key but the red striped side of the IDC ribbon cable usually indicates the pin 1 side and if that is the case, things look to be connected wrong.

Good Luck,

Rick

December 28, 2012
by exussum
exussum's Avatar

Hi Rick,

The red side has 2 colours coming out, Yellow on the top and Black on the bottom (if the ribbon was pointing down, The notch would be on the top.)

The Yellow wire goes to the 4th from the bottom on the right hand side (PB4 - MISO) which seems to match ?

with the black wire going to +5v

I can make the top light flash orange if I replace the resistor on pin 1 with a wire. Which seems to be what should be expected ?

December 28, 2012
by Rick_S
Rick_S's Avatar

Yep, I got things flip-flopped in my head. Looking at it again, it does look correct. What value resistor did you use on pin 1?

December 28, 2012
by Rick_S
Rick_S's Avatar

Looking at your photo's it looks to be a 1K5, you could try a 10K instead. Maybe your programmer is having trouble pulling the reset line low. Other than that, you could try either a USBASP programmer or build your own using NOTER's code to see if they work. I Use a USBASP type programmer for all my ISP programming and from Windows XP thru Windows 8 have never had an issue. I've read of several issues with the AVRISP and clone programmers in Windows especially Vista and beyond.

December 28, 2012
by exussum
exussum's Avatar

its a 7k8 at the min - im looking for a 10k one

December 28, 2012
by exussum
exussum's Avatar

Found a 10k one. Still not working. Im going to try with Linux see if that helps at all.

Thanks for all the help so far

December 28, 2012
by Rick_S
Rick_S's Avatar

The 7k8 should be enough. I wouldn't think that'd be the issue. It seems to be leaning more to the programmer.

Also, I was reading through this post, you were at one point suspecting the reset disable fuse had been programmed, but then noticed that your programmer wasn't working on another (NK) chip. I would agree that the issue isn't likely the reset fuse being set, that would be very unusual and not standard for any variety of arduino I'm familiar with.

I think the alternative programmer would be the way to go (Unless you are determined to use AVR-Studio which is tied to their programmers). You can get a USBASP type programmer on ebay for a few dollars US from Chinese sellers. You could probably source one in the UK for not much more through e-bay. Or, you could build your own as Noter has shown. This would at least put you in the realm of platforms several of us have used that are known to work.

Rick

December 28, 2012
by exussum
exussum's Avatar

http://www.ebay.co.uk/itm/USBasp-AVR-Programming-Device-for-ATMEL-proccessors-HK-Multi-Rotor-Control-Board-/350602393106?pt=UK_ToysGames_RadioControlled_JN&hash=item51a187f612

Would that one be ok ? HK will take a few weeks to deliver this one is based in the UK. I would prefer to have a dedicated programmer than one i have built really.

I was reading though some help guides and it was mentioned that some people will set the fuse to give the extra IO port. I didnt own the chip before it was an arduino so i wasnt 100% sure of the history. It does work though.

Thanks

December 28, 2012
by Rick_S
Rick_S's Avatar

That one should work fine.

One other thing, before giving up on the current programmer. Does that programmer power the chip for programming, or does it require the chip to be powered externally? It looks like you are supplying power from your board. I know with my programmer, I can power the chip at the board or provide power from the programmer. Maybe try removing the power at the board to see if the programmer powers it. If it does, try programming again with only programmer power... Just a thought before you make another purchase.

Rick

December 28, 2012
by exussum
exussum's Avatar

The second light shows the power status of the board. When trying to program without in AS6 it says "Target power needs to be between 1 and 5.5v"

It reads the power ok.

http://support.atmel.no/knowledgebase/avrstudiohelp/mergedProjects/AVRISPmkII/HTML_Source/Troubleshooting_Guide.htm

I can connect to the mkii (i upgraded the firmware fine) and the USB light is green.

I can force the second light to blink orange by removing the resistor and replacing with just a cable.

So it seems to be reading it ok

Ill buy that programmer if i cant get ti solved by 4pm UK time

December 28, 2012
by exussum
exussum's Avatar

So using Debain i get this

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.

avrdude done.  Thank you.

Think its time to just buy a new one

December 28, 2012
by exussum
exussum's Avatar

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1008655

Sounds faulty - Shame i bought mine like 6 months ago :(

December 28, 2012
by Rick_S
Rick_S's Avatar

Could be faulty. Maybe they had a bad batch?? Hopefully the new programmer will get you going.

Rick

January 01, 2013
by exussum
exussum's Avatar

Got the one from ebay yesterday. It worked right away. Provides power too so thats 1 less thing to worry about. Flashed the chip no problems at all.

Looks like it was a dodgy cable !

Thanks for all of your help

January 01, 2013
by Rick_S
Rick_S's Avatar

I have had a lot of good luck with the USBASP programmers, I'm glad that it worked for you too.

Rick

Post a Reply

Please log in to post a reply.

Did you know that NerdKits has been featured on Slashdot, Hack A Day, Hacked Gadgets, the MAKE blog, and other DIY-oriented websites? Learn more...