Zedomax DIY 103 Make a digital Stopwatch in 1 minute!

[DIY103]

Do it yourself !


Zedomax Stopwatch –Make a stopwatch in 1 minute!

http://www.zedomax.com/diy/103/diy103-3.jpg

Today I was trying to make the G-meter and was thinking that I needed a stopwatch. Well since I don’t carry watches and I didn’t want to buy a stopwatch, I figured I could just make one with some of the extra study board and seven segment displays I have laying around.

Parts List:

1 CB280 Start Kit $119
1 CSG-4M $54
Available at Comfile Technology

Make connections like shown below:

http://www.zedomax.com/diy/103/diy103-1.jpg

http://www.zedomax.com/diy/103/diy103-2.jpg

Simply download StopWatch.zip and use CublocStudio to download the program.

The first pushbutton is connected to P0 of the CB280 and second pushbutton is connected to P1 of the CB290.

Simple, the first pushbutton is used for starting and stopping the stopwatch.

The second pushbutton is used for resetting it to zero.

Now I am glad I have a stopwatch so I can have it around for future projects…

See video of Stopwatch in Action:

[gv data=”Ksz8U0beqqo”][/gv]

BASIC Source Code:

[stopwatch001.cul]

‘Simple StopWatch

Const Device = CB280

Dim Duration As Long

Dim Power As Byte

Power=0

Duration=0

‘Start & Stop button

Input 0

‘Reset Button

Input 1

Set I2c 9,8

Display 0,Dp(Duration,4,1)

On timer(10) Gosub timer_rtn

Do

Loop

timer_rtn:

If Power=1 Then

Incr Duration

Display 0, Dp(Duration,4,1)

End If

If In(0)=1 Then

Power=Power Xor 1

Elseif In(1)=1 Then

Duration=0

display 0,Dp(Duration,4,1)

End If

Return

End

Sub Display(dID As Byte, DStr As String)

Dim ct2 As Byte,ct As Byte

Debug “D: “,Dstr,Cr

ct2=0

For ct=0 To 3

If ct=2 Then

Csgnput dID,ct, DStr_a(ct) Or 0x80

Else

Csgnput dID,ct, DStr_a(ct) ‘And 0x80

End If

Next

End Sub


If you are having any trouble with above app, please e-mail max@zedomax.com

If you have any cool apps you’d like to share, please e-mail to max@zedomax.com

One Response to Zedomax DIY 103 Make a digital Stopwatch in 1 minute!

  1. Pingback: DIY - Make a Stopwatch in 1 minute! | zedomax.com - tech blog for emerging technologies...

Leave a Reply

Your email address will not be published.