求US-100(模块)超声波测距的C语言程序,基于51单片机的,3Q哦~_百度知 ...答:include <reg51.h> define uchar unsigned char define uint unsigned int unsigned char code smg[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e,0x00};sbit tr=P1^0;sbit ec=P1^1;uint distance,time,tl,th;void delay_20us(void ...
51单片机控制的超声波测距仪程序答:define ulong unsigned long sbit Tx = P3^3; //产生脉冲引脚 sbit Rx = P3^2; //回波引脚 uchar code SEG7[10]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90};//数码管0-9 uint distance[4]; //测距接收缓冲区 uchar ge,shi,bai,temp,flag,outcomeH,outcomeL,i...