Yet Another BS-2 Clock
tomcrawford
Posts: 1,126
Here is yet another example of a BS-2 based clock. I wanted one which would not be so bright as to keep us awake in the dark, but that would chime on the half-hour and chime the hour.
Picture one shows the breadboard.
I used a DS1307 clock chip because that is what is on the Professional Development Board and I had cribbed the Parallax code for another project. If I had it to do over, I would select a DS1302 because it doesn't need external caps and because it is serial I/O, as opposed to I2C.
I included a DS1620 thermometer because I had a bunch of them in my junk drawer. The audio amplifier is copied from the Prof Dev Board.
The intended display is a 2X16 Serial LCD, with backlight. I currently am using a 4X20 which is compatible. Picture two shows the display with the backlight on. Time, temperature, and day/date just fill up the 2X16 display.
The red button is a mode control. Pressing it repeatedly cycles through Normal Operation, BackLight On, Set Hour, Set Minute, Clear Seconds, Set Day of Week, Set Date, Set Month, Set Year, Normal Operation. The Up/Down buttons increase/decrease whatever is being set. If the clock is in Normal Operation Mode, The Up/Down buttons turn on the backlight for a few seconds.
The code is attached. It just about fills up a BS-2, again demonstrating that software expands to fill the available space.
Picture one shows the breadboard.
I used a DS1307 clock chip because that is what is on the Professional Development Board and I had cribbed the Parallax code for another project. If I had it to do over, I would select a DS1302 because it doesn't need external caps and because it is serial I/O, as opposed to I2C.
I included a DS1620 thermometer because I had a bunch of them in my junk drawer. The audio amplifier is copied from the Prof Dev Board.
The intended display is a 2X16 Serial LCD, with backlight. I currently am using a 4X20 which is compatible. Picture two shows the display with the backlight on. Time, temperature, and day/date just fill up the 2X16 display.
The red button is a mode control. Pressing it repeatedly cycles through Normal Operation, BackLight On, Set Hour, Set Minute, Clear Seconds, Set Day of Week, Set Date, Set Month, Set Year, Normal Operation. The Up/Down buttons increase/decrease whatever is being set. If the clock is in Normal Operation Mode, The Up/Down buttons turn on the backlight for a few seconds.
The code is attached. It just about fills up a BS-2, again demonstrating that software expands to fill the available space.
Comments
One question though; You keep your place at 82deg?? Yikes
But for gosh sakes, at least start with a nice clean piece of plywood!
It would be neat to make an analog clock with geared-up servos. They would have to spin backwards 360 degrees at their limit, perhaps on the hour and noon/midnight.
Even better, make an electronic sundial. Either move the light source or switch 2 dozen LEDs on/off to cast the right shadow.