Guide: how to flash ATtiny13a based drivers (NANJG, QLITE, etc.) with custom firmware

Damn it. Changed the Attiny on the board, flashed it allright and the driver does not work. Weird thing is if I put the clip on it the driver works and every “avrdude -p t13 -c usbasp -n” command changes modes. I mean what is that about?

I don’t have a Mac, but it’s using a modified BSD as its base system and should still have a lot of similarities. I expect you’ll need gcc-avr, avr-libc, binutils-avr, and avrdude.

wight is right, I’m happier with (g)vim and a command line instead of an IDE. So I can’t really help with choosing or configuring an IDE, but I can at least provide scripts to use as a reference for getting the basics working. Try the README and the bin/ directory in my code repository, linked from my sig.

Time to check components. Offhand I suspect the diode. Use diode test on your DMM to check the diode in both directions. You should get a null reading in one direction and ~0.2v in the other direction.

Thanks! I’m glad more people are getting into this. :slight_smile:

I must second the suggestion to include the pomona soic clip.

The hardware I’m using is… these three pieces:

Also, about step 4, I have a collection of firmwares linked in my signature. I think I’m missing some of the projects you linked, but I’ll see about getting them added. Much like your guide, it’s nice to have everything in one place. :slight_smile:

Why is the Pomona clip better than the cheapies?

I don’t personally know how the Pomona clip compares to others, but it’s a popular option and would be good to include in the guide.

The bottom line is… if you find a solution which works for you, you win.

It’s a bit sturdier than the cheapy eBay option. Several members have posted that their Pomona clips lasted longer.

Many folks looking to flash will be placing orders with Mouser or DigiKey anyway and if you lump it in with another order the Pomona clip is only a minor additional cost.

Frankly I’ve killed one of the eBay ones and one Pomona unit by pulling on (attempting to bend) the little fingers that touch the SOIC pins. Don’t do that. In both cases something else was preventing me from flashing. No changes were needed to the clip.

I do find the Pomona clip to be superior, but not enough that I’d pay more than $20 extra for it. If you’re already ordering from Mouser I think the Pomona clip should command approximately a $6 premium or less over the eBay options, not including the $2 cable ToyKeeper mentioned. The $2 cable is not strictly necessary but is recommended. That makes it a no brainer in my book.

Is this the diode? Because it kinda moved when I replaced the MCU on the board. I’m not really equipped for this, I only have a soldering iron.

Yes, that is the diode. A DMM is a good tool, you may be able to get them locally for <$10 USD and you can certainly get them from China for $10-15 USD.

Minor movement is fine, it doesn’t look shorted if that’s your picture. I don’t remember if it’s oriented correctly, it should be fine unless you knocked it off and put it back on. If that happened you may check other pictures to see which way the markings should be oriented. EDIT: oops, that’s clearly a photo from IOS.

FWIW here’s a report on USBASP devices. I’ve been using an eBay-sourced USBASP clone marked with “www.betemcu.cn” and “2011/03/05” in copper and “SAITE”, “B76194”, “S51&AVR” marked in white silkscreen. It has a green PCB. This is the layout with the Atmega8 rotated 45 degrees, it also appears to be commonly available in black. The item pictured in this listing is what I have.

_With this device I’ve been able to flash bare ATtiny13A devices. I’ve also usually been able to flash things in-circuit, but not always! _

A while ago I ordered the USBASP board which FastTech sells, marked “USBASP V2.0” and “LC Technology”. It has a blue PCB. This is the item. I’ve had it sitting around but haven’t had a reason to do anything with it. A couple of days ago I ran into a PCB I couldn’t flash with my eBay board, so I swapped over to the FT one. Sure enough, that worked fine.

My hypothesis has been that eBay / betemcu model was unable to provide enough juice, eg it lacked “strength”. I note that while the eBay model has a resistor array with quadruple 100 ohm resistors (I think?), the FT/LC Tech one uses all discrete resistors and no four of them are 100ohm. I did not trace the circuit out and don’t care to: right now I really don’t care what the root of the problem is. It’s fixed.
:slight_smile:
This is the sort of error which I corrected simply by swapping to the “stronger” USBASP:

avrdude: Device signature = 0x000102
avrdude: Expected signature for ATtiny13 is 1E 90 07
         Double check chip, or use -F to override this check.

Subscription, going to try modding some drivers just got the needed devices exept the soic clip :~ gonna have to DIY one

I have added links for the Pamona 5250 clip to post #1, and also a “color by numbers” illustration of its use with the fastech ribbon cable in post #2. :bigsmile:

Interesting. I had been wondering if those clips were really worthwhile or not.

My Pomona clip has probably been used a few hundred times now, at least, and is still working. But in case it fails, I’ll probably order another one if I ever need other parts from digikey.

What type of connectors are on the end of those fastech ribbon cables?

I would like to provide weblinks to the cable and connectors on Digikey so much longer cables can be built and the slow boat avoided. The rainbow cable is in this category. Possibly this but I am not sure of the clips/connectors.

They’re referred to by a handful of names. Dupont, SIL or DIL (depending), Mini-PV, & etc. It’s a standard 0.1in / 2.54mm pin spacing, so lots of things will actually fit. Matthew Millman posts good information on the subject in this thread: 2.54mm connector question - Electrical Engineering Stack Exchange

For custom made cables it makes little sense to go with a bunch of color-coded 1x1 connectors though. Here is something I would suggest instead.
1. A handful of pins. (Harwin Inc M20-1160042)
2. Two 1x4 connectors. (Harwin Inc M20-1060400)
3. One 2x5 connector. (Harwin Inc M20-1070500)

Digikey cart link:
http://www.digikey.com/short/799t4p

My understanding is that the longer the cable you make the more problems you should anticipate.

EDIT: Also, FWIW, I’m fairly confident that Performance-PCs.com will assemble a custom cable of this type. I’d expect that it might cost around $20-50. See this item for starters and then contact them for the additional custom requirements.

I’ve found that if AVRdude can’t find the chip while it’s on the board, adding a little solder and swiping my iron across the pins a few times (like you do in the video) allows AVRdude to find it without having to fully remove the chip from the board.

I have a Qlite driver, in case i want to restore back the qlite firmware can the firmware from the Qlite driver be backed up?

Nope. But you can flash NLITE on it instead, which is almost identical.

It’s in my repo under DrJones, linked below.

Or you could use any of the various flavors of STAR, or … whatever you like.

ToyKeeper, I’m with you on command line and vim, I have a hard time thinking like IDE developers want me to. I do have one question though, how do you set the permissions so that you can burn without being root, or using sudo?

It’s probably best to use sudo, for security reasons… however, you can also set avrdude as suid so that anyone with execute permission will get temporary root while running it. This is a security risk though.

chmod u+s /usr/bin/avrdude