51 超声波 数码管显示距离 #include #include #define uchar unsigned char #define uint unsigned int sbit P0_1=P0^1; sbit P0_2=P0^2; uint time=0,timer=0; uchar posit=0; unsigned long S=0; bit flag =0; uchar const discode[] ={ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40,0x