Design And Construction A Microcontroller Based Digital Clock With Calendar Using Pic16F877

Designing and constructing a microcontroller-based digital clock with a calendar using the PIC16F877 involves the intricate integration of electronic components and programming to achieve precise timekeeping and date tracking functionalities. The PIC16F877, a versatile microcontroller, serves as the core of this system, orchestrating the clock’s operations. Employing a combination of crystal oscillators and real-time clock modules ensures accurate timekeeping, while the incorporation of input devices, such as buttons, facilitates user interaction for setting time and date parameters. The program logic, embedded in the microcontroller, coordinates the synchronization of the digital display, translating the internal clock and calendar data into a user-friendly format. The design optimally balances hardware and software components, resulting in a sophisticated digital timepiece capable of reliably displaying time and date information through the seamless synergy of electronic components and intelligent programming.

Digital project is developed for the users to use a digital display instead of analogue. The main parts of this project are press switch, microcontroller unit and LCD display.

This Digital device was designed using Microcontroller (PIC16F877) to display digital calendar, which displays the Date, Day, Month and schedules over the LCD display. It has an 8 bit Microcontroller which runs on the Program embedded on its ROM. The system has a battery backup so that it can run over all the time even during the power failure.

The user can set the time, date, day and their schedules using the switch. When the user sets the timings, the settings will be displayed in the LCD display. The settings are stored in the microcontroller memory. When the function key is turned on, the microcontroller sends data to the LCD display to display the current time, date and day.

If necessary, the user can modify the settings using the key pad. This project is very cheap and compact. Since microcontroller is used, the operations will be very accurate.

CHAPTER ONE

1.1                                                        INTRODUCTION

Nowadays, so many electronics comes with digital display. A display device is an output device for presentation of information in visual form. When the input information is supplied has an electrical signal, the display is called an electronic display.

Some displays can show only digits or alphanumeric characters. They are called segment displays, because they are composed of several segments that switch on and off to give appearance of desired glyph. The segments are usually single LEDs or liquid crystals. They are mostly used in digital watches and pocket calculators.

This particular work focuses on the design of three different digital display devices – digital clock, digital calendar and digital timetable. And they described as below:

Digital clock is very useful projects for final year students. It has an Inbuilt Real Time Clock which tracks over the Real Time. It displays the time in hh:mm:ss format. The time and date can be changed at any Time using the switch. The Real Time Clock is displayed on LCD display.

A digital timing circuit (digital clock) is something we use and depend on every day. The timing circuit used in this project will be entirely hardware based. It will consist of two timing signals, a 60Hz clock pulse used as the main timing signal (multiples of 60s) and a 1kHz clock pulse used for multiplexing a 7-segment display for the clock. The 60Hz clock pulse will be divided by sixty multiple times in order to provide a pulse for seconds, minutes and hours. These pulses will be counted, stored in memory registers and then displayed to show the current time.

A calendar organizes days for social, religious, commercial or administrative purposes. This is done by giving names to periods of time, typically days, weeks, months and years. A date is the designation of a single, specific day within such a system. A calendar is also a physical record (often paper) of such a system. A calendar can also mean a list of planned events, such as a court calendar or a partly or fully chronological list of documents, such as a calendar of wills.

Digital calendar is very useful projects for final year students. This project replaces the Printed Calendars. We can set the reminders on events or alarm at a particular time and date. We can use the LED array for larger display.

This device has smart application due to precisely time display and several types of reasons such as much reliable, free maintenance, portable, elegant outlook, inexpensiveness, tiny size and result accuracy. Every electronics based modern real life application in any filed is now integrated with the digital calendar to enable the user to keep time and date anywhere at any time. It is often incorporated into all kinds of devices such as transports, traffic signal, radios, televisions, standard ovens, computers, laptop, cell phones and wireless peripheral to intellect the device in the way that would be easily enticed by human mind. Regarding the demand of digital clock, this paper presents graceful design of smart digital clock in a particular way that would not only be able to display time, it has an ability to display day of a week with real time. This research shows an embedded system which is constructed through PIC 16F877A microcontroller.

1.1                                                   AIM OF THE PROJECT

The main aim of this work is to construct a device that will digitally display set time and date. It displays the time in hh:mm:ss format while the date is in days, weeks, months and years. The system is constructed using PIC 16F877A microcontroller which is the heart of the circuit.

1.2                                            OBJECTIVES OF THE PROJECT

Our objective is to create a system that consists of:

  • Digital display which is flexible and scalable enough to accommodate the requirements of most calendars of the year
  • a Calendar Management Tool which allows users to manage their events stored in a central repository, easily share their events with other campus calendars and customize their calendar’s appearance
  • a device that will display the time in seconds, minutes and hours. In addition to this, it will also display time. We can also set the time using the switch.
  • A device that catches a person’s attention and create a memorable impression very quickly, leaving the reader thinking about the advertisement after they have driven past it. Digital timetables can be used to display time of activities in the school.

1.3                                              PURPOSE OF THE PROJECT

The project will display the time, date, month and year. We can also set the date and time.

The purpose of our project is to design a complete digital device which will be deployable in the campus. This device will allow all campus or any other places it is applied to manage and store event information, manage their time and schedules in such a way that it can be easily shared with other calendars.

 

1.4                                         SIGNIFICANCE OF THE PROJECT

You truly cannot be an organized human being unless you use a good calendar system and time, even if you are still someone who likes to keep all of their appointments, activities, and reminders on a paper calendar.

One of the most beautiful things about digital calendars is that they can be synced, so you can have your calendar on your smart phone, your tablet, your laptop, as well as it can sync to your husband’s electronic calendar and your kids’ calendars. So no matter where you are- you can easily look up and see what your current appointments are for any given day. And the important people in your life can know the latest schedule and commitments too- without coming home and consulting the kitchen wall.

Digital clock is important in that one can have clock on your smart phone, your tablet, your laptop, as well as it can sync to your husband’s electronic clock and your kids’ clock. So no matter where you are- you can easily look up and see what your current appointments are for any given day. And the important people in your life can know the latest schedule and commitments too- without coming home and consulting the kitchen wall.

Some of the most prominent digital timetables are alongside class rooms; since passing students typically have little to occupy their attention; the impact of the timetable is greater. Digital timetables are often drivers’ primary method of finding lecture time, exam time etc.

Keep students updated in real time with flexible messaging options.

Change copy within minutes without any printing or installation costs.

1.5                            ADVANTAGES OF THE PROJECT

  • Even if there is power failure, the device displays the right date, time, and schedules that it should display, when the power is back.
  • Simplicity of the system.
  • Accuracy of the system.

1.6                           APPLICATIONS OF THE PROJECT
Because digital device is very small and inexpensive devices that enhance the popularity of product designs, they are often incorporated into all kinds of devices such as:
• Cars
• Radios
• Televisions

  • In schools
  • In worshipping centres
  • Car garages, etc.

1.7                                           LIMITATION OF THE PROJECT

  • Costs for displaying using this medium may also be significantly more than analogue means of these devices.
  • It cost higher techniques and knowledge to use or maintained than the analogue or Manuel type.

1.8                                        PROJECT WORK ORGANISATION

The various stages involved in the development of this project have been properly put into five chapters to enhance comprehensive and concise reading. In this project thesis, the project is organized sequentially as follows:

Chapter one of this work is on the introduction to this study. In this chapter, the background, significance, objective limitation and problem of this study were discussed.

Chapter two is on literature review of this study. In this chapter, all the literature pertaining to this work was reviewed.

Chapter three is on design methodology. In this chapter all the method involved during the design and construction were discussed.

Chapter four is on testing analysis. All testing that result accurate functionality was analyzed.

Chapter five is on conclusion, recommendation and references.

Save/Share This On Social Media:
MORE DESCRIPTION:

Creating a digital clock with a calendar function using the PIC16F877 microcontroller is a fun and educational project for enthusiasts interested in embedded systems and microcontroller programming. The PIC16F877 is a popular microcontroller from Microchip Technology, known for its versatility and ease of use. In this project, we will design a simple digital clock with calendar functionality using the PIC16F877 microcontroller, an RTC (Real-Time Clock) module, and an LCD display.

Components Required:

  1. PIC16F877 Microcontroller
  2. RTC Module (e.g., DS1307)
  3. 16×2 LCD Display
  4. Crystal Oscillator (typically 4MHz)
  5. Push Buttons (for setting time and date)
  6. Resistors
  7. Capacitors
  8. Breadboard
  9. Connecting Wires

Circuit Diagram:

The circuit diagram for the digital clock with a calendar using the PIC16F877 microcontroller is relatively straightforward. Here’s a simplified version of the circuit:

markdown
PIC16F877
+5V ____________ +5V
| | | |
| RA0/AN0| |RB0/INT
| RA1/AN1| |RB1
| RA2/AN2| |RB2
| RA3/AN3| |RB3
| RA4/AN4| |RB4
| Vss | |RB5
| Vdd | |RB6
| Vpp | |RB7
| RA7 | |
| RB0 | |
| RB1 | | GND
| RB2 |___________| |
| RB3 RB7 |
| RB4 RB6 |
| RB5 RB5 |
| Vss Vdd |
| Vss Vss |
|_______________________________|

Programming:

You’ll need to write the firmware for the PIC16F877 microcontroller to control the clock and calendar functions. Here’s a basic outline of the steps involved:

  1. Initialize the PIC16F877 microcontroller, including configuring I/O pins for interfacing with the RTC module and LCD display.
  2. Initialize the RTC module (DS1307) to start the real-time clock.
  3. Implement functions to read the current time and date from the RTC module.
  4. Implement functions to display the time and date on the LCD display.
  5. Implement functions to set the time and date using push buttons.
  6. Update the clock and calendar display periodically to keep it synchronized with the RTC module.

Here’s a simple example of C code for the PIC16F877 microcontroller to get you started:

c
#include <pic.h>
#include <stdio.h>
#include "lcd.h"
#include "ds1307.h"

void main() {
unsigned char hour, minute, second, day, month, year;
char time_str[9];
char date_str[11];

// Initialize LCD
lcd_init();

// Initialize DS1307 RTC
ds1307_init();

while (1) {
// Read time from RTC
ds1307_get_time(&hour, &minute, &second);

// Read date from RTC
ds1307_get_date(&day, &month, &year);

// Format time string
sprintf(time_str, "%02u:%02u:%02u", hour, minute, second);

// Format date string
sprintf(date_str, "%02u/%02u/%02u", day, month, year);

// Display time on LCD
lcd_goto(1, 1);
lcd_puts(time_str);

// Display date on LCD
lcd_goto(2, 1);
lcd_puts(date_str);

// Delay for one second
__delay_ms(1000);
}
}

Conclusion:

By following this guide, you should be able to create a digital clock with a calendar using the PIC16F877 microcontroller. Remember that this is just a basic example, and you can expand upon it by adding features such as alarms, temperature monitoring, or additional display options. Have fun experimenting and learning with your microcontroller project!