1024手机基地看电影,午夜福利视频导航,国产精品福利在线一区,亚洲欧美日韩另类成人,在线观看午夜日本理论片,成年超爽免费网站,国产精品成人免费,精品动作一级毛片,成人免费观看网站,97精品伊人久久大香蕉
標題:
AT89C51 60s倒計時
[打印本頁]
作者:
SUPERCHIGGA
時間:
2018-4-26 11:12
標題:
AT89C51 60s倒計時
#include <at89x51.h>
#define uchar unsigned char
uchar display[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
void yan10ms();
void main()
{
uchar i,n;
for(i=24;i>0;i--)
{
for(n=50;n>0;n--)
{
if(i/10==0)
{P0=0xff;}
else
{P2_1=0;P2_0=1;P0=display[i/10];}
yan10ms();
P2_0=0;P2_1=1;P0=display[i%10];yan10ms();
}
P3_0=0;yan10ms();P3_0=1;
}
P2_0=0;P2_1=1;P0=display[0];P3_0=0; while(1);
}
void yan10ms() //10ms
{
uchar i,j;
for(j=20;j>0;j--)
{for(i=250;i>0;i--);}
}
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1