STAR Firmware by JonnyC - Source Code and Explanation

1335 posts / 0 new
Last post
WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

No idea..I don't go there

JonnyC
JonnyC's picture
Offline
Last seen: 1 year 1 month ago
Joined: 01/14/2011 - 19:12
Posts: 1145
Location: Green Bay, WI - USA

Microa wrote:
JohnnyC - There are so many thread that I forget which one I have read " the capacitance change because of the temperature may affect the off-time memory" and there is a link to MLCC of Y5V. I hope you have purchased the 1uF and the 2.2uF are X5R or X7R which capacitance are more stable at high temperature.

To be honest I had no clue what I was looking at when ordering the capacitors, but I did get X7R ones because they had the greatest operating temperature range.  This is one of the ones I purchased - http://www.digikey.com/product-detail/en/CL21B105KBFNNNE/1276-1029-1-ND/3889115.

JW980
Offline
Last seen: 1 year 5 months ago
Joined: 01/12/2014 - 11:15
Posts: 45

For anyone interested, my modified version of the Star1.1.c program (see “JBW-” comments) and corresponding hex file have been posted here:

https://www.dropbox.com/sh/yjq5ahllbuqf1zh/yoJRh8nJPT/STAR/JW980.build

Thanks to WarHawk-AVG for posting it for me so others can see what was done Smile

-JW

Tom E
Tom E's picture
Offline
Last seen: 1 hour 7 min ago
Joined: 08/19/2012 - 08:23
Posts: 12427
Location: LI NY

Anyone given thought to modifying the e-switch version to do something with a tail power switch? I'm thinking tactical style switch, where power ON comes up in high. With the tail switch off, it's a simple "lock-out". With this no-memory style of mode changing, I don't think mode memory has to be added just for the tail switch - any thoughts?

I got the Yezl Y3 and Convoy L4 I need to do something nice with.

RMM
RMM's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

I know that JonnyC was working on something like this back in December...not sure what happened with it.  I probably discouraged him (as did the limited memory space). Foot in Mouth

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

JonnyC
JonnyC's picture
Offline
Last seen: 1 year 1 month ago
Joined: 01/14/2011 - 19:12
Posts: 1145
Location: Green Bay, WI - USA

Tom - you mean lights that have a power switch (rear clicky) and an e-switch?  I was building a program for these a while back and thought it was almost done.  Basically, the power switch just turned it on to the last mode every time.  When you wanted to change modes or ramp you would use the e-switch.  I just need to add memory to the momentary program then.  Your idea seems interesting though.

Oh, and as for ramping, my original plan was to make the momentary/e-switch program so that it would allow a press-and-hold to ramp, along with all of the other features.  I got it working but ran out of room for voltage ramp down, then saw what DrJones was able to do with one of his programs (pretty much everything you could imagine) and gave up in frustration and defeat.  Then RMM told me about the UI Werner came up with so I scrapped the ramping for now.

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

JonnyC wrote:

Tom - you mean lights that have a power switch (rear clicky) and an e-switch?  I was building a program for these a while back and thought it was almost done.  Basically, the power switch just turned it on to the last mode every time.  When you wanted to change modes or ramp you would use the e-switch.  I just need to add memory to the momentary program then.  Your idea seems interesting though.

Oh, and as for ramping, my original plan was to make the momentary/e-switch program so that it would allow a press-and-hold to ramp, along with all of the other features.  I got it working but ran out of room for voltage ramp down, then saw what DrJones was able to do with one of his programs (pretty much everything you could imagine) and gave up in frustration and defeat.  Then RMM told me about the UI Werner came up with so I scrapped the ramping for now.

That was because he used a ATtiny58 with 8K flash rather than a ATtiny13A with 1K flash.   Which is also the same size as Tido's MCU but is a different critter all together, it doesn't use a Amtel MCU, it uses a Zilog Z8F082A MCU

I must say a hybrid type driver would be cool as heck though!

JonnyC
JonnyC's picture
Offline
Last seen: 1 year 1 month ago
Joined: 01/14/2011 - 19:12
Posts: 1145
Location: Green Bay, WI - USA

WarHawk-AVG wrote:

That was because he used a ATtiny58 with 8K flash rather than a ATtiny13A with 1K flash.   Which is also the same size as Tido's MCU but is a different critter all together, it doesn't use a Amtel MCU, it uses a Zilog Z8F082A MCU

I was actually referring to DrJones' lumodrv which uses the stock 105C.  I'm amazed what all he can fit within 1K.

comfychair
comfychair's picture
Offline
Last seen: 3 years 8 months ago
Joined: 01/12/2013 - 05:39
Posts: 6198

The other UI I really really like is from the LD-36 (I think it's been changed in recent versions, the ones currently being shipped are different). It's really simple. Short press turns on/off, long press for ramping. Each long press alternates direction. And, even if you keep the button held down, it stops when it reaches min/max (the ones that keep going up-down-up-down forever are a P.I.T.A.). If you go up too far, just release and long press again and it goes down.

JonnyC
JonnyC's picture
Offline
Last seen: 1 year 1 month ago
Joined: 01/14/2011 - 19:12
Posts: 1145
Location: Green Bay, WI - USA

Yup, that's exactly how I have the ramping working in my old program that I used in the UF T20 and T50.  Basically it also has off-time memory, so if you turn off and back on right away, it will jump to the next preset mode, but you can still hold to ramp.  Maybe I should get that program updated and shared as well.

Microa
Offline
Last seen: 1 week 1 day ago
Joined: 06/29/2011 - 21:20
Posts: 236

Your program guys are great. I shall have a lot fun to play with.

Tom E
Tom E's picture
Offline
Last seen: 1 hour 7 min ago
Joined: 08/19/2012 - 08:23
Posts: 12427
Location: LI NY

Jonny - Even the doc has his limits. He had to sacrifice features too in some versions. Would be really nice to have more memory, like the Tiny25 or Tiny85. Tivo532 (not the infamous Tido) has the driver based on the Z8, but that particular part has only 500 pieces remaining at DigiKey for qty 1 purchasing. After that, it's by qty 500 or so. Haven't seen it stocked anywhere else so far, so that has me concerned, but maybe there's a replacements or other sources...

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town
Tom E wrote:

Jonny - Even the doc has his limits. He had to sacrifice features too in some versions. Would be really nice to have more memory, like the Tiny25 or Tiny85. Tivo532 (not the infamous Tido) has the driver based on the Z8, but that particular part has only 500 pieces remaining at DigiKey for qty 1 purchasing. After that, it's by qty 500 or so. Haven't seen it stocked anywhere else so far, so that has me concerned, but maybe there's a replacements or other sources...

ARRGH you're right...I get Tivo and Tido mixed up... and if you order thru DigiKey...if you order larger multiples (with qty 1) the price drops considerably per unit You probably already knew that though
WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town
JonnyC wrote:

Yup, that's exactly how I have the ramping working in my old program that I used in the UF T20 and T50.  Basically it also has off-time memory, so if you turn off and back on right away, it will jump to the next preset mode, but you can still hold to ramp.  Maybe I should get that program updated and shared as well.

Yes please! Big Smile
JonnyC
JonnyC's picture
Offline
Last seen: 1 year 1 month ago
Joined: 01/14/2011 - 19:12
Posts: 1145
Location: Green Bay, WI - USA

So I'm utilizing Git for another side project and finally might be slightly starting to somewhat understand it Smile  I think we should create a GitHub repository for all AVR programs where we can all contribute to the programs and it can be a one-stop shop for anyone looking to find a customized program that meets their needs.  Of course getting one up and running is a different matter.  If I ever get time in the future I can create the repository and start organizing/categorizing all of the different programs that have been created.

Tom E
Tom E's picture
Offline
Last seen: 1 hour 7 min ago
Joined: 08/19/2012 - 08:23
Posts: 12427
Location: LI NY

We are using GIT at work now, but strictly internal of course, but I'm somewhat familiar, still not comfortable with it. We use TortoiseGit as the UI.

JonnyC
JonnyC's picture
Offline
Last seen: 1 year 1 month ago
Joined: 01/14/2011 - 19:12
Posts: 1145
Location: Green Bay, WI - USA

Tom E wrote:

We are using GIT at work now, but strictly internal of course, but I'm somewhat familiar, still not comfortable with it. We use TortoiseGit as the UI.

Nice.  I tried TortoiseGit, but it was still too confusing.  Just started using SourceTree and it makes Git bearable.  I still miss my SVN "synchronize" feature so I can see all incoming changes.  The whole fetch/pull process frustrates me.

reliant_turbo
Offline
Last seen: 4 months 1 week ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY

question on the -os command when using avr studio 5.1. where is this setting? obviously using the gui interface of avr studio, im not using a command line interface where i can just type in -os.

i ask because my compiled code hex looks larger than the 1k space of a attiny13a.

thanks

Brian

Tom E
Tom E's picture
Offline
Last seen: 1 hour 7 min ago
Joined: 08/19/2012 - 08:23
Posts: 12427
Location: LI NY

Brian - by looks large, what do you mean exactly?

JonnyC
JonnyC's picture
Offline
Last seen: 1 year 1 month ago
Joined: 01/14/2011 - 19:12
Posts: 1145
Location: Green Bay, WI - USA

reliant_turbo wrote:
question on the -os command when using avr studio 5.1. where is this setting? obviously using the gui interface of avr studio, im not using a command line interface where i can just type in -os. i ask because my compiled code hex looks larger than the 1k space of a attiny13a. thanks Brian

Go to Project -> Properties, then click on Toolchain and select Optimization under AVR/GNU C Compiler, select -Os.

reliant_turbo
Offline
Last seen: 4 months 1 week ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY
Tom E wrote:

Brian – by looks large, what do you mean exactly?

1.8k file size

reliant_turbo
Offline
Last seen: 4 months 1 week ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY
JonnyC wrote:

reliant_turbo wrote:
question on the -os command when using avr studio 5.1. where is this setting? obviously using the gui interface of avr studio, im not using a command line interface where i can just type in -os. i ask because my compiled code hex looks larger than the 1k space of a attiny13a. thanks Brian

Go to Project -> Properties, then click on Toolchain and select Optimization under AVR/GNU C Compiler, select -Os.

thank you

RMM
RMM's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Yeah, if you don't set the compiler to -Os it comes out way too large.  

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

reliant_turbo
Offline
Last seen: 4 months 1 week ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY
RMM wrote:

Yeah, if you don’t set the compiler to -Os it comes out way too large.  

even set to -os it is still too large. it was 777bytes (base 16) and now its 752 bytes (base 16) which is still 1.8k.

ill start over and build with -os on rather than just rebuilding the existing project.

Brian

RMM
RMM's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Huh.  Did you add a lot of stuff to it? It should build just fine, even with a few extra modes added in.  This is what it should look like:
 

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

reliant_turbo
Offline
Last seen: 4 months 1 week ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY

yup those are my settings. 1.83kb file size

reliant_turbo
Offline
Last seen: 4 months 1 week ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY

i added nothing. pasted it into the editor, changed the settings, saved (to make sure the settings would take effect and then built.

Brian

RMM
RMM's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Hmmm.  Are you sure you're selecting the AVR/GNU C Compiler and not the AVR/GNU C Linker?  Did you delete the initial information that is in the file when you start a new project?   

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

reliant_turbo
Offline
Last seen: 4 months 1 week ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY

yes and yes

RMM
RMM's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Not sure what's going on then, it should work.  Did you create a C executable project for the ATTiny13A?  I've never had a compile issue with these settings and I'm also using 5.1. 

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

Pages