成人免费无码不卡毛片,亚洲AⅤ无码精品一区二区三区,国产尤物精品视频,久久精品日本亚洲,欧美成人一区三区无码乱码A片,中文字日产幕码一区二区色哟哟,亞洲日韓中文字幕網AV

  • 方案介紹
  • 附件下載
  • 相關(guān)推薦
申請入駐 產(chǎn)業(yè)圖譜

基于51單片機的電子鬧鐘設(shè)計

2024/12/18
2338
加入交流群
掃碼加入
獲取工程師必備禮包
參與熱點資訊討論

有需要資料的可了解一下.docx

共1個文件

功能:

1.可以 年 月 日 時 分 秒顯示和鬧鐘功能 能通過8個按鍵自由調(diào)整 時 分 秒 鬧鐘響鈴時間。

2.帶復(fù)位按鍵,要是模塊抽風(fēng),摁復(fù)位按鍵即可!

3.使用 LCD16020A 屏幕顯示 屏幕電路設(shè)有電位器,可以調(diào)整清自由屏幕晰度。

#include "Buzzer.h"


void Buzzer(unsigned int Xms)
{
	unsigned int i;
	for (i = 2*Xms; i > 0; i--)
	{
	BUZZ = !BUZZ;
	Delay384us();
//	Delay(1);
	}
	for (i = Xms; i > 0; i--)
	{
	BUZZ = !BUZZ;
//	Delay500us();
	Delay500us();
	}		
}

void Delay769us()		//@12.000MHz
{
	unsigned char i, j;

	_nop_();
	i = 2;
	j = 123;
	do
	{
		while (--j);
	} while (--i);
}

void Delay1ms()		//@12.000MHz
{
	unsigned char i, j;

	i = 2;
	j = 239;
	do
	{
		while (--j);
	} while (--i);
}

void Delay384ms()		//@12.000MHz
{
	unsigned char i, j, k;

	_nop_();
	i = 3;
	j = 236;
	k = 13;
	do
	{
		do
		{
			while (--k);
		} while (--j);
	} while (--i);
}

void Delay500us()		//@12.000MHz
{
	unsigned char i;

	_nop_();
	i = 247;
	while (--i);
}

void Delay384us()		//@12.000MHz
{
	unsigned char i;

	_nop_();
	i = 189;
	while (--i);
}





/**
  * @brief  獨立按鍵——普中開發(fā)板
  * @param  無
  *     @arg  
  * @retval 按鍵序號
  */
#include"Key.h"
#include"Delay.h"

unsigned char Key_Scan()
{
	unsigned char KeyNum = 0;
	
  if ( 0 == Key1)
	{
		Delay(10);
		if (0 == Key1)
		{
			KeyNum = 1; //鍵值編碼,賦鍵值,不直接做按鍵功能
		}  while (0 == Key1); 
	}
	if ( 0 == Key2)
	{
		Delay(10);
		if (0 == Key2)
		{
			KeyNum = 2; //鍵值編碼,賦鍵值,不直接做按鍵功能
		}  while (0 == Key2); 
	}
	if ( 0 == Key3)
	{
		Delay(10);
		if (0 == Key3)
		{
			KeyNum = 3; //鍵值編碼,賦鍵值,不直接做按鍵功能
		}  while (0 == Key3); 
	}
	if ( 0 == Key4)
	{
		Delay(10);
		if (0 == Key4)
		{
		  	KeyNum = 4; //鍵值編碼,賦鍵值,不直接做按鍵功能
		}  while (0 == Key4); 
	}
	if ( 0 == Key5)
	{
		Delay(10);
		if (0 == Key5)
		{
		  	KeyNum = 5; //鍵值編碼,賦鍵值,不直接做按鍵功能
		}  while (0 == Key5); 
	}
	if ( 0 == Key6)
	{
		Delay(10);
		if (0 == Key6)
		{
		  	KeyNum = 6; //鍵值編碼,賦鍵值,不直接做按鍵功能
		}  while (0 == Key6); 
	}
	if ( 0 == Key7)
	{
		Delay(10);
		if (0 == Key7)
		{
		  	KeyNum = 7; //鍵值編碼,賦鍵值,不直接做按鍵功能
		}  while (0 == Key7); 
	}
	if ( 0 == Key8)
	{
		Delay(10);
		if (0 == Key8)
		{
		  	KeyNum = 8; //鍵值編碼,賦鍵值,不直接做按鍵功能
		}  while (0 == Key8); 
	}
	return KeyNum;
}

資料借鑒于此?紛傳

  • 有需要資料的可了解一下.docx
    下載

相關(guān)推薦

东丰县| 汪清县| 崇州市| 城口县| 林甸县| 玉山县| 阜阳市| 静乐县| 鸡泽县| 淳安县| 平泉县| 彭山县| 资源县| 宁蒗| 浮梁县| 竹溪县| 桂阳县| 尤溪县| 大宁县| 德钦县| 鄂尔多斯市| 东平县| 东阿县| 东乡县| 信阳市| 栖霞市| 佳木斯市| 邵武市| 华阴市| 龙里县| 大理市| 仙桃市| 平潭县| 泰州市| 苍梧县| 来安县| 庆云县| 宁化县| 舒兰市| 兴业县| 兴城市|