Bill, not unlike this one here, then!  :)   (my own design, of some five 
years back)

http://www.youtube.com/watch?v=WgFVbnZrwYg 

I used a lookup table which the software consults at regular time 
intervals, once per display multiplex cycle, which was about every 6mS from 
memory. The table had about 170 entries in it for the full second. Once the 
table is done, there is no math in the software routine. It just looks up 
the value, and displays it.

Incidently, you may find (as did I) that a "swing" of greater than about 60 
degrees just doesn't "look" right. As you'll see, while I was at it, I made 
several other effects available to the user, all through lookup tables (no 
space efficient, but easier)

Here is a simple sine wave spreadsheet. I've done it for steps of 5 
degrees. You can change the number of LEDS in the "swing" in the yellow box 
- enjoy.

Laurence 



On Saturday, 22 February 2014 15:31:04 UTC, Bill v wrote:
>
> Hello,
>
>  
>
> I have built a clock controlled by a PIC with 6 numitrons in the centre. 
> Around them is a circle of 60LEDs which are programmed to display a number 
> of different patterns. I am currently working on a pendulum pattern which 
> uses the lower 30 LEDs. I have the software done, the challenge is this:
>
>  
>
> A pendulum has a period and an angular velocity that changes from 0 at the 
> ends, and maximum in the center, following an equation. In the software I 
> currently have 36 time slices (program steps, 0 to 35) in a half period of 
> 107 clock cycles, for a total of 3852 cycles for one swing (left or right). 
>
>  
>
> Looking at one swing, my challenge now is to divide the 36 program steps 
> of 107 clock cycles such that the total number of clock cycles remains 
> 3852, but the actual number of clock cycles per step are divided such as to 
> approximate the equation of one pendulum swing  (left or right). 
>
>  
>
> Anyone willing to take a stab at this?
>
>  
>
> Bill van Dijk
>

-- 
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 [email protected].
To post to this group, send an email to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/3e2253a3-117e-4157-83fb-5fcccc6c1935%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Attachment: SINE table.xls
Description: MS-Excel spreadsheet

Reply via email to