新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 51單片機(jī)程序——讓點(diǎn)陣動(dòng)起來

51單片機(jī)程序——讓點(diǎn)陣動(dòng)起來

作者: 時(shí)間:2016-11-23 來源:網(wǎng)絡(luò) 收藏
#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);
}



關(guān)鍵詞: 51單片機(jī)點(diǎn)

評(píng)論


技術(shù)專區(qū)

關(guān)閉