#include <reg52.h>
typedef unsigned char u8;
typedef unsigned int u16;
unsigned char smg [11]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88};
void delay(u16 i)
{
while(i--);
}
void main()
{
unsigned char i;
while(1)
{
for(i=0;i<11;i++)
{
P0=smg[i];
delay(100000000);
}
}
}
(4)单片机静态数码管
最新推荐文章于 2022-07-11 17:43:05 发布