Count down timer
Hi Folks,
Newby here. I am constructing a countdown timer (from 35) and need a little help interigating the program. I will later add buzzer at the end and interupt switches.
It is bits from the manual,
main: let b1=35
gosub clock
pause 1000
b1 = b1 - 1
goto main
clock: pulsout 1,10
if b1=0 then endclk
for b3 = 1 to b1
pulsout 0,10
next b3
endclk: return
The 7 segment will display '35' but when it pauses 1 second it goes back to 35! and what is b3 = 1 to b1 doing? b3 is just a label and it is saying 1 to 35 until it reaches that value then falls out?
Thanks for your help.
Hi Folks,
Newby here. I am constructing a countdown timer (from 35) and need a little help interigating the program. I will later add buzzer at the end and interupt switches.
It is bits from the manual,
main: let b1=35
gosub clock
pause 1000
b1 = b1 - 1
goto main
clock: pulsout 1,10
if b1=0 then endclk
for b3 = 1 to b1
pulsout 0,10
next b3
endclk: return
The 7 segment will display '35' but when it pauses 1 second it goes back to 35! and what is b3 = 1 to b1 doing? b3 is just a label and it is saying 1 to 35 until it reaches that value then falls out?
Thanks for your help.
Last edited: