simple, un-debugged pseudo code, written in five minutes. I'm assuming you
have two momentary switches for setting the clock, and can make it loop once
per second. No debounce here.

int hours, minutes, seconds
loop once per second:

    if (hour_button is depressed and minute_button is NOT depressed)
        hours = hours + 1
    end if
    if (minute_button is depressed and hour_button is NOT depressed)
        minutes = minutes + 1
    if (minute_button is depressed and hour_button is depressed)
        seconds = 0

    seconds = seconds + 1
    if (seconds > 59)
        seconds = 0
        minutes = minutes + 1
    end if
    if (minutes > 59)
        minutes = 0
        hours = hours + 1
    end if
    if (hours > 12)
        hours = 1
    end if
repeat loop

On Mon, Nov 15, 2010 at 8:48 AM, <[email protected]> wrote:

>  "from 12:00:01, to 12:00:01etc."   HUmm, typo or did I miss something.
>
> Since the clock will be easy, maybe just include a fast/slow button.
> fast button to make minutes go up by 10
> slow button to make minutes go up by 1
>
> That's probably the simplest way.  (Or just plug it in at noon).  :)
>
> Battery back up?
>
> Michail Wilson
> 206-920-6312
>
>  In a message dated 11/15/2010 8:34:01 A.M. Pacific Standard Time,
> [email protected] writes:
>
> all the hardware is ready for my first clock.  Really basic 6 tube,
> no alarm yet, no GPS, no bells and whistles.  If I turn it on, it will
> count just fine, from 12:00:01, to 12:00:01etc.  I want to be able to
> set this clock to a desired time, and let it go after I set it.  The
> coding has me baffled though.  I am using the gosub command to name
> the binary number groups ":one, two, three and so on"  and I was
> thinking of using an "if then" command to get the clock to cycle
> through numbers in the desired order, so it can be set.
> Any help appreciated.
> Shane
>
> --
> You received this message because you are subscribed to the Google Groups
> "neonixie-l" group.
> To post to this group, send an email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<neonixie-l%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/neonixie-l?hl=en-GB.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "neonixie-l" group.
> To post to this group, send an email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<neonixie-l%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/neonixie-l?hl=en-GB.
>

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To post to this group, send an email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/neonixie-l?hl=en-GB.

Reply via email to