void xianshi() //显示
{
//volatile unsigned char xs_a1,xs_a2,xs_a3; //显示用(全局变量)
unsigned char xs_b1;
led_wei1 =1;
led_wei2 =1;
led_wei3 =1;
if(xs_a1 & 1<<0){led_a =1;} else{led_a =0;}
if(xs_a1 & 1<<1){led_b =1;} else{led_b =0;}
if(xs_a1 & 1<<2){led_c =1;} else{led_c =0;}
if(xs_a1 & 1<<3){led_d =1;} else{led_d =0;}
if(xs_a1 & 1<<4){led_e =1;} else{led_e =0;}
if(xs_a1 & 1<<5){led_f =1;} else{led_f =0;}
if(xs_a1 & 1<<6){led_g =1;} else{led_g =0;}
if(xs_a1 & 1<<7){led_h =1;} else{led_h =0;}
led_wei1 =0;
led_wei2 =1;
led_wei3 =1;
for(xs_b1=225;xs_b1>0;xs_b1--);
|