howto: flash ATtiny with AVRDude and command prompt

Have you rebooted the computer to see if they USB port or com port wasn’t hung up or something?

Unfortunately I too have several ATtiny’s I can’t flash either…I hope I didn’t fry em by accidentally jumpering the wrong pins

I know there is a brute force method called bit banging to force programming but don’t know how to do that

Yea I’ve restarted a few times and changed USB ports too. I was having too good of luck today, something had to go wrong…

Try programming a bare chip.

I have, both with the clip and with he leads soldered direct to the chip. No go.

Sorry, I misunderstood. I thought you were trying to program in circuit. I recently had some trouble with that.

Wait, why do you have the jumper on 3.3v? Try 5v please.

So would you concur my programmer has gone bad or do you think its a software problem somewhere? I already have a new programmer on the way, whats $5, but if its a software bug I might as well keep at it.

Is there some way to test these programmers with a DMM or with some command that doesnt involve testing the connection?

I don’t think that you can fully verify that the thing is OK without some special equipment. I’d check VCC w/ your DMM and that’s about all I know how to do. Other pins could maybe be checked with a scope or logic analyzer but I do not know how and you probably don’t have the gear.

I do not think this sounds like a software problem.

Try 5v instead of 3.3v please.

Already tried that as well, don’t know if I posted this here but I’ve also verified the ribbon cable is good, there is continuity from the contacts at the tip of the clip all the way up to the pins on the back of the programmer connector (where they come out of the socket and go into the board).

I’m in the shop working on some other stuff (got hot salt boiling to anodize an Al part and can’t walk away) but when I get a chance I’ll measure the vcc out. I plan to go to my moms house later today and try it on her computer but again the new programmer is already in route, I have a ton of other people’s stuff so I had to assume the worst and get new stuff coming ASAP got it checked, its outputting either 3.5 or 5v depending on the jumper so that it ok there

Thanks so far [again].

Sounds bad to me. If you care to you could try and re-flash the programmer once you get your new programmer. Google USBASP in to find a firmware and pinout for flashing the thing. It’s just another Atmel chip on a little board.

There shouldn’t be a lot to go wrong with one of these I would think?

I found that I couldn’t flash certain chips…then it works just fine on other chips, which means it’s not the programmer

I’m afraid I might have gotten some bad ATTiny’s

See if you can program/re-program a known good chip

You know that never crossed my mind, I’ve had some ATTiny’s (tho very rarely) loose programming randomly, I think you may be onto something, parts arnt actually bad, just the ATMega lost its programming / got a bad segment.

I wonder if the chip on the programmer is blocked from being read like the 13A on stock 105c’s, if not it’s almost worth it to spend the $3 on another one so I could read it, then read this current one’s and use a difference tool on the hex file to look for a corrupt segment of code. Next time I have a FT order I’m going to add another one on.

No need. First of all, the firmware is probably just a stock one from the internet, so you can compare the hex against that. Secondly, if the two programmers you have are from the same source…

  1. Use the new programmer to dump the first one
  2. Use the new programmer to flash the first one
  3. Use the (repaired) old programmer to dump the new one
  4. Compare!

If it was a firmware issue you’ll be able to guess anyway assuming the old one starts working after you reflash. But you’ll have the opportunity to satisfy your curiosity about what went wrong where. I don’t see how ordering additional programmers helps with any of that, unless the memory in the first one is permanently damaged in some way that reflashing won’t fix.

Yeah, you could always do the flash some other firmware, then flash back…maybe it needs to be blown out?

Also do you do the erase command before you install the new firmware?

You mean on the ATMega on the programmer or when I’m doing 13A’s? When I’m doing 13A’s yea I do erase.

I dont get it.

Tried flashing an attiny for the first time today and ended up soldering the leads to it. Confirmed connection.

But when I run the avrdude with the following settings: (from a bat file)

avrdude -p t13 -c usbasp -u -e

avrdude -p t13 -c usbasp -u -uflash:w:star.V1.1.hex:a -ulfuse:w:0x75:m -uhfuse:w:0xff:m

pause

I get the following error message: avrdude: invalid option -- f

WTF?? Where am i telling it -- f ??

Uflash, not uflash. It's case sensitive. :)

..and same for fuses..

-u doesn't take arguments => following f is considered as a command <= there's your f ;)

THANK YOU!

I was soo friggin frustrated when I finally gave it up and went to bed! You just saved my morning! THANK YOU THANK YOU THANK YOU :-)

Phew that took a lot of worry away :-)

I can’t get mine to work. Tried both 5v and 3.3v. Driver is from Convoy S2.

Pretty sure that wires are connected correctly. Every time I write command in CMD then second light on programmer blink.

You have adjusted the soic clip a few times, trying again each time?
Do you have a different driver you can try? Occasionally an attiny can be bad.

Maybe post a pic of your wiring from usbasp to clip.