Digital Alarm Clock design based on PIC16F876A will be demonstrated in this post. Various modules from earlier project were implemented in current design hardware and source code. For example it uses the same 7-Segment Display and multiplexing routing as in Digital Timer, clock generation functions were taken from a simpler version of Digital Clock without alarm capability and slightly modified.
In order to adjust the time press Min/Hours button while holding Time. Similarly press Min/Hours button while holding Alarm to set the desired alarm value. See design schematic on the next page for correct buttons designation. Time format is 24H. Snooze function currently not implemented, look at attached assembly source code for additional information. I’ve tried to provide sufficient amount of comments for each function.
Digital Clock circuit can be powered from battery for short periods of time, alternatively rechargeable battery can be used as a backup power supply in case of main power failure. Another possibility is to decrease the voltage from 5v to lower values thus reducing overall circuit power consumption. Make sure that PIC micro controller can still work at this level, in this case display current limiting resistors can be removed therefore further simplifying the design.