Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

This design includes Proteus simulation + program + design report + explanatory video.

1. Development Environment

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

Simulation diagram: Proteus 8.17 (lower versions available)

Compiler: Keil 4/Keil 5

Programming Language: C

Design Number: P22

2. Main Functions:

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

1. Use a 7-segment display as the display device to design the clock function;

2. Allows separate adjustment of hours, minutes, and seconds, resets to 00:00:00, and can be set to 24 or 12-hour format;

3. Extended functions:

Includes an alarm function, which can be set via buttons, with a default alarm time of 00:01;

12/24 hour format has corresponding indicator lights, with AM/PM indicators.

Main hardware: 51 microcontroller, DS1302, 7-segment display, independent buttons, LED

(Currently fully compatible with the Puzhong 51 experimental board 234; other Puzhong development board models require wiring)

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

Note that the 51 microcontroller chip in the simulation is compatible; AT89C51 and AT89C52 are specific models of the 51 microcontroller, with the same core. In the same schematic, whether STC or AT, the pin functions are the same, the programs are compatible, and the chips can be replaced with STC89C52/STC89C51/AT89C52/AT89C51 and other 51 microcontroller chips.

Download Link for Materials:

P Series Microcontroller Design Download Link (copy to browser to open)

https://docs.qq.com/doc/DS2pPenNRaHB6SlR1

Below are the display images of this design materials:

3. Physical Images:

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

The displayed time is 09:01:13

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

Indicator light explanation on the Puzhong experimental board

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

4. Simulation Design

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

Open the simulation project, double-click the microcontroller in Proteus, select the hex file path, and then start the simulation. After starting the simulation, the 7-segment display shows time 00:00:00. The time increments by seconds.

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

While displaying the time, press the set button to enter the setting mode, the clock blinks indicating that the clock is currently being set, then press the set button to enter the minute setting mode, the minutes blink, and then press the set button to enter the second setting mode, the seconds blink. After setting the seconds, press set to exit the setting mode, and the 7-segment display shows normally.

When not in the setting state, the + button serves as a toggle button to switch between 12/24 hour formats. In 12-hour format, there is a light indicator for AM or PM, thus achieving AM/PM indication.

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

Press the function switch button to display the alarm time. In the alarm time display, press the set button to enter the alarm setting mode, the clock blinks indicating that the alarm clock is currently being set, then press the set button to enter the alarm minute setting mode, the alarm minutes blink, and then press the set button to enter the alarm second setting mode, the alarm seconds blink. After setting the seconds, press set to exit the setting mode, and the 7-segment display shows the alarm time normally.

When the alarm time is reached, the buzzer rings, and the buzzer sounds for 6 seconds.

5. Program Code

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

Use Keil 4 or Keil 5 to compile, the code is commented, and can be understood in conjunction with the video.

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

6. Design Report

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

6138-word design report, including hardware design, software design, soft and hardware block diagrams, debugging, conclusions, etc.

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

7. List of Design Materials & Download Links

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

The design materials include simulation, program code, explanatory video, functional requirements, design report, soft and hardware design block diagrams, etc.

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

0. Common usage issues and solutions – must read!!!!

1. Program

2. Proteus simulation

3. Functional requirements

4. Soft and hardware flowcharts

5. Project proposal

6. Design report

7. Programming tools

8. Explanatory video

9. Physical images

Altium Designer installation and cracking

KEIL + Proteus microcontroller simulation design tutorial

KEIL installation and cracking

Proteus component search

Proteus installation

Proteus simple usage tutorial

Microcontroller learning materials

Related data sheets

Defense skills

Common descriptions in design reports

Double-click the mouse to open and find the Jiasheng microcontroller 51 STM32 microcontroller course graduation design.url

Material download link (clickable):

https://docs.qq.com/doc/DS2pPenNRaHB6SlR1

More resources click the link below:

https://docs.qq.com/sheet/DS0xIa0llTmtNakRW

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

WeChat Official Account

Jiasheng Microcontroller

Website|www.eemcu.cn

Design of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format SwitchingDesign of an Electronic Clock Alarm Based on the 51 Microcontroller with 12-24 Hour Format Switching

Leave a Comment