Re: [neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-22 Thread Nick
Thanks for that - looks OK - nicely laid out code - I spent 20-odd years 
doing low-level real-time C++ design & coding for exchanges and trading 
systems, so I like a bit of C++ !

I'll read through it over the next few days - appreciated...

Cheers

Nick

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/70feef6b-8d22-4602-8863-533ef39e12bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-22 Thread Ian Sparkes
here are the family jewels:

https://github.com/isparkes/ArdunixNix6/blob/master/ardunixFade9_6_digit/ardunixFade9_6_digit.ino

In particular line 2000 - 2137 is the main display loop, which does each of
the 6 digits in turn.
Line 2013-2136 is for each digit.
For fading (20138-2044) we set the digitOffTime which is where we control
the dimming (min digitOffTime is 100, max 999)
In lines 2092-2110 we detect if there has been a digit change between the
new value we are to show and the old one (2093)
If there is and we are not already in a fade, we set up the fade counter
with the initial value (2096)
If we are in a fade, we just continue (2101-2110) until we know it is time
to stop (2012-2105)

Now we have all the values set up to do a single impression

2116-2128 does the impression of a single digit, switching the value at the
appropriate point.

All clear? %-)



On 22 November 2016 at 12:01, Nick  wrote:

> Hi Ian - do you have a link to the repository?
>
> Thanks
>
> Nick (the UAE one)
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "neonixie-l" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/neonixie-l/bh7kymv2xQA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> neonixie-l+unsubscr...@googlegroups.com.
> To post to this group, send email to neonixie-l@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/
> msgid/neonixie-l/b2f2db98-1ccb-4f42-bf1a-3f8663323144%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/CAGgg%3DS0uxA%2BKFWkjR1%3DdeOB2uOenfvU9Q4yb-5XWPdBmr9RORA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-22 Thread Nick
Hi Ian - do you have a link to the repository?

Thanks

Nick (the UAE one)

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/b2f2db98-1ccb-4f42-bf1a-3f8663323144%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-22 Thread Ian Sparkes
Ohhh OK. It's the other one then.

Anyway, if you want to look at the code how the cross fading is done (I
might still add the fade profile like 3n says), it's on GitHub, and I'll
happily go over it with you, if it's not clear (which is probably isn't -
it's a bit involved).

On 22 November 2016 at 11:53, Nick  wrote:

> Hi - Not sure which clock that would be - you may well be right, but there
> two "Nick"s here, both British, both ex-pats too (one in the US of A, the
> other in the UAE)...
>
> Cheers Nick (the UAE one)
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "neonixie-l" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/neonixie-l/bh7kymv2xQA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> neonixie-l+unsubscr...@googlegroups.com.
> To post to this group, send email to neonixie-l@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/
> msgid/neonixie-l/d784c375-6b47-454b-95ef-a3f0bbea5b1f%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/CAGgg%3DS37i78JQoCvgWwHmLr%2Bqg1EDbJ91LfQ5OtJQpNE6Ys1TQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-22 Thread Nick
Hi - Not sure which clock that would be - you may well be right, but there 
two "Nick"s here, both British, both ex-pats too (one in the US of A, the 
other in the UAE)...

Cheers Nick (the UAE one)

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/d784c375-6b47-454b-95ef-a3f0bbea5b1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-21 Thread Ian Sparkes
That's a really nice idea. I do something like this with LED brightness for 
the backlights, but didn't think of it for tube brightness.

On Monday, 21 November 2016 10:19:43 UTC+1, threeneurons wrote:
>
>
>
> On Sunday, November 13, 2016 at 6:10:49 AM UTC-8, Nick wrote:
>>
>> Just wondering what people's favorite smooth cross-fading algorithms
>>
>>
> On my current multiplexed clock kits, I've been using an exponential decay 
> and complementary rise:
>
>
> 
>
> Completed over a half second period. The duty cycle for the "old" and 
> "new" values are stored in a look-up table, that was calculated on a 
> spreadsheet. Blanking (dark) period is greatest in the middle, so the total 
> light does dip in transition.
>
>
> Seems to work okay in 1 of 6 multiplexing, with an AVR chip at 8MHz.
>   
>

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/81f0bbd7-046f-4738-bef4-7f88ecfd89da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-21 Thread 'threeneurons' via neonixie-l




On Sunday, November 13, 2016 at 6:10:49 AM UTC-8, Nick wrote:
>
> Just wondering what people's favorite smooth cross-fading algorithms
>
>
On my current multiplexed clock kits, I've been using an exponential decay 
and complementary rise:



Completed over a half second period. The duty cycle for the "old" and "new" 
values are stored in a look-up table, that was calculated on a spreadsheet. 
Blanking (dark) period is greatest in the middle, so the total light does 
dip in transition.


Seems to work okay in 1 of 6 multiplexing, with an AVR chip at 8MHz.
  

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/d313e376-bcaf-4092-b2ba-6a2695cee104%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-19 Thread Ian Sparkes
Of course that is "minimum digit on time of 100 and a maximum digit on time 
of 999". Doh! Fat fingers and early morning make many typo...

On Sunday, 20 November 2016 08:38:00 UTC+1, Ian Sparkes wrote:
>
> Hi Nick
>
> controllers nowadays are easily fast enough to do very smooth fading even 
> when dimmed. I do 6 iterations (one for each digit) of 1000 counts (for 
> dimming and fading of each digit) with a minimum digit on time of 1000 and 
> a maximum digit on time of 999. I calculate the switch from old to new 
> digit based on the percentage of the fade that is done and the dim factor. 
> This gives smooth dimming when fully on, or fully dimmed, or anywhere in 
> between.
>
> There's still easily enough time to do all the other work that's needed 
> outside the loop.
>
> You have one of my early clocks modules don't you? I should arrange a 
> firmware update for you, the hardware is largely the same, but the firmware 
> has come on leaps and bounds.
>
> Ian
>
>
> On Sunday, 13 November 2016 15:10:49 UTC+1, Nick wrote:
>>
>> Just wondering what people's favorite smooth cross-fading algorithms 
>> were, assuming that they're prepared to share !
>>
>> I tend to PWM down one digit and PWM up the next over a short interval, 
>> but others will have their own methods...
>>
>> Nick
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/479bc4d8-a087-48da-ab85-20f9cac7df6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[neonixie-l] Re: Favorite cross-fading algorithms...

2016-11-19 Thread Ian Sparkes
Hi Nick

controllers nowadays are easily fast enough to do very smooth fading even 
when dimmed. I do 6 iterations (one for each digit) of 1000 counts (for 
dimming and fading of each digit) with a minimum digit on time of 1000 and 
a maximum digit on time of 999. I calculate the switch from old to new 
digit based on the percentage of the fade that is done and the dim factor. 
This gives smooth dimming when fully on, or fully dimmed, or anywhere in 
between.

There's still easily enough time to do all the other work that's needed 
outside the loop.

You have one of my early clocks modules don't you? I should arrange a 
firmware update for you, the hardware is largely the same, but the firmware 
has come on leaps and bounds.

Ian


On Sunday, 13 November 2016 15:10:49 UTC+1, Nick wrote:
>
> Just wondering what people's favorite smooth cross-fading algorithms were, 
> assuming that they're prepared to share !
>
> I tend to PWM down one digit and PWM up the next over a short interval, 
> but others will have their own methods...
>
> Nick
>

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neonixie-l+unsubscr...@googlegroups.com.
To post to this group, send an email to neonixie-l@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/bade9261-5d26-4a99-9ef1-619f809c9d8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.