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

where is the Atmel Studio I can find it at the link in the first post!!!

http://www.microchip.com/mplab/avr-support/atmel-studio-7

wow thats a large download!!!

ok so web installer allows me to install 3 parts… which one is needed???

I installed the entire thing, but have only played around with it and not compiled any code. I cannot say what parts are necessary for flashlight purposes, though people only seem to ever talk about the “studio” part of it…

Have fun!

I’ve read hundreds of posts and finally successfully flashed. Here is a condensed version of the hardware and software you would need if running a Windows computer (I use Windows 10)…enjoy!

I had some trouble figuring out exactly what to buy, but I figured it out after reading all the posts for months. Just get those three things I linked below for hardware.

I bought this:

and these:

and this from ebay:

https://www.ebay.com/itm/Black-Programmer-Testing-Clip-SOP8-Pin-SOIC8-DIP8-IC-Test-Clamp-Ws/202393187504?ssPageName=STRK%3AMEBIDX%3AIT&\_trksid=p2057872.m2749.l2649

you have to bend the clip pins a bit, but works fine and it’s not 20$!

Picture from Dutcheee:

ya…cheaper from china…but not by much, and I prefer Amazon reliable quick ship. Not worth saving 3 or 4$ ordering from china and waiting a month.

Windows programs: (the first two are direct download links…when you click on them, a download will start…no malware or viruses…I use these myself)

uspasp driver: (direct download)

https://protostack.com.au/download/USBasp-win-driver-x86-x64-v3.0.7.zip

avrdude chip flashing program: (direct download)

https://cytranet.dl.sourceforge.net/project/winavr/WinAVR/20100110/WinAVR-20100110-install.exe

TK’s hex files library:

http://toykeeper.net/torches/fsm/

Please read the previous posts in this thread to learn how to wire the usbasp to the clip and how to use avrdude to flash the chips…I merely wanted to provide quick links to the three hardwares I used and the two softwares I needed.

Thanks to everyone for all the information in this thread and others!

Special holla to ToyKeeper for all of her coding magic and Hoop for all the more detailed info and links!

Hope the above info helps you start flashing UI’s…

Okay just skimmed through all of the posts. Most of it didnt stick. I have a Q8 that wants TK’s candle+lightning mode bad enough that i’m going to try. Ordered parts!

I tried a lot of things and don’t know what is wrong. I get this error message when I testing connection with this command:
avrdude -p t13 -c usbasp -n

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

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

avrdude done. Thank you.

My first thought is you have the chip name wrong. What light are you trying to flash?

Q8 and emisars have attiny85

avrdude -p attiny85 -c usbasp -n

After some googling, I think the “0x1e9108” signature indicates an ATtiny25. This page has a list of device signatures.

That means the programmer is detecting an ATtiny25, but you’re specifying an ATtiny13.

Does your driver indeed have an ATtiny25? If so, you’ll want to say:

If it’s tiny25, make sure to use fuse values which match tiny25 instead of tiny13. They are not the same, and bad fuse values can basically brick the MCU.

You’ll also need firmware compiled for tiny25, because the .hex files aren’t compatible from one to the other. Tiny25 code can be flashed on 45 and 85, because they’re the same family… but tiny13 and tiny25 are different families.

Thank you. It is a stock convoy C8 driver and I think I haven’t touched it so it should be tiny13. I will look at it tomorrow morning because now I’m at work. Maybe I mixed up my drivers and that answers everything.

I just did the same thing! guess i need to order another driver. for my next attempt is this the correct command?

avrdude -c usbasp -p t85 -u -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:BLFQ8.hex

The cheapest option is to just order a single new attiny85 and change it out on the existing driver.

Here are the flash commands I use for 25 and 85

ATTINY 25: avrdude -c usbasp -p t25 -u -U lfuse:w:0xd2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:Bistro-HD-Triple.hex

ATTINY 85: avrdude -c usbasp -p t85 -u -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:ProjectLunasolv3.hex

Thanks for another option. Id hate to replace the rest of the driver. Plus im only ok at soldering

FWIW, the repository’s bin/ directory has scripts to flash tiny13, tiny25, and tiny85. I recommend using those scripts instead of running avrdude directly, because the scripts are much less likely to brick anything.

still uncertain how to get from

https://code.launchpad.net/~toykeeper/flashlight-firmware/trunk

to

http://toykeeper.net/torches/fsm/

I’d suggest using the fsm branch instead of trunk, if you want the latest code. It’s newer but not as well-tested. Otherwise though, to build everything on a Linux computer, go into the ToyKeeper/spaghetti-monster/anduril/ directory and run the ./build-all.sh script.

On a Windows computer, it might be simplest to install an Ubuntu environment and do everything from there. It’s relatively complicated getting Atmel Studio configured.

I mean, people could also install a full Linux-based OS, but that usually doesn’t go so well. For new users, the process is typically something like this:

So for a new user it’s usually best to go with a more limited version in a container or VM, which is something Windows 10 supports now.

I ended up buying the driver because mouser and digikey was close to 10 dollars for shipping. But wish i saw this one sooner from aliexpress.

https://m.aliexpress.com/item/32213436059.html?pid=808_0000_0201&spm=a2g0n.search-amp.list.32213436059

Real cheap. Might still just to fix the old driver.

Help wanted.

I would like to burn the program into NANJG 105 8x7135 linear regulator driver.

I need only BECON mode 2sec on 2 sec of .
I can only find a programs that have a lots of programs but you have to switch it to mode, but I need only beacon mode.

It could be a code from DR Jones LUXDRV 0.22

Could someone make the change to activate only beacon mode? I can make the HEX file.

Thank you