[Puzhong Development Board] Design of electronic clock and alarm clock based on 51 microcontroller (proteus simulation + program + design report + explanation video)

[Puzhong Development Board] Digital tube display design of electronic clock and alarm clock based on 51 microcontroller (proteus simulation + program + design report + explanation video)

Proteus emulation: Proteus 8.16

Program compiler: keil 4/keil 5

Programming language: C language

Design number: P03

1. Main functions:

Puzhong development board experimental design

Design of electronic clock and alarm clock based on 51 microcontroller.

1. This design uses DS1302 as the clock source, and the digital tube displays hours, minutes and seconds.

2. You can set the hours, minutes, seconds and alarm clock through the buttons.

3. When the time reaches the set alarm time, the buzzer will sound an alarm.

4. The effect can be achieved on the Puzhong development board, both simulation and development boards.

(Currently only fully compatible with Puzhong development board A234, other Puzhong development board models may require code modification or wiring)

It should be noted that the 51 microcontroller chips in this design simulation are compatible. AT89C51 and AT89C52 are the specific models of the 51 microcontroller, and the cores are the same. In the same schematic diagram, both stc and at are the same, the pin functions are the same, the programs are compatible, and the chip can be replaced with 51 microcontroller chips such as STC89C52/STC89C51/AT89C52/AT89C51.

The following is a display diagram of this design information:

2. Explanation video:

The explanation video includes simulation operation explanation, physical operation explanation and code explanation.

Physical design of electronic clock alarm clock proteus based on 51 microcontroller (simulation code report)

3. Design specification (report)

img

This design aims to realize the Proteus simulation design of a multifunctional digital clock alarm clock through 51 microcontroller. This design includes a variety of functions, such as timing, time display, time setting, alarm setting, and alarm elimination. By using the internal timer of the microcontroller, we can achieve accurate timing functions, and use an eight-bit digital tube to clearly display hours, minutes, and seconds. In addition, users can also adjust hours, minutes, and seconds through addition and subtraction settings, making the time display more flexible.

In addition, this design also has an alarm clock function. The user can set a specific time. When the set time is reached, the buzzer will sound every 1 second for 6 seconds to remind the user to get up or remind other matters. This alarm clock function can help users overcome the trouble of being late or missing important events.

In general, this Proteus simulation design of a digital clock alarm clock based on the 51 microcontroller combines a variety of practical functions and aims to provide users with a convenient and practical time management and reminder tool.

Finally, this design will use Proteus simulation software to simulate the actual working effect of the system. Through simulation testing, the reliability and stability of the system can be verified and whether there are potential problems and defects. If the test results are as expected, then this design can provide an effective reference for practical applications.

4. Simulation

Open the simulation project, double-click the microcontroller in proteus, select the hex file path, and then start simulation.

img

5. Physical recording and phenomena

img

Software preparation:

Be sure to install the CH340 driver before using it for the first time.

Double-click to open STC-ISP.exe.

Download steps:

0. Power on the board first and connect the power cord to the USB port of the computer. If you do not power on the board first, there will be no light on the board.

1. Select the microcontroller model

2. Select the serial port of the downloader

3. Open the HEX file generated by compilation

4. Click download, press the power button of the microcontroller board to turn on the power, and wait for the download completion prompt.

6. Program code

Compile using keil4 or keil5, and the code has comments.

Core code:

void  main()// 主程序
{
    
    
    Ds1302Init();
	TMOD|=0X01;
	TL0 = 0x00;		//设置定时初值10ms中断
	TH0 = 0xDC;		//设置定时初值
	ET0=1;//打开定时器0中断允许
	TR0=1;//打开定时器
	EA=1;//打开总中断	 
	 while(1)	//循环
	 {
    
    
		 saomiao();// 扫描显示
		 key();				// 按键检查
		if(SetState==0)//正常显示
		{
    
    
			Ds1302ReadTime();
		}
		if(biaozhi==0)	// 判断工作模式  为时钟模式
		{
    
    
			 key_set_time();
			 timetoseg();
		}
		if(biaozhi==1)			// 判断工作模式  为闹钟调整模式
		{
    
    
			 key_set_colck();
			 timetoseg_set_clock();	
		}
		
	}
	 
}

7. Design information content list&&download link

Material design materials include simulation, program code, explanation videos, functional requirements, design reports, software and hardware design block diagrams, etc.

0. Common usage problems and solutions – a must-read! ! ! !

1. Simulation diagram

2. Program source code

3. Functional requirements

4. Explanation video

5. Burning tools

6. Proposal report

7. Design report

8. Software and hardware flow chart

Altium Designer installation crack

KEIL+proteus microcontroller simulation design tutorial

KEIL installation crack

Proteus component search

Proteus installation

Proteus simple use tutorial

Microcontroller learning materials

Puzhong-2&Puzhong-3&Puzhong-4 development board schematic diagram.pdf

Related data sheets

Defense skills

Common descriptions for design reports

Double-click the mouse to open the search for Jiasheng MCU 51 STM32 MCU course graduation project.url

Data download link:

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

Guess you like

Origin blog.csdn.net/weixin_52733843/article/details/134951133