News Item: DS1302 based Digital Clock with Calendar
(Category: 8051 Projects)
Posted by ajay_bhargav
Thu Sep 13 2012, 11:14 am



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


This news item is from Rickey's World of Microcontrollers & Microprocessors
( http://www.8051projects.net/news.php?extend.192 )