Seven segment based alarm clock using 8051 microcontroller (AT89C51)
An alarm clock is a clock that indicates a pre-set time by producing sound at that time. This functionality of digital clock is used to awaken people or remind them of something. This circuit is an extension to the digital clock with time setting option. Here an extra switch is provided to set the alarm. While the alarm is set, the clock time does not stop and runs in the background. The project is build around the 8051 microcontroller (AT89C51)
DescriptionTo provide various options in the digital clock, following switches are used:
Switch 1 (S1) : Reset (to initiate the time set option)
Switch 2 (S2) : Select (to select the segment where value is to be changed)
Switch 3 (S3) : Increment (to increase the value at selected segment)
Switch 4 (S4) : Start (to start the clock with the set time options)
Switch 5 (S5) : Alarm (to initiate the alarm set option)
The option to set alarm is provided by providing an extra switch S5, with the microcontoller At89C51, which is made active low. Whenever S5 is pressed, the time display goes off and only 1st segment is activated. But the clock time still runs in the background. In this mode, a segment can be selected in cyclic order by pressing S2. After selecting the desired segment, its value can be changed by using S3. Once the digits and hence the alarm is set, S4 is pressed to start the clock again. As soon as the set alarm time is reached, a buzzer gets signal from the microcontroller thus producing sound.
The seven segments are interfaced to port P2 of the microcontroller AT89C51 through its data pins (a - h). The enable pins are connected to pins 1-4 of port P1 (P1^0 – P1^3). The switches S1-S5 and buzzer are connected as following:
S1 : P1^4 S4 : P3^3
S2 : P1^6 S5 : P1^5
S3 : P1^7 Buzzer : P3^7
The buzzer is connected to the output pin of microcontroller at the negative end and to Vcc at the positive end.
This Code is only visible to Registered users. Please Login/Register
BC547 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is commonly used to amplify current. A small current at its base controls a larger current...
Seven Segment Display
A seven segment display is the most basic electronic display device that can display digits from 0-9. They find wide application in devices that display numeric information like digital clocks, radio, microwave ovens...
The piezo buzzer produces sound based on reverse of the piezoelectric effect. The generation of pressure variation or strain by the application of electric potential across a piezoelectric material is the underlying...