亚洲春色中文字幕久久久-三上亚,一吻二脱三床四吻胸,国产真实伦对白视频全集,在线毛片观看,精品成品入口黄网,国产毛aⅴ片久久久,亚洲AV色香蕉一区二区三区老师,萧皇后A级艳片,色情日本视频更新,99久久亚洲精品日本无码

標題: 16個led的51單片機跑馬燈 [打印本頁]

作者: 717472741    時間: 2017-10-14 20:40
標題: 16個led的51單片機跑馬燈
代碼
#include <reg51.h>
void time(unsigned int ucMs);//函數聲明
void main(void)
{
unsigned char  ucTimes;
#define DELAY_TIME 450
  while(1)
{
   P1=0xff;
   P0=0xff;
   for(ucTimes=0;ucTimes<8;ucTimes++){
    P0 = P0 - (0x01<<ucTimes);time(DELAY_TIME);}
for(ucTimes=0;ucTimes<8;ucTimes++){
    P1 = P1 - (0x01<<ucTimes);time(DELAY_TIME);}
        P1=0xff;
   P0=0xff;
for(ucTimes=0;ucTimes<8;ucTimes++){
    P1 = P1 - (0x80>>ucTimes);time(DELAY_TIME);}
for(ucTimes=0;ucTimes<8;ucTimes++){
    P0 = P0 - (0x80>>ucTimes);time(DELAY_TIME);}
}}
void time(unsigned int ucMs)
{
#define DELAYTIMES 239
unsigned char ucCounter;
while(ucMs!=0) {
  for(ucCounter=0; ucCounter<DELAYTIMES; ucCounter++) { }
  ucMs--;
  }
}

跑馬燈.zip

36.3 KB, 下載次數: 13, 下載積分: 黑幣 -5






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