#include
const unsigned char led_7[16]={0x3f,0x06,0x5b,
0x4f,0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,0x39,
0x5e,0x79,0x71};
unsigned char point_on=0;
void main(void)
{
unsigned int j;
unsigned char i=0;
PORTC=0XFF;
DDRC=0XFF;
while(1)
{
for(i=0;i<=15;i++)
{
PORTC=led_7;
if(point_on) PORTC|=0X80;
for(j=0;j<50000;j++);
}
point_on=~point_on;
}
}
仿真效果
文章评论(0条评论)
登录后参与讨论