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

Maybe it’s related to:

            // We don't care what the fast_presses value is as long as it's over 15
            fast_presses = (fast_presses+1) & 0x1f;

?
Remove that

& 0x1f

and try again.

You should have a line above that a little ways that looks something like this:

fast_presses = (fast_presses+1) & 0x1f;

What value is at the end? Is it 0x1f or something else? With 0x1f is should track fast_presses up to 31 or so.

Edit: it looks like Agro and I were typing at the same time! And yes, you could try his suggestion. Having something on the end there just makes sure it doesn’t overflow. But you’d have to do a lot of fast presses to worry about that.

Yes, there is 0x1f and removing that helped.

            // We don't care what the fast_presses value is as long as it's over 15
            fast_presses = (fast_presses+1) & 0x1f;

I noticed these lines and thought the maximum 14 clicks might have something to do with it and tried to change the value (don’t know what I was doing :smiley: ) but didn’t think to delete it.

Thanks guys!

Ohhh… changing that to just anything could most definitely have some strange effects. The thing with “0x1f” is that it’s 00011111 in binary, and since we’re doing a bitwise AND operator, it forces wrap-around to 0 once it hits 32. But choosing another value would cause some bad behavior. Say if you changed it to “0x20”, that’s 00100000 in binary. And basically you’d never get fast_presses to increment because bitwise AND on all of those 0’s is going to leave you with fast_presses = 0.

What exactly is the 40-pin Splittable Ribbon Cable required for? Seems that the chip has 8, but the clip only connects to 6. So why 40?

And speaking of the clip, the Pomona 5250 SOIC (SOIC8??) clip, it looks like a deal breaker. 80 to 100 CAD with shipping for the thing on Amazon, or eBay for it is insane.

I may have found other 8 pin clips, included with other programmers, but they are 20-40 $, trial and error could be as much as the Pomona 5250.

Why is it that there appears to be complete programmer/connector/clip solutions for other chips, but none I’ve found for the Attiny chips?

I’d pay a reasonable price if there were one, $35-40, but while I have yet to search AliExpress, so far, I cannot seem to find a single source at a non rapey price. Between the various propitiatory bits needed for radios, complex high powered motor controllers, crypto key loaders, and other stuff, I already have a ponderous collection of USB and serial programming cables, like some post-Dickens iteration of Jacob Marley. And I find it more than just a little irksome that there does not seem to be any commonality for firmware connectors.

How difficult could it be? The whole chip-clip-trip seems like a very inelegant solution. A nano DIN, with a no-go if misaligned pattern, preferably with solder ringed female board holes for the pins to connect with, perhaps 5mm in diameter would do nicely. Preferably one that locks in place, requiring pressure on the connector to release.

Thus endeth the rant. Now, off to Aliexpress land.

Not sure what you mean. I paid $5 total for the clip and the usbasp. I hope your connector rant is a joke. This board was not intended for modding and a suitable connector costs more than 10 of these boards and there’s no space left anyway.

I’m pretty sure the 40 pin cable is suggested because it’s an industry standard, very cheap and easy to find. If you run across a lesser number pin cable with all the same features then feel free to get it. No big deal.

These are the only 2 on Amazon.ca

https://www.amazon.ca/5250-Test-Contacts-Plated-Contacts-5250/dp/B088WZR12P/ref=sr_1_40?dchild=1&keywords=Pomona+5250+SOIC+clip&qid=1613733027&sr=8-40

https://www.amazon.ca/5250-Test-Contacts-Plated-Contacts-5250/dp/B07QZJMGV4/ref=sr_1_44?dchild=1&keywords=Pomona+5250+SOIC+clip&qid=1613733027&sr=8-44

And the least expensive one on eBay. Note shipping cost.

Edit. Overlooked this one. Looks like it was listed this AM. A bargain at only CDN$ 58.71

https://www.amazon.ca/Pomona-Testclip-SOIC8-5250/dp/B00HHH65T4/ref=pd_day0_1?pd_rd_w=6Z9lP&pf_rd_p=a0f07c06-3bfe-427e-9527-5be8cea27b66&pf_rd_r=BXPBB20B6AFDF1M4PWW5&pd_rd_r=08c22077-67cb-4ad0-8d08-62fa537c522a&pd_rd_wg=vUYty&pd_rd_i=B00HHH65T4&psc=1

In any case, I’d be happy to offer you a USD $20 profit if you’d let yours go. Do you accept PayPal?

Thanks for looking, I found that one too. If you look under shipping, does not ship to Canada. As far as Fasttech goes, before that is mentioned, my last 2 orders from Dec. went MIA, and I’m waiting for those to be resolved, before I make another.

Was not able to scour AliExpress yet, maybe there.

BTW, nice to see Rover being playful with No. 6. Huge fan here.

This chinese Pomona clones are very low quality. I have one of them from another chinese programmer and it is total crap. I also think to buy original one. Better if you want to reflash frequently SOIC chips like EEPROMs and MCUs. The cheaper solution is just to solder some cables on attiny pins and use cheap USBasp programmer. For one reflash and you have programmer already it doesn’t need to buy clip for just that. SOIC case is very easy to solder on it.

Try Digi-Key

I don’t trust these expensive Pomona clips. Sooner or later the tiny hooks will be gone and the clip has to be replaced. I used my $2.50 clip a lot and it still works good enough. No need to buy such an expensive clip for hobby use.

Of course you have to order from China to get a good price.

Thanks to all for the suggestions. I managed to find a Chinese seller on eBay, that ships to Canada, for less than $20 CAD. If all goes well, in 60 days, I’ll probably be back here asking more dumb questions.

In fact, I feel one bubbling up now. I noticed that International Outdoors sells a Noctigon specific programmer, but I cannot imagine that holding it against the pcb by hand is going to be a reliable way to program the driver. Its so tiny. So are the contacts.

What happens if contact is broken to a connection while flashing? Is it a non event, and simply requires trying again, or is there a real chance of bricking the driver?

As long as you don’t change the fuses chances of a locked MCU are pretty low and you can just try again. In the worst case you need a high voltage programmer to reset the fuses.

I recently received the reflashing kit from noctigon and I’m not entirely sure if the diagram on the latest USB asp is the same but I tried reflashing with that diagram in my new USB ASP and it kept giving me a check the chip couldn’t connect and although I’m using my own homemade Pogo pins it should still work I’m hoping someone might be able to help

This might help someone, thought I would post it up. Lost my USBASP kit and finish building a new one. The Adafruit cable plugs into the end of the gray cable that comes with most USBASP’s and is then plugged into the SOIC 8 clip.

USBASP light programming pinouts.

That cable is just what I was looking for so I wouldn’t have to look up the pinout every time I switch between hank’s programmer and the SOIC clip. Thank you for the diagram too.

Can someone remind me how to place the components to convert a 7135 driver to 6v for 2S. I think I still have the right parts, but I don’t recall where to put them or which direction to put the stripe on the diode. I have two kinds of the diode.

There is also a small resistor in the pack that I don’t remember where to put it or even why its needed. These are the two boards I would like to mod.


The parts I have


On a side note I also cant remember what values to change or what to change them to in order to get LVP correct in firmware for a 2 cell setup. Using a variant of star firmware like one of TKs starry off time for example.

Thanks gang.

Hi all,
I’m trying to flash a nanjg 105c to biscotti following the OP guide - but I’m stuck at the testing part.

using the command " avrdude -p t13 -c usbasp -n" returns these erros whether I use usbasp or usbasp-clone (I’m using a usbasp from china)

Screenshot 2024-03-07 150107
Screenshot 2024-03-07 145827
Screenshot 2024-03-07 150152

I think I’ve installed the usbasp correctly but avrdude still seems unable to find it. Any ideas? I’ve never done this programming thing before so would appreciate any help in troubleshooting.

Thanks

It might be necessary to run it with admin permissions, but I’ve never tried it under Windows.