void display(int T)
{
led_sel=0xef; //选通LED4 1
led_data=0x01;
delayms(1);
led_sel=0xf7; //3 灯 c
led_data=0x39;
delayms(1);
led_sel=0xfb; //2 灯 //小数位
led_data=0x3f;
delayms(1);
delayms(1);
led_sel=0xfe; //0 灯
led_data=Num[T/10];
delayms(1);
led_sel=0xef; //选通LED4 1
led_data=0x00;
delayms(1);
led_sel=0xef; //选通LED4 1
led_data=0x00;
delayms(1);
/* for(i=12;i>0;i--)
{ led_sel=0x00; //
led_data=0x00;
delayms(1);}*/
}
/*void displaymax(void)
{ int i;
for(i=12;i>0;i--)
{
led_sel=0xef; //选通LED4 1
led_data=0x01;
delayms(1);
led_sel=0xf7; //3 灯 c
led_data=0x39;
delayms(1);
led_sel=0xfb; //2 灯 //小数位
led_data=0x3f;
delayms(1);
led_sel=0xfd; //1 灯
led_data=Num[max%10]+128;
delayms(1);
led_sel=0xfe; //0 灯
led_data=Num[max/10];
delayms(1);
}
for(i=12;i>0;i--)
{ led_sel=0x00; //
led_data=0x00;
delayms(1);}
}
www.youerw.com
delayms(1);
led_sel=0xf7; //3 灯 c
led_data=0x39;
delayms(1);
led_sel=0xfb; //2 灯 //小数位
led_data=0x3f;
delayms(1);
led_sel=0xfd; //1 灯
led_data=Num[mid%10]+128;
delayms(1);
led_sel=0xfe; //0 灯
led_data=Num[mid/10];
delayms(1);
}
for(i=12;i>0;i--)
{ led_sel=0x00; //
led_data=0x00;
delayms(1);}
}
void displaymin(void)
{ int i;
for(i=12;i>0;i--)
{
led_sel=0xef; //选通LED4 3
led_data=0x08;
delayms(1);
led_sel=0xf7; //3 灯 c
led_data=0x39;
delayms(1);
led_sel=0xfb; //2 灯 //小数位
led_data=0x3f;
delayms(1);
led_sel=0xfd; //1 灯 //个位
led_data=Num[min%10]+128;
delayms(1);
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页