|
- #include<reg52.h>
- unsigned char code table[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,};//顯示數(shù)字1-9
- void Delay(unsigned int t);//函數(shù)聲明(就是這里不知道什么)
- void main (void)
- {
- unsigned char i;//定義一個無符號型局部變量i取值范圍0-255
- while(1)
- {
- for(i=0;i<10;i++)
- {
- P2=table[i]; //循環(huán)調(diào)用表中的數(shù)值
- Delay(50000);
- }
- }
- }
- void Delay(unsigned int t)
- {
- while(--t);//這個也不知道是什么東東
- }
復(fù)制代碼 |
|