|
Forum Index : Microcontroller and PC projects : School Clock Project
| Author | Message | ||||
jman![]() Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
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: AustraliaPosts: 2006 |
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. "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: AustraliaPosts: 3308 |
Excellent project. Congratulations to the kids (and you). Geoff Geoff Graham - http://geoffg.net |
||||
palcal![]() Guru Joined: 12/10/2011 Location: AustraliaPosts: 2006 |
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: FrancePosts: 435 |
hi jman 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 ) |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |