新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 51單片機程序——讓點陣動起來

51單片機程序——讓點陣動起來

作者: 時間:2016-11-23 來源:網(wǎng)絡 收藏
#include
unsigned char code table[10]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
void Delay(unsigned int t);
void main (void)
{
unsigned char i;
P1 = 0xff;
while (1)
{
for(i=0;i<8;i++)
{
P0=table[i];
Delay(50000);
P0=0xff;
Delay(50000);
}
}
}
void Delay(unsigned int t)
{
while(--t);
}



關鍵詞: 51單片機點

評論


技術專區(qū)

關閉