My mind in a cloud of lily-white..
misc/binary_clock
binary clock ============ Just for fun I made a binary clock. A lot of the binary clocks you can find on the net use 555-timers. Since I'm a software oriented man, I used a PIC microcontroller for my clock. This allows me to write code in C which can then be loaded into the microcontroller. The clock displays the time in BCD format using six colums of 2 to 4 rows. It is possible to set the hour of the day, the minute of the hour. It is also possible to set the brightness of the display, or to disable the display of the time. Basic Version ------------- Because I didn't want to make it too difficult for myself, I first created a simple version driving 24 leds. The microcontroller I chose is able to source 25mA per IO-pin, which is exactly what we need for a led. We don't even need a current limiting resistor. <table align="center" style="text-align: center"> <tr> <td class="image"> <a href="http://www.unkie.org/files/binary_clock/binclock-basic-pic.jpg"> <img src="http://www.unkie.org/files/binary_clock/binclock-basic-pic-300x225.jpg" alt="binclock-basic-pic.jpg" /> </a> </td> </tr> </table> A movie and the full schematics/sourcecode are available for download. See the bottom of this page for details. Extended Version ---------------- The extended version of the clock is able to drive a display which requires more current. To be able to do this the design of the basic version was adapted so that each column and row is controlled by a transistor. The image below shows a development version I make it easier to debug. I'm aiming for about half the size of the development version. <table align="center" style="text-align: center"> <tr> <td class="image"> <a href="http://www.unkie.org/files/binary_clock/binclock-devel.jpg"> <img src="http://www.unkie.org/files/binary_clock/binclock-devel-300x225.jpg" alt="binclock-devel.jpg" /> </a> </td> </tr> </table> As you can see there are some pinheaders on the board. To those I can connect some form of lighting. The basic version is connected to the development board so we can easily see if everything works ok without connecting other lights to the pinheaders. Below you can see the finished version of the clock. The first picture shows the front, and the second picture the back. As you can see there are a *lot* of wires. <table align="center" style="text-align: center"> <tr> <td class="image"> <a href="http://www.unkie.org/files/binary_clock/binclock-pic.jpg"> <img src="http://www.unkie.org/files/binary_clock/binclock-pic-300x225.jpg" alt="binclock-pic.jpg" /> </a> </td> <td class="image"> <a href="http://www.unkie.org/files/binary_clock/binclock-pic2.jpg"> <img src="http://www.unkie.org/files/binary_clock/binclock-pic2-300x225.jpg" alt="binclock-pic2.jpg" /> </a> </td> </tr> </table> Timekeeping is done using Bresenham's Algorithm. The algorithm is described on its [wikipedia entry](http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm). How it applies in this situation is explained at the webpage of [Roman Black](http://www.romanblack.com/one_sec.htm). A movie and the full schematics/sourcecode are available for download. See the bottom of this page for details. Used software ============= The following software was used. All this software is open source, unless noted otherwise. * [Piklab](http://piklab.sourceforge.net/) Piklab is an integrated development environment for applications based on Microchip PIC and dsPIC microcontrollers similar to the MPLAB environment. * [gEDA](http://geda.seul.org/wiki/) The gEDA project is developing a full GPL'd suite of Electronic Design Automation tools. These tools are used for electrical circuit design, schematic capture, simulation, prototyping, and production. * [PICC lite compiler](http://www.htsoft.com/products/compilers/PICClite.php) (not open source, but free). Some of these software packages may have Windows versions available. Licence ======= The sourcecode is distributed under the GPL 2 license, of which a copy is included in the piklab project tarball. It is also available [here](http://www.gnu.org/licenses/) The schematics are licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License. To view a copy of this license, visit [this link](http://creativecommons.org/licenses/by-nc-sa/3.0/nl/deed.en). A copy is also included in the gEDA project tarball. Downloads ========= * [piklab project files](http://unkie.org/files/binary_clock/binclock-sources-v2.1.tar.bz2) (firmware) * [gEDA project files](http://unkie.org/files/binary_clock/binclock-schematics.tar.bz2) * Binary Clock - Basic Version * [Movie](http://unkie.org/files/binary_clock/binclock-basic.avi) * [Schematics (1/2)](http://unkie.org/files/binary_clock/binclock-basic-schematics-1of2.png) * [Schematics (2/2)](http://unkie.org/files/binary_clock/binclock-basic-schematics-2of2.png) * Binary Clock - Extended Version * [Movie](http://unkie.org/files/binary_clock/binclock.avi) * [Schematics (1/2)](http://unkie.org/files/binary_clock/binclock-schematics-1of2-rev1.1.png) * [Schematics (2/2)](http://unkie.org/files/binary_clock/binclock-schematics-2of2-rev1.1.png) * [List of all files available](http://unkie.org/files/binary_clock/) (including more movies) <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/nl/deed.en"> <img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png" /> </a>
diri documents are written using
Markdown syntax
.
Password:
© Mark Pustjens 2005 - 2007