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

After reading this thread, I managed to disassemble my D4 and flash Anduril successfully, but got in a hurry when attempting to flash my Q8 and used the wrong fuse vales :person_facepalming:

The only led that still works is the green button led, and the ATtiny 85 isn’t responding. Any ideas on the best and/or cheapest way to fix this?
From what I’ve read it seems like my only options are either building a high-voltage avr programmer (which I do not think I have the knowledge to do) or get a hold of a completely new Q8 driver…

New drivers are 10 bucks.

BLF Q8 Driver Chip Q8 Circuit Board
http://s.aliexpress.com/ZbyUBBBZ

Thanks! One’s on the way, $10 is quite a bit cheaper than I thought a q8 driver would be :+1:

OMG! I CONNECTED!!!
Cheaped out and bought the pre-wired clip from wherever, have never been able to connect.
Did all of the driver signing stuff with Win10, been at this for a while.
Finally desoldered the wires and did it myself and I just got the most beautiful response to avrdude -p t13 -c usbasp -n

There’s still a lot to be done, but I’m happy to be past that.
Thanks to all who’ve contributed!
Robert

:slight_smile: :beer:

can you post a picture of your usb setup?

thanks!

It won’t help much as it’s all covered in heat-shrink, but I’ll explain how I did it.
The one I ordered off ebay is black and has 8 grey wires coming out of it. I peeled back the heat shrink and de-soldered the wires.
I tinned the relevant pins and soldered the colored ribbon cable, matching the colors so there would be no confusion.
Attached the black clips to the USB adapter and it works.

I feel like a script kiddie, I just installed the pre-built Anduril on my D4 and am giddy with excitement!

If my description doesn’t help I’ll post a picture. And I finally broke down and used a USB extension cable as suggested. Little tip, big help. MUCH easier making sure the pins are exactly where they need to be.

ya, a picture of colors and wiring would be helpful. as well as the usb device and clip

and links to the parts…

thanks!

I just clicked on the links provided in the OP. Skip the clips with the cables attached and use the ribbon cable in the fasttech link instead.
It won’t let me copy/paste so just check the Required Hardware section in post #1, that’s what I did.
Of course this method requires some wait time, but there’s plenty to read before starting.
I took the easy way and used preconfigured hex files from toykeeper so I didn’t screw anything up.
I would post a link to that but my damned KVM is messing up and I can’t type on my other computer and I’m shutting my regular computers down now because it’s driving me crazy trying to type.
oh wait, here it is: Index of /torches/fsm

Well this is ugly but here it is:

Thanks!

Hoop, could you remove this part? It’s not necessary to erase the chip before flashing, and a couple people reported that erasing it made the chip stop responding entirely. I’d rather not advise people to do something which might brick their hardware.

It’s probably also worth noting somewhere that the t13 part will change depending on the hardware, and tiny85 is pretty popular lately. Tiny13 settings won’t work on tiny85 hardware, and they use totally different fuse values.

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: