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

Hi All,

Im currently flashing my fw3a firmware, I’m trying to understand the hex code for the low and high fuse output, this is what im seeing, how do I translate it to the command to write the firmware?

Does this mean my H is 0xFF and my L is 0xE2?

Assuming this is similar situation...

When I flashed Anduril over other firmwares, I never set the fuses. All flashes have worked.

a flash command I've used with 100% success:

avrdude -p attiny85 -c usbasp -Uflash:w:anduril.2018-12-22.blf-q8.hex:a

change name of flash hex file as needed...

Hope this helps!

successful flash text:

found the directory to put the hex…flashed:

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

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0×1e930b
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file “anduril.2018-08-22.EMISAR_D4S.hex”
avrdude: input file anduril.2018-08-22.EMISAR_D4S.hex auto detected as Intel Hex
avrdude: writing flash (8026 bytes):

Writing | ################################################## | 100% 5.73s

avrdude: 8026 bytes of flash written
avrdude: verifying flash memory against anduril.2018-08-22.EMISAR_D4S.hex:
avrdude: load data flash data from input file anduril.2018-08-22.EMISAR_D4S.hex:
avrdude: input file anduril.2018-08-22.EMISAR_D4S.hex auto detected as Intel Hex
avrdude: input file anduril.2018-08-22.EMISAR_D4S.hex contains 8026 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 4.37s

avrdude: verifying …
avrdude: 8026 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.

Yes, low is E2, high is FF and extended is DE.

But its safer and easier to not write new fuse bits when you flash new FW!

ahh okay, i wont set fuses then - seems like the beginning of the instructions states to pass over fuse info - thanks for the clarification!

Edit - that works :smiley:

Whats everyone using to view the hex files as code? I did a dump of the chip but not sure whats a good tool to convert it to human readble format (if thats even possible)

Not possible. You’d need some sort of uncompiler…

Bummer.

Why is that a bummer? The code on the flashlight is open source and available online… You’re trying to reverse engineer something that doesn’t need reversed.

Valid point.

I’m not sure, but I think avrdude might actually have a bug where it puts the labels in the wrong order in the “safemode” message. It looks like it swapped high and extended, and I’ve seen that happen a bunch of times before.

Yikes :slight_smile: toykeeper, where can I find the uncompiled code for the fw3a andruil hex you built? I’d like to play around with some values.

… click the Link in my signature?

Thanky danky.

What am I doing wrong?

C:\avrusb>avrdude -p t13 -c usbasp -u -Uflash:w:anduril.2019-01-05.blf-q8.hex:a
-Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m

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

Reading | ################################################## | 100% 0.03s

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

avrdude done. Thank you.

Double, triple check your pinout is correct both on the soic and usbasp. Also, make sure your chip
Is a t13. Most likely you know the chip, confirm your pins are correct.

Q8 Tiny 85?

Tiny85 is -p t85.

D'oh but this worked

avrdude -p attiny85 -c usbasp -Uflash:w:anduril.2019-01-05.blf-q8.hex:a

Thank you.

BLF Q8 with Anduril and Airpro DC7 LEDs 6500 and copper board

You can do t85 for short.