用中断功能实现期时钟.docVIP

  • 3
  • 0
  • 约4.42千字
  • 约 8页
  • 2019-08-10 发布于江苏
  • 举报
运行时: 源代码如下: #includereg51.h #includeabsacc.h #includeintrins.h #define uchar unsigned char #define uint unsigned int sbit P07=P0^7; sbit p10=P1^0; sbit p11=P1^1; sbit p12=P1^2; sbit p13=P1^3; sbit p14=P1^4; sbit p15=P1^5; sbit p16=P1^6; sbit p17=P1^7; //------------------------------------------------------ uchar table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; uchar count; uint dis=0;//闪烁 uint y,m,c;//为求星期而定义的 uchar flag,TD,ADD; //------------------------------------------------------ struct //定义日期时间结构 { uint sec,min,hour; uint day,mon,year; uint week; }time={0,0,0,27,4,2010,0

文档评论(0)

1亿VIP精品文档

相关文档