Updating Usbasp firmware using Eepe in Windows

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sat Mar 02, 2013 8:35 am

Here is a process to update the firmware on a usbasp programmer using eepe. This is helpful for people who are not comfortable using avrdude on the command line. Most of us already know how to use eepe.

Process
  1. You need two usbasp programmers. One is used as the 'programmer' and the other is used as the 'target'
  2. The 'target' is the one getting updated. It is connected like your 9x usually is during a firmware upgrade.
  3. Remember you have to put a jumper , (usually a little solder ) , on the 'target' . Thanks to Romolo and Showmaster for the photos. More info here viewtopic.php?f=10&t=1363

    the Betemcu.cn/Baite usbasp
    image.jpg
    the Hobbyking usbasp
    usbasphk.jpg
    usbasphk.jpg (20.25 KiB) Viewed 17780 times
  4. Pick the firmware version you want from http://www.fischl.de/usbasp/ , or use the Romolo patched version provided here viewtopic.php?f=10&t=1363
  5. I used http://www.7-zip.org/ to extract the archive. There may be better tools, I dont do windows much.
  6. Now the hacky part of this. Go into the avrdude setting in eepe and add '-p m8' to the extra arguments. Your 'avrdude location' value will be different. leave it alone if it was working.
    avrdude_eepe.png
  7. Flash the firmware as usual. But instead of flashing er9x to a 9x you are flashing upgraded firmware to your usbasp device.
    Screenshot.png
    Screenshot.png (16.17 KiB) Viewed 17741 times
  8. Dont forget to remove the 'extra arguments' from the avrude configuration in eepe. You wont be able to communicate with your 9x if you leave them in there.
  9. Enjoy never having to see 'warning: cannot set sck period' and being able to use the '-B' option to avrdude to control the speed of your flashing.
and a video of the whole thing

[BBvideo 425,350]http://www.youtube.com/watch?v=iHJwN7Z8QA4[/BBvideo]
Last edited by rperkins on Sun Mar 03, 2013 1:20 am, edited 1 time in total.

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sat Mar 02, 2013 10:30 pm

hmm, may be i can try using the SP to flash my HK USBASP to see if I can revive it. solder those 6 wires on the SP, short the HK board as indicated, plug the SP board through the mini usb of SP to PC and run it ?

User avatar
Kilrah
Posts: 9495
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Updating Usbasp firmware using Eepe in Windows

Post by Kilrah » Sat Mar 02, 2013 10:33 pm

Yep that should work.

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sat Mar 02, 2013 10:37 pm

but I have to remove the Sp from the tx right? or I can just leave it in the tx? or it will program two atmel at the same time.
and which version of the FW for programmer we now know working?
rperkins mentioned two. which one is recommeneded?
Last edited by kaos on Sat Mar 02, 2013 10:39 pm, edited 1 time in total.

User avatar
Kilrah
Posts: 9495
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Updating Usbasp firmware using Eepe in Windows

Post by Kilrah » Sat Mar 02, 2013 10:39 pm

You have to remove of course. Leaving it in will probably screw up both.


User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sat Mar 02, 2013 10:47 pm

which fW (two brought up by rperskins) is recommended for Hk USBASP.
also, I should leave the removable jumper on the HK programer on while doing this, right?

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sat Mar 02, 2013 11:14 pm

Which firmware is a debatable topic :)

I am currently using 2011 firmware as shown in the video and recommending the removal of the large capacitor on the reset line of the 9x. Most pictures of 9XR already have that capacitor removed. Showmaster did get a 9XR that still had the capacitor in place. I am thinking that he is an 'early adaptor' and got one of the first 9XR's off the assembly line.EDIT - when I finally got a 9XR for myself came to realize that Romolo's patched 2009 version worked better

Romolo speaks of issues using the 2011 version and recommends 2009, or his patched 2009. I dont believe his issue was related to the 9x, it was one of the 3rd party boards with a different processor. He does not remove the capacitor on the reset. He is much more knowledgeable than me so you will probably be safe going that route.

I use the current version because it makes the programmer more usable for other uses besides the 9x. Namely it provides TPI support for newer lines of AVR's . I have googled for the general reception of the 2011 version of usbasp firmware and have not found complaints. If you find some , besides what is posted in this forum, I would like to be pointed to them. I am on a search for the best all round open source firmware that meets the 9x/9xr community needs while keeping up with the newer AVR products.

The current firmware on your chinese usbasp is closed source, usually protected. It's main feature is autospeed, which IMHO is obsolete now that avrdude has the '-B' option for usbasp. If you are looking for that firmware I believe a link to it is posted in the comments here. I dont support believe in closed firmware in an open source hardware project.
http://jethomson.wordpress.com/2011/08/ ... rogrammer/
http://jethomson.wordpress.com/2011/08/ ... mment-1654

Well did that muddy it up enough :)
Last edited by rperkins on Mon Apr 08, 2013 12:19 pm, edited 1 time in total.

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sat Mar 02, 2013 11:22 pm

yes leave the jumper on while reprogramming. The jumper holds the reset low so that the device ready to accept updated firmware. Remove the jumper after reprogramming to allow it to function as a usbasp device

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sat Mar 02, 2013 11:24 pm

thx. for the explanation and the jumper thing.
no it did not muddy it up. cause only one line popped up 'Romolo speaks of issues using the 2011 version and recommends 2009, or his patched 2009........so you will probably be safe going that route.' ;)
I will use his 'main.hex' . since this will be dedicated to this tx only , not for anything else.
I will give it a try, see if I can fry the SP as well. ;)

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sat Mar 02, 2013 11:37 pm

LOL
lightning probably wont strike twice today.

I'm glad Kilrah said it probably would work cause i didnt know if the SP board utilized the usb power or if it relied on the 9X's power. IE: Does the 9x have to be turned on to program using the SP ?. So apparently the answer to the question is no, the 9x does not need to be turned on to program using the SP.

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 12:00 am

thunderstorm may have hundreds of lightening. ;)

yes/no, the SP board don't need the tx power to be turned on. I have been using it without tx turned on all the time.

User avatar
MikeB
9x Developer
Posts: 15565
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Updating Usbasp firmware using Eepe in Windows

Post by MikeB » Sun Mar 03, 2013 12:19 am

Which version of the SP board do you have? I believe the most recent version DOES require the tx power to be ON.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 12:42 am

mine is rev 2.1 the old one with EL light support.

well, lightening did strike twice. I got every thing hooked up and plug in and sp board is recognized window, open eepe, add '-p m8' in extra argument. the only thing is now hit 'ok'. the screen disappeared but the next screen to specify which file never show up. eepe still is fine. just like the averdue disappeared. :?

yes, I did short R8 as pictured above.
Attachments
130302-7.jpg
130302-8.jpg

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 12:57 am

there is one thing. I accidentally clicked on the set fuse screen button and when i got out I think I also hit OK. I did not change any fuses setting just clicked OK.

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sun Mar 03, 2013 12:57 am

after you hit ok you still have to 'flash firmware to TX'. Did the youtube video help ?
Screenshot.png
Screenshot.png (16.17 KiB) Viewed 17734 times

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sun Mar 03, 2013 12:59 am

and you have the computers usb connected to the SP, not the HK programmer
EDIT- I reread your post and yes you have the SP usb hooked up

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 1:13 am

ah, dum idiot, did not see that cursor goes up the burning icon.
But, went through the whole process with exit error code 1
'error: programm enable: target doesn't answer. 1
initialization failed , rc=-1
double check or use -F to override this check.
should I do that? and how
-p m8 -F?


edit: just checked the voltage when sp is connected to PC usb. the 5 v goes through all the way to the other side of the USBASP 's usb port. if this matters.
Last edited by kaos on Sun Mar 03, 2013 1:20 am, edited 1 time in total.

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sun Mar 03, 2013 1:18 am

that wont work. the 'F' stands for foolish :)

you could try '-p m8 -B 100' and see if it answers. if not then I dont know.

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sun Mar 03, 2013 1:21 am

But I did go ahead and add that graphic to the initial post :)

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 1:23 am

same thing, same message with '-p m8 -B 100'
only thing I noticed it says on the 1st line' frequency 8000 hz'.

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sun Mar 03, 2013 1:29 am

yea it slowed it down . Well I dont have any more moves :(
avrdude is seeing your SP board. the SP board is not seeing the HK programmer.
Be sure to remove those extra arguments so that when you get your SP board back in the TX it still will communicate with the 9X.

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 1:42 am

yep. thx for your help.
may be some one can come out with some idea. or it is a true DOA.
dang, doing all these mod, 1st time running into a brick. if it turns out to be a DOA, i am going to shoot HK. :mrgreen:

User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Updating Usbasp firmware using Eepe in Windows

Post by gohsthb » Sun Mar 03, 2013 2:17 pm

Can you post the output window? It might give additional clues.
-Gohst

Sent from my LG-P999 using Tapatalk 2

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sun Mar 03, 2013 4:37 pm

I was wondering if the HK programmer has status led's, and are they working normally ?

with the betemcu.cn units, the status led's are not lit when the programming jumper is installed, so you may have to remove the jumper

Also did the programmer ever work for you ?
Is it possible you shorted something out while soldering on it ?
Do you have an oscilloscope to connect to the crystal to see if it is oscillating ?

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 5:26 pm

that is one thing I forgot to do. never test it. brand new out of the box.
there a a couple leds on it, but none of them has lit up any time.
I have checked to the best I can make sure there is no shorts. and those connector really is pretty far away from any components on it to burn something out I think.
Besides my stigmatic vision :lol: , I don't have anything else to see something is jumping. :lol:

ghost: here is an exit screen from eepe/avrdue
Attachments
avrdue exit screen.png

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sun Mar 03, 2013 5:35 pm

yea , no lights at all , even without programming jumper on, makes me suspicous. I've never had HK programmer so cant comment for sure. Showmaster is familiar with them. maybe find a youtube video and see if they light up as soon as power is supplied .

What I see in your screenshot is avrdude saying ' Hey I'm here but I'm all alone. Cant find my 'target' '

User avatar
Kilrah
Posts: 9495
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Updating Usbasp firmware using Eepe in Windows

Post by Kilrah » Sun Mar 03, 2013 5:43 pm

Yes the green LED is supposed to light immediately when plugged to the computer as a programmer. With the jumper it stays off.

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 5:55 pm

with the programmer attached to SP now as is in the above pic, with jumper on and with R8 shorted. how about let me plug the usb on the programer end to see what happened? or pull the jumper and/or the R8 short to try. will that hurt the SP? if not I can try , at least to find out if any led would light up.

when I plug in the SP to Pc usb I have measured 4.95v at the programer's usb side. so current is going that way.

here is a couple pic of the programer, I don't see any shorts. I did check with a ohmmeter between wires, I can't get any reading indicating of short. the wood chip/board was meant to be a spacer for the programmer to be hot glued on the main board.
Attachments
130303-2.jpg
130303-1.jpg

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Updating Usbasp firmware using Eepe in Windows

Post by rperkins » Sun Mar 03, 2013 7:22 pm

on the betemcu , no lights light up when the jumper R8 is installed because the reset is pulled low and no code is running. The MCU is sitting there waiting to be updated. It is necessary to remove the jumper R8 to see any led's light up. I would imagine the HK is similar. Remove jumper R8 and apply power from either end. IE: 5v from SP to the programming side of the HK,or, 5v from usb port or other 5v source to the usb side of the HK.

Alright now I realize you may be talking about 2 separate jumpers.
R8- spot where you put solder to enable programming mode. I guess it is labeled R8 because you could insert a '0' ohm resistor across there :) This is what I have been calling the jumper all along.

Jumper - assuming this is a real jumper that determines if the 'target' is powered by the 'programmers' power supply, which in this case is the usb 5v. Leave that one on. forget about it for now

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Updating Usbasp firmware using Eepe in Windows

Post by kaos » Sun Mar 03, 2013 8:05 pm

did that rem the R8 short with jumper on. plug in from either side of sP or programmer, no led lit. plug from sP, Usasp device detected. plug from programmer: unknown device. :-S

when not powered, I check the led with ohmmeter, the led soes blink shortly. (not burned out, repeatable and I lift probe quickly)
plugged in from eithe sP or programer, the 5v goes all the way through either end.
I think I have a bad chip some were. most likely the long shining metal cap one. I can get some volatge difference at the main chip's legs.

Post Reply

Return to “PROGRAMMERS”