-
基于AT89S52的具有温度功能的电子万年历程序
资源介绍
#include
#include"ds1302.h"
#include"ds18b20.h"
#include"delay.h"
unsigned char duanx[16]={
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
0x08,0x18,0x28,0x38,0x48,0x58,0x68,0x78};//数码管段选编码
unsigned char weix[12]={
0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40,0x00};//数码管位选编码 0~9
unsigned char i,j;//循环控制变量
unsigned char xians[12]={0,0,0,0,0,0,0,0,0,0,0,0};//各数码管闪烁控制变量
unsigned char xians_flg[12]={0,0,0,0,0,0,0,0,0,0,0,0};//各数码管闪烁标志
unsigned char z_flg=0;//时间修改位标志位
unsigned char xiu_flg=0;//时间修改数标志位
unsigned char xiu_time[10]={0,0,0,0,0,0,0,0,0,0};//时间修改缓存
unsigned char nian_s[2]={2,0};//年号前两位
- 上一篇: myC:C ++
- 下一篇: stm32f407对ds18b20温度传感器数据的采集