1024手机基地看电影,午夜福利视频导航,国产精品福利在线一区,亚洲欧美日韩另类成人,在线观看午夜日本理论片,成年超爽免费网站,国产精品成人免费,精品动作一级毛片,成人免费观看网站,97精品伊人久久大香蕉

標題: 我的動態數碼管試驗,有C語言源程序,請指點 [打印本頁]

作者: zhoujianhua212    時間: 2018-8-24 10:54
標題: 我的動態數碼管試驗,有C語言源程序,請指點
#include "reg51.h"
#include "intrins.h"
#define smguan P0
sbit relay=P1^4;
typedef unsigned char u8;
typedef unsigned int u16;
//u8 code smgduan[16]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0xf8,
//0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};        //共陽
u8 code smgduan[16]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,
0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}; //共陰
void delay(u16 i)
{
while(i--);
}
void main()
{
u8  i;
  smguan=~smgduan[0];
while(1)
{
for(i=0;i<0x10;i++)
{
smguan=~smgduan[i];
delay(50000);
}  
}
}






歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1