DLD REPORT.docx

21
PROJECT REPORT DIGITAL CLOCK SYSTEM DIGITAL LOGIC AND DESIGN – 3-B B.S. (CS), 3rd Semester Teacher Name: Sir Rizwan Ali Group Members: SHABIH HAIDER 36607 FAHAD ASAD 36560 TAYYAB ALI 36621 SYED ABDUL RAFAY 1 5/26/2015

Transcript of DLD REPORT.docx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxx PROJECT REPORT

PROJECT REPORTDIGITAL CLOCK SYSTEM

DIGITAL LOGIC AND DESIGN 3-BB.S. (CS), 3rd Semester

Teacher Name: Sir Rizwan AliGroup Members:SHABIH HAIDER36607

FAHAD ASAD36560

TAYYAB ALI 36621

SYED ABDUL RAFAY 36609

SUNNY KUMAR36608

ACKNOWLEDGEMENT

I truly express big thanks to my project guider, Sir Rizwan Ali, for advising me from the beginning till successful completion of this project and being the part of this project, I always tried to lead from the front. I appreciate the efforts made by my project mates for bringing out this project which is full of information, if implemented, it will be great benefit to Computer Science department for their co-operation and support throughout this project..

ABSTRACT

The main purpose of this project is to build a digital clock and also to emphasize team working experience among students. To design 12 hour digital clock, electronic devices such as ICs , resistors and LEDs are required that can be directly operated from a 230V main supply. The time will be displayed on the LED display panel showing minutes and seconds function.

175/26/2015

Table of contentsTopicsPagesIntroduction----------------------------------- 5Literature Review-----------------------------------6Objective and scope-------------------------- 7Methodology------------------------------------------------- 8I. Circuit diagram---------------------------- 9II. Multisim diagram--------------------- 10Result and discussion-------------------------------------- 11-12Coding ------------------------------------------ 13Conclusion-------------------------------------- 14

INTRODUCTION

A digital clock shows the time in numbers form on the lcd screen. It helps us to see the exact and precise time. It is very expensive and accurate and it is very helpful for the buyer to buy this instrument. We also build a digital clock on the breadboard that is also displays the time in numbers form. The components we used in our circuit are as follows: PIC 16F84A Transistor BC548 (4) 10K,1K-Resistor (1k - 4) LED 22pfCapacitor(2) Push button (3) Crystal 4MHz Common cathode seven segment display (4)

LITERATURE REVIEWThe first digital pocket watch was invented by Austrian engineer Josef Pallweber in 1883.It shows the time in hours and minutes and it is available in the market yet. Another type of digital clock called Plato clocks were invented by Ansonia Clock Company 1904. In 1970, the digital wristwatch was invented by Hamilton Watch Company which now a days people are using these types of watches. After that, many digital watches and digital clocks are developed.

OBJECTIVE AND SCOPEScope:The main purpose of this project is to build a digital clock and also to emphasize team working experience among students and it also helps the students to increase their knowledge. This digital clock show the time in hours, minutes and in seconds using LCD display. It has also another alternative function that alarm circuit is connected to it which helps us to buzzer the alarm in buzzer alarm. It has also reset button attached to it which helps us to reset a running time and to start again from zero.

Objectives: To implement, design and simulate a circuit in multisim. To construct and design circuit on breadboard and starts testing it that whether it is working or not. Give it a 230 voltage main supply. Stop the digital clock by reset button. To build a team environment among students.

METHODOLOGYWORKING:PIC16f84A microchip is a main component of the circuit; its control and generates the seconds clock through which the device run and its also control the 7 segment display. There are three buttons are provided : reset button , hours button, and minute button . Reset button sets the time to 0 while hours and minute button increment in hours and minutes to set the time from where we want digital clock to start. By pressing these button you can easily set the hours and minutes .

The main feature of this real time clock circuit is that this clock takes less current like its only draws lees than 100mA.In this way you will also connect it with rechargeable batteries. By increasing the value of resistors connected to the seven segment display you can decrease the current gain. 24(international time clock) to 12 hour time conversion easily done by burning the PIC microchip with the corresponding hex file.

CIRCUIT DIAGRAM:

Multisim Circuit Diagram:

Components Pin out

Seven Segment Display

CODING#define F_CPU 4000000UL#include #include #include

#define SegDataPort PORTB#define SegDataPin PINB#define SegDataDDR DDRB

#define SegCntrlPort PORTC#define SegCntrlPin PINC#define SegCntrlDDR DDRC

/*Global Variables Declarations*/unsigned char hours = 0;unsigned char minutes = 0;unsigned char seconds = 0;

/*Function Declarations*//*****************************************************************************//*Decimal Digit (0-9) to Seven Segment Values Encoder*/unsigned char DigitTo7SegEncoder(unsigned char digit, unsigned char common);

/*Timer Counter 1 Compare Match A Interrupt Service Routine/Interrupt Handler*/ISR(TIMER1_COMPA_vect);

/*Main Program*//*****************************************************************************/int main(void){SegDataDDR = 0xFF;SegCntrlDDR = 0x3F;SegCntrlPort = 0xFF;

TCCR1B = (1