Hello Everyone!
·· There have been a few people waiting patiently for me to finish this project and get it uploaded.· Thanks for your patience!· Working for Parallax is the greatest job I’ve ever had, but sometimes you devote yourself more to other projects than your own.· Eventually I get around to finishing some of these projects and post them here for our customers to use and enjoy.
·
·· You’ve probably seen some of the “Hacker” clocks floating around the internet (eBay, ThinkGeek.com, etc.).· These clocks display the time in binary format, the native language of a computer (Based on 1’s and 0’s).· The time is shown using LEDs instead of 7-segment displays.· Ever since I got mine people have asked me what it’s displaying, and some don’t even believe me when I tell them it’s the time in binary.· I told a few people I was going to build a binary clock that also showed the “normal” time, so that people could see the relationship between the two formats and hopefully understand it better.
·
·· When I started this project I already knew I was going to be using certain parts.· All parts are available from Parallax.· The original design used pushbuttons, but I couldn’t seem to make everyone happy with the button configurations.· So if you want the ability to set the clock manually, you will have to write a routine and implement your own input device, such as push-buttons to do so.· Please feel free to share this information with other users as more people may like your individual ideas.· For now you can set the clock by using the DS1302_Demo.bs2 file.· This is designed to help people understand the DS1302, but I used the same I/O lines so the code is compatible and allows you to use the DEBUG Screen to set the Date/Time.· The DS1302 should be battery-backed anyway, so this shouldn’t be a problem.· As a final note, I do have a BS2p version of the clock using an Optical Rotary Encoder with a push-button.· This allows me to set everything with one input device.· The code needs a lot of work to be User-Friendly though, so I will release that later.
·
·· Since I already intended to use the DS1302 for timekeeping, I decided I might as well make use of the Date information available to me as well, and so a Parallax 2X16 Serial LCD Display was added to show the Day, Date and Temperature.· The Temperature idea was added when I realized I had a lot of free space on the LCD, and could add the DS1620 using only 1 more I/O line.· This also makes another point in that the DS1302, DS1620, MAX7219 and all three 74HC595s are all sharing the same Data and Clock lines.· This saves a lot of I/O pins compared with them each using their own, and demonstrates one way to consolidate I/O lines.· Another feature demonstrated here is shared variables and constants.· By sharing I/O lines, we can also have some common constants.· And for variables, we can re-use many of them.· Variables are conserved by re-using the same variables in many routines where the information needs to be retrieved and displayed and then it is free to use for reading the next device in line.
·
·· So now what we have here is a “Super Hacker Clock” with extra bells and whistles, including selectable hourly chime and 12/24 hour mode support.· In 12 hour mode the AM/PM indicators light up.· In 24hour mode neither LED will light up.· J1 selects the hourly chime.· If J1 is closed, every hour on the hour, there will be an audible beep.· If J1 is open, the chime (beep) will be disabled.· The neat thing is that everything is customizable.· After all, we’re using the BASIC Stamp, aren’t we?· So we may choose not to implement an hourly chime.· We may also choose to lock the time into 12 or 24 hour mode, or we may choose to set it using our input device.· The point is you can always change things if you don’t like the setup.· This project is designed to be customizable.
·
·· The code and schematics are believed to be accurate and error free, however neither Parallax, Inc. nor I accept any responsibility for the results of using the data presented here.· It is intended as both a learning tool as well as enjoyment.· It is my sincerest hope that you benefit from the information provided.· Please post any comments, code suggestions, error/bug reports or pictures of your own implementations here on our forums.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com





Reply With Quote






Bookmarks