基于c51功能最全的电子钟程序lcd1602(编辑修改稿)内容摘要:
har(6,1,timestr[4])。 LCD_write_mand(0xc0+6)。 13 while(!key3)。 } } break。 case 3: if(0 == key2) //时加 1 的设置 { Delay1Ms(5)。 if(0 == key2) { hour++。 while(!key2)。 if(24 == hour) { hour = 0。 } timestr[1] = hour%10+39。 039。 timestr[0] = hour/10+39。 039。 LCD_write_char(2,1,timestr[0])。 LCD_write_char(3,1,timestr[1])。 LCD_write_mand(0xc0+3)。 } } if(0 == key3) //时减 1 的设置 { Delay1Ms(5)。 if(0 == key3) { while(!key3)。 hour。 if(hour 0) { hour = 23。 } timestr[1] = hour%10+39。 039。 timestr[0] = hour/10+39。 039。 LCD_write_char(2,1,timestr[0])。 LCD_write_char(3,1,timestr[1])。 LCD_write_mand(0xc0+3)。 } } break。 14 case 4: if(0 == key2) //日加 1 的设置 { Delay1Ms(5)。 if(0 == key2) { while(!key2)。 calculate = 1。 if(calculate == 1) { if(month==1|month==3|month==5|month==7|month==8|month==10|month==12) { day++。 if(day 31) { day=1。 } } if(month==4|month==6|month==9|month==11) { day++。 if(day 30) { day=1。 } } if(month == 2) { cal_year = 1。 while(cal_year == 1) { leap_year = ((year % 4 == 0 amp。 amp。 year % 100 != 0)||(year % 400 == 0))。 cal_year = 0。 } if(leap_year==1) { day++。 if(day 30) { day=1。 } 15 } else { day++。 if(day 29) { day=1。 } } } calculate = 0。 } daystr[9] = day%10+39。 039。 daystr[8] = day/10+39。 039。 LCD_write_char(10,0,daystr[8])。 LCD_write_char(11,0,daystr[9])。 LCD_write_mand(0x80+11)。 } } if(0 == key3) //日减 1 的设置 { Delay1Ms(5)。 if(0 == key3) { while(!key3)。 calculate = 1。 if(calculate == 1) { if(month==1|month==3|month==5|month==7|month==8|month==10|month==12) { day。 if(day == 0) { day=31。 } } if(month==4|month==6|month==9|month==11) { day。 if(day == 0) { 16 day=30。 } } if(month == 2) { cal_year = 1。 while(cal_year == 1) { leap_year = ((year % 4 == 0 amp。 amp。 year % 100 != 0)||(year % 400 == 0))。 cal_year = 0。 } if(leap_year==1) { day。 if(day == 0) { day=30。 } } else { day。 if(day == 0) { day=29。 } } } calculate = 0。 } daystr[9] = day%10+39。 039。 daystr[8] = day/10+39。 039。 LCD_write_char(10,0,daystr[8])。 LCD_write_char(11,0,daystr[9])。 LCD_write_mand(0x80+11)。 } } break。 case 5: if(0 == key2) //月加 1 的设置 { 17 Delay1Ms(5)。 if(0 == key2) { while(!key2)。 month++。 if(13 == month) { month = 1。 } daystr[6] = month%10+39。 039。 daystr[5] = month/10+39。 039。 LCD_write_char(7,0,daystr[5])。 LCD_write_char(8,0,daystr[6])。 LCD_write_mand(0x80+8)。 } } if(0 == key3) //月减 1 的设置 { Delay1Ms(5)。 if(0 == key3) { while(!key3)。 month。 if(month == 0) { month = 12。 } daystr[6] = month%10+39。 039。 daystr[5] = month/10+39。 039。 LCD_write_char(7,0,daystr[5])。 LCD_write_char(8,0,daystr[6])。 LCD_write_mand(0x80+8)。 } } break。 case 6: if(0 == key2) //年加 1 的设置 { Delay1Ms(5)。 if(0 == key2) { while(!key2)。 18 year++。 } daystr[3] = year%10+39。 039。 daystr[2] = year/10%10+39。 039。 daystr[1] = year/100%10+39。 039。 daystr[0] = year/1000+39。 039。 LCD_write_char(2,0,daystr[0])。 LCD_write_char(3,0,daystr[1])。 LCD_write_char(4,0,daystr[2])。 LCD_write_char(5,0,daystr[3])。 LCD_write_mand(0x80+5)。 } if (0 == key3) //年减 1 的设置 { Delay1Ms(5)。 if(0 == key3) { while(!key3)。 year。 if(year == 0) { year = 2020。 } daystr[3] = year%10+39。 039。 daystr[2] = year/10%10+39。 039。 daystr[1] = year/100%10+39。 039。 daystr[0] = year/1000+39。 039。 LCD_write_char(2,0,daystr[0])。 LCD_write_char(3,0,daystr[1])。 LCD_write_char(4,0,daystr[2])。 LCD_write_char(5,0,daystr[3])。 LCD_write_mand(0x80+5)。 } } break。 case 7: if(0 == key2) //星期加 1 的设置 { Delay1Ms(5)。 if。基于c51功能最全的电子钟程序lcd1602(编辑修改稿)
相关推荐
1 0 1: 2 0 21 0 1x f ( 27)1 2 1: 0 0 01 2 1y f ( 28) Sobel 算子的优缺点:该算子的优点是,计算较快,且较为简单;缺点:该算子只采用了水平和垂直两个方向的模板,对于一些图像结构较为复杂和纹理较多的图像,其检测效果较差,不能精准的检测出所有边缘。 Prewitt 边缘检测 2,23
是否开始记录时间。 当 sp=0 时,开始记录时间。 当时间达到足够长时产生 timecount 脉冲,并重新计时。 一个 timecount 脉冲相当于等待的时间达到了时间计费的长度。 计费模块:由两个进程组成。 其中,一个进程根据条件对 enable 和 price 赋值,当记录的距离达到 3 公里后 enable 变为 1,开始进行每公里收费,当总费用大于 20元后,则单价 price
summary. System testing is mainly used to test method and the deductive method, and in individual months of hard work and instructs under teacher39。 s help, through debugging, the success of
结构( Client/Server,客户端 /服务器模式),它是一种软件系统体系结构,通过它可以充分利用两端硬件环境的优势,将任务合理的分配到 Client 端和 Server 端来实现,降低了系统 的通信开销。 C/S 结构的优点是能充分发挥客户端 PC 的处理能力,很多工作可以在客户端处理后在提交给服务器,对应的优点就是客户端响应速度快。 毕节学院本科毕业论文(设计) 9
格的类型安全以及可提高安全性和可靠性的其他形式的代码准确性。 事实上,代码管理的概念是运行库的基本原则。 以运行库为目标的代码称为托管代码,而不以运行库为目标的代码称为非托管代码。 .NET Framework 的另一个主要组件是类库,它是一个综合性的面向对象的可重用类型集合,您可以使用它开发多种应用程序,这些应用程序包括传统的命令行或图形用户界面 (GUI) 应用程序,也包括基于
.NET Framework 概述 .NET Framework 它 是 基 于 .NET 平台的编程 方式 , 其 公 用 语言运行库 包括CLR, Common Language Runtime 和 .NET Framework 类库 、 和 Windows 窗体 [7]。 它提供了托管执行环境、简化 了 开发 及 部署 而且集成了 各种编程语言。 .NET Framework 实现 了