標(biāo)題: proteus單片機仿真技術(shù)跑馬燈 [打印本頁]

作者: hsw2017    時間: 2017-12-9 14:49
標(biāo)題: proteus單片機仿真技術(shù)跑馬燈
#include <reg51.h>
void Delay();
void main()
{
    unsigned char i;
    unsigned char temp;
    P0 = 0xff;
    while(1)
    {
        temp=0x80;
        for(i=0;i<8;i++)
        {
            P0=~temp;
            Delay();
            temp=temp>>1;
        }
    }
}

void Delay()
{
    unsigned char i,j;
    for(i=0;i<255;i++)
      for(j=0;j<255;j++);
}

屏幕截圖(1539).png (108.58 KB, 下載次數(shù): 124)

屏幕截圖(1539).png

跑馬燈.rar

8.65 KB, 下載次數(shù): 6, 下載積分: 黑幣 -5


作者: yudejiyi89    時間: 2017-12-23 20:34
謝謝大神




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