Stc98c52, one of the STC series single-chip computers, is highly praised for its multi-function and practicability, and widely used by the electronic design enthusiasts. The ranging system of this experiment is mainly realized by hc-sr04 ultrasonic sensor and STC89C52 single chip microcomputer. The principle is: set the alarm distance value of the main controller STC89C52, then compare the set value with the distance between the object measured by the ultrasonic sensor and the object in front, and then carry out the corresponding processing, judgment and comparison. If the final buzzer beeps due to the control of the main controller, it means that the measured distance value is smaller than the set value. Using ultrasonic distance measurement has the following advantages: it can measure the distance conveniently, quickly and simply; it can easily realize the real-time detection and control of the experimental data. Through the design of ultrasonic rangefinder based on single-chip microcomputer, I have deepened my understanding of the principle of single-chip microcomputer and its application in practice. In this experiment, the design of the whole ultrasonic rangefinder is realized, which includes the ultrasonic transmitting circuit, digital display circuit, MCU main control circuit and receiving circuit, and an alarm circuit is added.<br>
正在翻译中..