Clock with BS1 and DS1302
Hello,
I thought I'd submit yet another clock project. Here is a YouTube clip with stills and video:
www.youtube.com/watch?v=U3HXW0oYbps
The clock shakes a smiley jingling cat toy at the designated alarm time and on the hour if desired.
I've attached a schematic (JPG) and code. The code uses all but 2 bytes in the BS1. Since code space was limited, I must enter decimal equivalents of binary-coded-decimal values to program the clock via a serial terminal app (like Windows Hyperterminal). It uses 24-hour mode in a DS1302 chip. The clock will display its current settings to the terminal slightly faster than once per second. A switch on the clock puts it into programming mode. Then I can enter a time and alarm time. For example, typing 35 89 0 1 will set the time to 11:59pm (23:59) and set the alarm for 12:01am (00:01 or one minute after midnight). Adding 128 to the alarm hours field disables the hourly chime function. A time setting of 255 0 will be ignored which provides a way of updating the alarm without changing the current time.
Enjoy!
I thought I'd submit yet another clock project. Here is a YouTube clip with stills and video:
www.youtube.com/watch?v=U3HXW0oYbps
The clock shakes a smiley jingling cat toy at the designated alarm time and on the hour if desired.
I've attached a schematic (JPG) and code. The code uses all but 2 bytes in the BS1. Since code space was limited, I must enter decimal equivalents of binary-coded-decimal values to program the clock via a serial terminal app (like Windows Hyperterminal). It uses 24-hour mode in a DS1302 chip. The clock will display its current settings to the terminal slightly faster than once per second. A switch on the clock puts it into programming mode. Then I can enter a time and alarm time. For example, typing 35 89 0 1 will set the time to 11:59pm (23:59) and set the alarm for 12:01am (00:01 or one minute after midnight). Adding 128 to the alarm hours field disables the hourly chime function. A time setting of 255 0 will be ignored which provides a way of updating the alarm without changing the current time.
Enjoy!
Comments