单片机60秒倒计时程序文件.pdfVIP

  • 102
  • 0
  • 约小于1千字
  • 约 2页
  • 2021-10-26 发布于江苏
  • 举报
#includereg52.h #define uchar unsigned char #define uint unsigned int uchar code table[]={ 0x3f,0x06,0x5b,0x4f, 0x66,0x6d,0x7d,0x07, 0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,0x71}; uchar tt,shuz,shi,ge; main() { void fenli(); TMOD=0x01; EA=1; ET0=1; TH0=(65536-50000)/256; TL0=(65536-50000)%256; shuz=60; P2=0xfc; TR0=1; while(1) { P2=0xfe; P0=table[shi]; if(tt==20) { tt=0; shuz--; if(shuz==60) { shuz=0; } fenli(); } P2=0xfd; P0=table[ge]; if(tt==20) { tt=0; shuz--; if(shuz==60) { shuz=0; } fenli(); } } } void time0() in

文档评论(0)

1亿VIP精品文档

相关文档