18
BY DHAIRYA PANDYA Alarm clock using microcontroller IC 89C2051

Alarm Clock Using Microcontroller Using 89C2051

Embed Size (px)

Citation preview

Page 1: Alarm Clock Using Microcontroller Using 89C2051

BY DHAIRYA PANDYA

Alarm clock using microcontroller IC 89C2051

Page 2: Alarm Clock Using Microcontroller Using 89C2051

Contents

Introduction 89C2051Ds1307/1308Alarm operation Conclusion Application

Page 3: Alarm Clock Using Microcontroller Using 89C2051

Componets

8-bit Microcontroller (89c2051). Time keeping IC (DS1307) Battery 16x2 LCD.Buzzer.Power supply Resistors, Diode (IN 4007).RED LED Capacitors. Switches

Page 4: Alarm Clock Using Microcontroller Using 89C2051

Objective

In this project our objective is to develop an “ Alarm clock system ’’ that is capable of displaying the Real time clock and other clock operations like date , day , month , year etc. collected by microcontroller and DS1307 which is displayed on the LCD.

Page 5: Alarm Clock Using Microcontroller Using 89C2051

89C2051 Microcontroller

2K bytes of Flash128 bytes of RAM 32 I/O lines, two 16-bit timer/countersThe AT89C51 is designed with static logic for

operation down to zero frequency and supports two software selectable power saving modes.

The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents.

Page 6: Alarm Clock Using Microcontroller Using 89C2051

Pin configuration

Page 7: Alarm Clock Using Microcontroller Using 89C2051

Pin description

VCC: Supply voltage. GND : Ground. Port 0 to 7 : It is an 8-bit open-drain bi-directional I/O port. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator.Pin 29: PSEN If external ROM is used for storing program then a logic zero (0) appears on it every time the microcontroller reads a byte from memory.

Page 8: Alarm Clock Using Microcontroller Using 89C2051

DS1307

Page 9: Alarm Clock Using Microcontroller Using 89C2051

DS1307

The DS1307 Serial Real Time Clock is a low power, full BCD clock/calendar and 56 bytes of non-volatile SRAM Address.

Data are transferred serially via a 2–wire bi–directional bus. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information.

The DS1307 has a built–in power sense circuit which detects power failures and automatically switches to the battery supply.

 

Page 10: Alarm Clock Using Microcontroller Using 89C2051

LCD

LCD is Liquid Crystal display . It is an electronic display module and find a wide range of applications.

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.

 

Page 11: Alarm Clock Using Microcontroller Using 89C2051
Page 12: Alarm Clock Using Microcontroller Using 89C2051

Alarm operation

For normally open push button switches are used for user input to set the time/date and alarm time . the following illustrates the functions of each push button switch .

P3.0 Switch#1 will increment the time/date etc.

P3.1 Switch#2 will decrement the time/date etc.

P3.2 Switch#3 acts as the Enter Key push this switch when you are finished with each setting .

P3.4 Switch#4 puts the clock into set , or display alarm with mode.

Page 13: Alarm Clock Using Microcontroller Using 89C2051

The SQW/OUT this pin is programmed to output a 1Khz. Using these higher frequencies however would result in a steady time for the alarm buzzer.

2N2222 NPN Transistor is a setup to drive the alarm buzzer. Make sure to use an Alarm buzzer with an internal resistance sufficient to keep from over loading the Transistor.

The code with this project will sound the alarm buzzer for 1 minute, then turn the alarm off , you can easily modify this routine to leave the alarm on for any length of time .

Page 14: Alarm Clock Using Microcontroller Using 89C2051

The time and alarm settings you set are stored inside the DS1307 non-volatile RAM area and will remain unless you remove all power from circuit , including the external battery backup.

The DS1307 internal power sense circuit that will automatically switch to the external battery power.

The LCD is operated in 4-bit Mode because of limited I/O using the AT89C2051 Microcontroller.

Page 15: Alarm Clock Using Microcontroller Using 89C2051

Any microcontroller can be used but code should be compatible with any 8051 variant.

Any 8051 microcontroller with 13 available I/0 would be fine for this project.

Operation of this alarm is handled by pin -7 , DS1307 and SQW/OUT which is square wave output

Page 16: Alarm Clock Using Microcontroller Using 89C2051

Application

 Touch screens:A high number of microcontroller providers incorporate touch-sensing capabilities in their designs. Portable electronics such as cell phones, media players and gaming devices are examples of microcontroller-based touch screens.

 Automobiles:  They are widely used in hybrid vehicles to manage engine variants. functions such as cruise control and anti-brake system have been made more efficient with the use of microcontrollers.

 Medical Devices: Portable medical devices such as blood pressure and glucose monitors use microcontrollers will to display data.

Page 17: Alarm Clock Using Microcontroller Using 89C2051

Conclusion

During the development of our project I studied and analyzed many real world applications of Electronics and Software Engineering. Some of the theoretical knowledge which we have applied practically, is:

 Use of voltage regulation and filtering in power

supply.Study of LCD.Study of Microcontroller.

Page 18: Alarm Clock Using Microcontroller Using 89C2051

Thank You