Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:16 13 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : School Clock Project

Author Message
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 07:22pm 18 Jul 2019
Copy link to clipboard 
Print this post

Hi

I thought I would share this little project.
Some kids from the local school wanted a tech project for school and a Binary clock seemed a goods fit. This was a great introduction to MMBasic as they have been learning PicAxe Basic at school the transition was not hard.
The kids built their own clocks (Soldering etc..) so the finished item is one that they made themselves .

Thanks to Grogster for the PCB design and to Westie42 for the PCB manufacturing.
The attached file has the necessary files and a link to the clear case from Element14
Needless to say we have some pretty proud school kids :) and hopefully some more MMBasic users.

2019-07-19_051507_BinClock.zip




Regards
Jman

 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 2006
Posted: 09:57pm 18 Jul 2019
Copy link to clipboard 
Print this post

Great school project, just one thing, in the code
Sub DisplayTime
'Hours
Port(2, 4) = Hour(1) 'Set the Column on
Pin(21)=1 'Turn on Hours Tens
Delay
Pin(21)=0 'Turn off Hours Tens

what does the line 'DELAY'do I can't find it in the manual ?
Does the user insert a pause.Edited by palcal 2019-07-20
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 10:00pm 18 Jul 2019
Copy link to clipboard 
Print this post

Excellent project.

Congratulations to the kids (and you).

Geoff
Geoff Graham - http://geoffg.net
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 2006
Posted: 10:01pm 18 Jul 2019
Copy link to clipboard 
Print this post

Well stupid me I should have read all the code before I butted in.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 11:57pm 18 Jul 2019
Copy link to clipboard 
Print this post

hi jman

  jman said   Hi

I thought I would share this little project.




good idea for kids, and good job
just a note for a variant of your program, it's the idea of using a table for the time datas which would allow to use a loop for the display


'Dim Hour(2), Minute(2), Second(2)
'replace by
dim vtime(6) as integer

...

Sub DisplayTime
local i%,j%
j%=21
for i%=1 to 6
Port(2, 4) = vtime(i%) 'Set the Column on
Pin(j%)=1 'Turn on Hours UnitsDelay
delay
Pin(j%)=0 'Turn off Hours Units
j%=j%+1
next i%
end sub


a small problem: in your main loop, when time change from 23:59:59 to 00:00:00, it call "gettime". why not, but if real time is 23:59:5x, it call "gettime" twice
it is not importante, because in second call it will be correct!. And if rtc is out, you can read "00:00:00" at each call gettime, and in this case, you loop. it is juste to show one of timer's prog problem (there is many others )
Edited by goc30 2019-07-20
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025