At the moment just a simple 10 minute countdown timer (10.00)
push the button to start stop and reset.
will add more features later lol.
Have been playing with Diptrace my first schematic for Westy lol
although designing a pcb withit is a bit beyond me at the moment
will stick with veroboard lol
push the button to start stop and reset.
will add more features later lol.
Code:
' -- -- -- -- -- -- -- --
' B0-A | | | | | | | |
' B1-B
' B2-C | | | | | | | |
' B3-D -- -- -- -- -- -- -- -- MarkS
' B4-E | | | | | | | |
' B5-F
' B6-G | | | | | | | |
' B7-dp -- -- -- -- o -- -- -- --
'
'Display 1 2 3 4
'Common anode C.3 C.2 C.1 c.0
SETFREQ M16
eeprom 0,(192,249,164,176,153,146,130,248,128,144,255) 'Display (0,1,2,3,4,5,6,7,8,9,blank)
SYMBOL pushbutton = PINC.6
SYMBOL display1 = C.3
SYMBOL display2 = C.2
SYMBOL display3 = C.1
SYMBOL display4 = C.0
SYMBOL output1 = A.0
SYMBOL push = B9
SYMBOL mins = B10
SYMBOL secs = B11
SYMBOL number = B12
SYMBOL time = W7 'b14,b15
Main:
let dirsb = %11111111
let dirsc = %10111111
Zero: push=0
SETTIMER T1S_16
TIMER = 0
time = 600 ' time = 10.00 mins (600 secs)
Start:
mins=Time-timer/60
secs=Time-timer//60
Stop1:
number = 10 : IF mins < 10 THEN dig1 'Display1 Zero blanking
LET number = mins DIG 1
Dig1: READ number,pinsb : LOW display1 : PAUSE 1 : HIGH display1
IF mins < 1 THEN dig2 'Display2 Zero blanking
LET number = mins DIG 0
Dig2: READ number,pinsb : pinsb=pinsb-128 : LOW display2 : PAUSE 1 : HIGH display2
LET number = secs DIG 1
Dig3: READ number,pinsb : LOW display3 : PAUSE 1 : HIGH display3
LET number = secs DIG 0
Dig4: READ number,pinsb : LOW display4 : PAUSE 1 : HIGH display4
if pushbutton = 1 then selection
if mins=0 and secs=0 then zero 'once .00 is reached stops and resets to 10.00 mins
on push goto zero,start,stop1
Selection:
inc push :pause 1000
if pushbutton = 1 then selection
on push goto zero,start,stop1
if push > 2 then zero
although designing a pcb withit is a bit beyond me at the moment
will stick with veroboard lol
Attachments
-
190 KB Views: 380
Last edited: