#include 《reg52.h》
#include 《intrins.h》
#define uchar unsigned char
#define uint unsigned int
sbit IO =P3^0;
sbit CLK =P3^1;
sbit RST =P3^2;
sbit TEMP1 =P3^6;
sbit TEMP2 =P3^7;
sbit K1 =P1^0;
sbit K2 =P1^1;
sbit K3 =P1^2;
sbit K4 =P1^3;
uchar n=0;
uchar set=0;
uchar seting;
uchar DateTime[]={14,3,1,1,12,34,56};
// 年周月日 时 分 秒
uchar DSP_NUM[]={0,0,11,0,0,11,0,0};
uchar code DSP_CODE[]={
0xC0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff,0xbf,0xb7,0x9c,0xc6,0x92,0x86,0x87};
// 0 1 2 3 4 5 6 7 8 9 空 - = o C S E t
// 0 5 10 15
void DelayMS(uint ms) //毫秒延时
{
uchar t;
while(ms--){
for(t=120;t》0;t--);
}
}
void DelayUS(uint us) //微秒延时
{
uchar t;
for(t=us;t》0;t--);
}
void WriteData(uchar x,y) // 单字节写子程序
{
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部1条评论
快来发表一下你的评论吧 !