Here is another great submission from Victor (ugoo5000). We do have many digital clock projects on website but I again wanted to add this one to our list because there are two new and interesting things in it. There are good things to learn from this project. So I summarize all of them here:

  1. DS1302 as Time keeping IC
  2. Interrupt based keypad


The DS1302 trickle-charge timekeeping chip contains a real-time clock/calendar and 31 bytes of static RAM. It communicates with a microprocessor via a simple serial interface. The real-time clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. DS1302 communicates with microcontroller using a 3 wire interface a very similar to SPI. So this is one new thing to learn in this project.

Now second interesting thing which got my attention is interrupt based keypad. All codes we have seen till now uses keypad scanning. This one uses interrupt based approach for scanning keys. As soon as a key an interrupt is generated though an AND gate connected to all the rows, which indicate controller that a key is pressed. So scanning is done in ISR routine where key is detected. I am sure this way of using a keypad must be helpful fo many of us when making our new projects.

You can download this project from link below
DS1302 based Digital Clock with Calendar
printer friendly create pdf of this news item

Submit comment

(Required; Min length 5)
(Required; will not be displayed)

Downloads

Comments

ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm
Charlestehed
Wed Apr 24 2024, 05:20 pm