SX Clock/alarm clock
I have started to work on·my clock·and hit a problem. I want to blank the first digit when the digit is not in use.
I have included my code with the post as well.
Thank you
ACE227
Post Edited (ACE227) : 10/9/2009 2:07:36 AM GMT
I have included my code with the post as well.
Thank you
ACE227
Post Edited (ACE227) : 10/9/2009 2:07:36 AM GMT

Comments
' Display timer in MM.SS (00.00 .. 59.59) format with solid DP SUB CLOCK_MMSS ' display mins & secs tmpB1 = mins / 10 ' get 10's digit tmpB2 = __REMAINDER ' save 1's digit READ SegMap + tmpB1, display(3) READ SegMap + tmpB2, display(2) display(2) = display(2) | DecPnt ' add DP to hr01 digit tmpB1 = secs / 10 tmpB2 = __REMAINDER READ SegMap + tmpB1, display(1) READ SegMap + tmpB2, display(0) [b]IF display(0) = %00111111 THEN ' if 1st digit is a 0 then blank display(0) = %00000000[b] ENDIF[/b][/b] HIGH LED PAUSE 500 LOW LED PAUSE 500 IF TmrEnable = TmrRun THEN GOTO Main ELSE ChangeSec ENDIF ENDSUB ' ------------------------------------------------------------------------- ' Display timer in HH.MM (00.00 .. 23.59) format with blinking DP CLOCK_HHMM: ' display hours & mins tmpB1 = hrs / 10 tmpB2 = __REMAINDER READ SegMap + tmpB1, display(3) READ SegMap + tmpB2, display(2) IF blink = Yes THEN display(2) = display(2) | DecPnt ' blink DP on hr01 digit ENDIF tmpB1 = mins / 10 tmpB2 = __REMAINDER READ SegMap + tmpB1, display(1) READ SegMap + tmpB2, display(0) [b] IF display(0) = %00111111 THEN ' if 1st digit is a 0 then blank display(0) = %00000000[/b] [b] ENDIF[/b] HIGH LED PAUSE 500 LOW LED PAUSE 500 IF TmrEnable = TmrRun THEN GOTO Main ELSE ChangeMin ENDIF ENDSUB▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
50 72 6F 6A 65 63 74 20 53 69 74 65
·
I got it to work on my circut board and I put in two leds. I want to blink one led once every second and the other led to blink once every ten seconds. Now I had the led for ever second to blink but the code would wait until it read through the code before continuing to the next step. I would like to know how to put in that bit of code and always run but not interupt the other coding.
Thanks for all the help.
ACE227
If you add a subject to your message, you'll be helping people who have your exact problem. Your solution can help them, but not if they can't find the posting.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
When all else fails.....procrastinate!