New to AVR/Atmel

I don’t know why, but it looks like the compiler is not able to find the two .h files (the ones in the two “include”s) near the top (the util/delay.h and the avr/io.h).

Yeah, thats the way I read it too… but where do you get those files….? In comfychairs tutorial, he says if it compiled without errors, go get the hex file… Not for me obviously. .

Ok, I think I got it…

You have to go to C/C NOT Assembler

Then AVRGCC C Executable project (highlighted in gray above)

Then Pull down tinyAVR, 8-BIT and select ATtiny13A

Erase this stuff and Paste in the *.C file from TK’s Firmware Repository (or wherever)

Then Build pull down and click Build on your project name (fourth down)

After build is successful, then to back to the Build pull down and select Compile.

The .Hex file will be in the debugging folder in the project you named your driver… Easy Peasy… NOT without code experience… I have now spoken martian, but do not know what I have said…

I don’t compile or go hunting in folders. After you build it, your hex file will be on the right side of the window under “output… Something”. Then i just “save as” from there to whatever folder I flash from.

There are quite a few of us that have no prior coding experience, I just learn what need to now as I go.

Oops! Sorry, I forgot about having done that and should’ve remembered. Glad you got it working though :)!

Which other lights have people found that also use the Atmel Attiny13A or other MCU that we COULD write software/firmware for, other than then ones with NANJG 7135 drivers?

I guess the new BLF-A6 is one other one, with TK’s firmware, right?

Are there any others, like some production ones that we could mod with just a firmware change?

Also, similar question: Which firmware works with the so-called “NANJG-92”, i.e, a NANJG 7135 driver that has had the 7135s replaced with a FET like in:

Thanks,
Jim

Which SOIC clip id everyone wind up going with? The cheaper ones or the $18-20 one?

Hi,

I got both a Pomona 5250 (which came with 8 jumpers):

and also a cheaper one from Amazon:

but that one didn’t come with jumpers, so I also needed to get jumpers:

http://www.amazon.com/gp/product/B00D7SCT6A

I have both of them working with ATTINY13A MCUs already soldered on NANJG drivers.

First, my comments the cheaper one:

- The pins to connect to the jumpers are spaced on .100 inch (?) spacing - too close for the jumpers to plug in, so I had to strip one end off of each jumper wire and solder on with heatshrink covering. I only had to do that on the 4 pins on one side/leg of the connector. Only 2 pins need to be jumpered on other side/leg of the clip (RST and GND, I think) so I could just plug the jumper wires in on those 2 pins.

- Works fine with ATTINY13A already soldered on NANJG drivers.

Comments on the Pomona one:

- The pins to connect to the jumpers are spaced on .200 inshc spacing, so I could just plug in the jumper wires to connect to the USBASP programmer, without having to solder wires.

- The “head” part that clips onto chips looks like it’s physically “wider”, but it seems to work fine with ATTINY13A already soldered on NANJG drivers.

Ha, now I can help…. All the flashing I have been doing is on NANJG’s that I have removed the 7135s from and put a FET on… Per the thread above, so this works for them as well…

I have used both MiniDrv and TK’s S7 hex files on the FET modded driver now.

I used THIS FET from RMM’s shop. I was trying to load DrJones MiniDrv and lower the low modes in my S2+ triple. It seems with the regulated (7135 chips) boards, they do not work below a certain PWM level (5 or so), but on a FET modded driver with a triple, this is a pretty bright “moon” level. I now have it on 1 for moon, and it is about 1-2 lumen, so I am happy.

Now to figure out ToyKeepers wonderful code for the s7 and brass-edc and how to butcher it to my liking… I knew there was something wrong in my posts above as I could not build either DrJones or ToyKeepers firmware…

I went with THIS clip, but the leads are soldered on, so I had some work to do when I got it. It has been doing fine, seems to hold well…

I got THIS programmer, but it is a SIX pin, so I had some pin out and fun to figure it all out. I did have a first time go when all the soldering was done and of course, no shrinkwrap as I thought I may have wired it wrong…

The Pomona clip seems to have the best feedback.
I am happy with it, but did not try the cheap or expensive 3M ones.

Digikey has them for $13. Shipping is not free, but fast, and possibly not expensive if you are in the US.
For me it is $8 a pop for orders under $200.
Good opportunity also to get some spare resistors, capacitors and FETs.

http://www.digikey.com/product-detail/en/5250/501-1311-ND/745102

I wonder if the following two clips are good to go:

Signstek SOIC8 SOP8 Flash Chip IC Test Clips - Amazon
or
Qunqi Soic8 Sop8 Flash Chip Ic Test Clips - Amazon

Amazon because I get free Prime shipping and they’re pretty reliable.

I already bought the recommended programmer from Fasttech that’s listed on Toykeeper’s firmware repository site:
https://www.fasttech.com/p/1002900

I got the 40-wire ribbon/jumper cable too, but it looks like I might not need it if that clip can plug directly into the programmer’s 8-pin socket.

Hi,

Pls post whether or not either of those work directly with the programmer as-is!!

Thanks,
Jim

Hi,

So I wanted to test minidrv with a NANJG that had been converted to FET.

I did a very careful job, testing the NANJG and then pulling the 7135s off, and adding the FET. Very nice job.

So, then I go to burn the minidrv firmware and….

AARGH! When the FET is in place, the SOIC clip doesn’t have enough room to fit on the MCU!!!

So, I have to desolder the FET (careful, it’s easy to rip the pad off completely).

Now I burn the minidrv, and will resolder the FET and hopefully the driver is still working, but now with the minidrv firmware :)!!

Hi,

I just got my first FET+minidrv done, and it’s working. I thought I had a really low mode set, but just realized that I have:

So my lowest low with the FET is kind of bright. Darn! I’d have to take the light apart and desolder the FET (see earlier post) to re-burn…. I’ll have to think about that tonight…

BTW, the above mode settings work very nicely for 8x7135 NANJG, with a nice really moonlight.

What FET are you using? I am using the one I listed above, and it is tiny enough for me to get my SOIC clip on to the ATtiny13A with everything in place… I did not think about if the FET was bigger, I apologize.

The only thing different on the FET drivers (Besides DIRECT drive) is that they are capable of using “1” for PWM values, the 7135’s do not go below about 5 PWM from what I have read. Let us know how this turns out, and if you want a ton of modes, try ToyKeeper’s S7 firmware…

EDIT: just saw your post above, my values for my Triple are [1, 13, 80, 255] and give me a 2-3ma moon, about 10ma low, about 700ma mid and around 6AMPS on high…. The 18350’s have no life on the higher modes so my three low are about 300 hours, 70 hours, 1 hour and 6 MINUTES on high…

Sorry. I meant to mention the FET I’m using. It’s an AOD510.

I don’t think it’s “large” but I’m doing this on 8x7135 NANJG board (not an AK-47), and I do it the way I think comfy did it originally, with the ground tab exposed, i.e., the chip is soldered “upside down”.

The FET Gate pin is soldered to the Vdd pad on the 7135 position on the other edge of the board and the FET source(?) pin goes to the ground ring, or actually I solder it to the empty ground tab pad of one of the 7135s that I removed.

I don’t like grinding the FET, so I kind of angle the FET a bit to avoid the corner of the FET going too close to the edge, which may be why the SOIC clip doesn’t fit (although even if I didn’t do that, it looks like it’d be pretty tight).

I built MiniDrv with 5 modes, always like to have ML as an option. It worked very well, the software chain was not to bad but the AVRStudio is not intuitive unless you are a programmer.

I really wanted to get Star from johnnyC working, but when I tried to download it to the cpu AVRDude kept insisting it was an Intel hex file and would not load it on the driver.

I really wish that guppydrv was an open source firmware, I really do like it.

BTW, the driver I flashed is a 105c with 8*7135’s and is driving a Nichia 219C in a P60 dropin!

Matt

Hi,

For the record, here’s what I ended up with for the minidrv PWM array, with an AOD510 FET:

The “1” gives a somewhat bright (but viewable by eye) moonlight. I think the “5” and “8” give almost the same output visibly, but I’m leaving that as-is for now.

When I re-soldered the AOD510 FET this time, I soldered to different 7135 pad positions this time, and ground the corner off of the FET, so now I can re-program the MCU without de-soldering the driver.

NICE!

I am sticking with MiniDrv for now, but working on TK’s s7 firmware to see if I can get what I want…

I agree with your comment on AVRStudio, not intuitive if you do not know programming…

I have to say, guppydrv would be great as open source, I really like it as well, covers about any base you need…

Perhaps someone with great coding skills could come up with a way to build a code for the ATtiny13A’s that allow you to just bring in “code modules” for different modes other than the normal levels. This way you could copy and paste a beacon, or a bike flasher, battery check or whatever other blocs people want… Could be interesting, but way above my level…

Yeah, it seems the FET +1 7135 is there for a good reason. The “1” level on the FET Triple is ok for a moon, but mainly due to the floody nature of the triples…

I think if you look into ToyKeepers A6 firmware, you will see the levels she selected for the A6 and figure out proportionally what levels you want, just remember to keep them far enough apart to make a visual difference.
I just went with some of the Fibonacci numbers of 1, 13, 89, and then instead of 233, just 255 for max… I adjusted the numbers after that for the ma numbers I wanted to make it easy to get approximate runtimes.

Glad you got the FET down to where you can reprogram, I think I got lucky putting mine on the first time, and then after that I paid attention to where they were going.

I hope you don’t mind borrowing the topic for a moment -

I just tried to use Avrdude to test the chip on my bike light, one of those single XM-L powered with 2s2p pack
(like this one: www.ebay.com/itm/Waterproof-Super-Bright-600LM-XM-L-T6-LED-Bicycle-Light-Headlamp-Rubber-Ring/271971054442 )

Libusb installed, Avrdude can see programmer,
and with -F reports:

avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=–1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x460075
avrdude: Expected signature for ATtiny13 is 1E 90 07

I cannot see such signature in avrdude.conf- any idea what chip might it be? (name is erased)
Can I do anything with it?

(I have two such light, with small internal differences, but I’d like to at least flash of them with firmware of another one)