Page 1 of 4

Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 8:35 am
by rperkins
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 40346 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 40307 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]

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 10:30 pm
by kaos
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 ?

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 10:33 pm
by Kilrah
Yep that should work.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 10:37 pm
by kaos
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?

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 10:39 pm
by Kilrah
You have to remove of course. Leaving it in will probably screw up both.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 10:47 pm
by kaos
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?

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 11:14 pm
by rperkins
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 :)

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 11:22 pm
by rperkins
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

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 11:24 pm
by kaos
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. ;)

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sat Mar 02, 2013 11:37 pm
by rperkins
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.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 12:00 am
by kaos
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.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 12:19 am
by MikeB
Which version of the SP board do you have? I believe the most recent version DOES require the tx power to be ON.

Mike.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 12:42 am
by kaos
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.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 12:57 am
by kaos
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.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 12:57 am
by rperkins
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 40300 times

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 12:59 am
by rperkins
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

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 1:13 am
by kaos
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.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 1:18 am
by rperkins
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.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 1:21 am
by rperkins
But I did go ahead and add that graphic to the initial post :)

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 1:23 am
by kaos
same thing, same message with '-p m8 -B 100'
only thing I noticed it says on the 1st line' frequency 8000 hz'.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 1:29 am
by rperkins
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.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 1:42 am
by kaos
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:

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 2:17 pm
by gohsthb
Can you post the output window? It might give additional clues.
-Gohst

Sent from my LG-P999 using Tapatalk 2

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 4:37 pm
by rperkins
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 ?

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 5:26 pm
by kaos
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

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 5:35 pm
by rperkins
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' '

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 5:43 pm
by Kilrah
Yes the green LED is supposed to light immediately when plugged to the computer as a programmer. With the jumper it stays off.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 5:55 pm
by kaos
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.

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 7:22 pm
by rperkins
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

Re: Updating Usbasp firmware using Eepe in Windows

Posted: Sun Mar 03, 2013 8:05 pm
by kaos
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.