|
單只數(shù)碼管顯示0到9
內(nèi)附原理及程序圖
HMVI5CTSN`R$%W0EIL3S_7U.png (11.41 KB, 下載次數(shù): 37)
下載附件
2019-6-15 13:28 上傳
NBN{~C_((330Q4_}GOG6A_L.png (13.56 KB, 下載次數(shù): 42)
下載附件
2019-6-15 13:29 上傳
單只數(shù)碼管循環(huán)顯示0-9.zip
(41.81 KB, 下載次數(shù): 18)
2019-6-15 13:30 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
源程序:
#include<reg51.h>
unsigned char code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
void Delaylms(unsigned int g)
{
unsigned int i,j;
for(i=0;i<g;i++)
for(j=0;j<120;j++);
}
void main()
{
unsigned int w;
while(1)
{
P2=0xff;
for(w=0;w<10;w++)
{
P0=table[w];
Delaylms(500);
}
}
}
|
|