Flashlight Firmware Repository

Do you use linux or Atmel studio to compile right now?

Flashing the hex file is easy, exactly the same as what you are doing now, just with a command line change to the 25 instead of the 13A and the associated fuses.

Compiling is a bit different due to the extremely tight space constraints.

I have a hex file for bistro tripledown in the Texas Avenger thread that is setup for a 19.1K R1 that you can try, just make sure you get the correct fuse settings and command, I can dig the one I use out if you need.

The weather is supposed to cool down this weekend, hopfully it won’t be 90f in the house with 80-90% humidity and I will be able to work on the drivers a bit more. Gonna calibrate one for a 22k R1.

The nice thing about bistro is that since it has so many user adjustable settings you don’t need to adjust much on a light by light basis. Simply select a different mode group.

I use Win w/ATMEL Studio 7. I copy all the header files (.h files) into the same folder where the main source code is - much easier to track and control, for me that is... I've built Bistro successfully. I believe I have it all working fin under 1 solution with 1 project. I could ZIP up the complete Studio 7 solution and post it on my google driver, with the proper AVRDude BAT files, if you want -- when I get home - @work now.

Interesting, when I tried to compile in Atmel 7 it just spit out errors. When I tried the exact same files in linuix it worked perfect. Never could figure out the issue so just stuck with linux, it was not worth the time to mess with atmel, I prefer Atom for messing with the code anyways.

BTW, I have not seen anyone on here mention it but it is possible to use Atmel studio to flash things with AVRdude without having to actually mess with avrdude directly.

Been using ATMEL since the beginning - never a problem, but of course I've worked with dozens of dev environments and compilers for years (ok - several decades), so I can usually find & fix compiler/linker related issues quickly.

If you still want to use/try ATMEL 7, just dnld one of my complete zips.

I use Atmel Studio 7 to compile, and avrdude to flash.

I just copy/paste the commands from a txt file, so if I need different ones for the 25 can somebody help with those.

Tom, that would be great. I am totally clueless on how to use the header and bat files.

I haven’t even looked at the code for bistro, I’m hoping it’s still easy to remove things. I like simplicity, but I just noticed LVP is nonfunctional on the modified version of blf-a6

But really step by step would be great. Like currently I do this:

  1. pull open c file in wordpad
  2. alter mode groups/turbo timer (by comparing to similar lights I have that had good levels)
  3. copy code to new project in Atmel7
  4. compile to hex
  5. copy command line to avrdude
  6. flash

Hey guys. I hate to barge in but I see your active conversation and I’m in a bind.

I am getting error message:
program enable: target doesn’t answer. 1
Initialization failed, rc=–1
Double check connections and try again, or use -F to override this check.

I’m trying to flash Bistro onto pds triple stack but I get the this error. I think it might be related to using a different attiny25 than I was using before, but I’m unsure. Any help?

This is the chip I am using:
AVR AVR® ATtiny Microcontroller IC 8-Bit 20MHz 2KB (1K x 16) FLASH 8-SOIC

ToyKeeper, a couple of questions about the Bistro-mini firmware.

  1. Do you have Bistro-mini project for AVR Studio?
  2. What a piece of code responsible for the brightness in the Moonlight and the low mode?
  3. Will LED glow in the Moonlight if we take the driver for 1050 & 1400 mA?
  4. I tried to open your C-file in AVR Studio but received entirely errors at compile time. In what program it is made?
    Thanks

I use avr studio and it works with her file. There are a number of other files that it needs to compile. Such as tkvoltage.h and others. To adjust moon mode change the value of the first entry for the 7135 in the ramping table

I change the first value in all columns to 0. Then I have an “off” mode for silent switch activation

Hhmm, that's not a real part#, I think?? It should say TINY25 or TINY25V right on the top of it - pretty sure. Those specs are correct though, for a 25.

You are checking for a 25 device though, not a 13A - guess so if you've done 25's before...

Is that the only new 25 you have? If you have more, try "air" clipping one and see if it works. If you have a grnd/short on any of the traces/connections connected to the MCU pins, it causes problems. I've done "air" clipping before, and it always works.

Serp - you need all the required header files to compile it. I didn't try yet, but not sure where they are all at in the repository.

TK works in unix/linux only, last I understood, so doesn't use ATMEL Studio.

Luddite question: if I don’t want to use the .h file, can I just add all the “defines” back into the main bistro .c ?

hmm. yesterday i reflowed three boards. one texas advenger and two triple stacks. i used one chip from the old batch and two from the new. All three give me the same error. this would make me think its the connections, but i tested two boards that i built last week with the same old chips and they all register fine. Man this stuff is confusion. ill start checking for solder bridges and stuff, but all three from yesterday? Maybe i used too hot of a reflow temperature and burned the chips. Also, i have one new chip left. i will dig that out and try the air clipping.

Of course! I thought bout that, actually, but I work/edit right in the Studio environment - works just like Microsoft Visual Studio, which I use every day @work, because it actually is Microsoft Visual Studio btw. So, I just add the header files to the project and they are very easy to work with inside the editing environment.

If you use my solution/project files as-is, that's what you would get.

oh ya. i am using the tiny25. Air clipping my last unprogramed chip gave me the same error. So i am getting the error on all unprogrammed chips and not on any that i have already programmed. i guess it has to be my programmer then. i will try and rewire it now.

Btw, where is bistro TripleDown? Didn’t see it in the bistro folder?

Tripledown
http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/tiny25/files/head:/ToyKeeper/bistro/

It’s under the tiny25 directory. Kind of confusing

It is confusing getting around in that repo, it is in the tiny25 section: http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/tiny25/files/head:/ToyKeeper/bistro/

EDIT: LR beat me to it.

LightRider, Tom E thanks. I will try to find the necessary files. But for me it is very unclear done this Page Flashlight Firmware Repository in Launchpad
Can I ask you to make an archive of the project for AVR Studio 4, or 5, or any other. With the right file … :frowning:

PS Is this what I need? http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/convoy/files/219/ToyKeeper

After everything… All I needed was a computer restart. As a longtime windows user I should have known better. :person_facepalming:

serp: I’m not very knowledgeable with this stuff so I cant give you a step by step. how far have you gotten. have you ever flashed custom firmware prior to this?

the bistro mini .c file should be ready to go as is except you need to alter the directory of the files called for in all of the “include” commands that use “example file”. the include commands that use < and > do not need to be addressed.

I’m not confident with this stuff but maybe it will help some?