【正文】
me time will surpass the threshold at different moments. The stronger one will surpass the threshold earlier than the weaker, so it will be considered as belonging to a nearer object. principle of ultrasonic distance measurement Ultrasonic transmitter in a direction to launch ultrasound, in the moment to launch the beginning of time at the same time, the spread of ultrasound in the air, obstacles on his way to return immediately, the ultrasonic reflected wave received by the receiver immediately stop the clock. Ultrasound in the air as the propagation velocity of 340m / s, according to the timer records the time t, we can calculate the distance between the launch distance barrier (s), that is: s = 340t / 2 Ranging System for the Second Circuit Design System is characterized by singlechip microputer to control the use of ultrasonic transmitter and ultrasonic receiver since the launch from time to time, singlechip selection of 8751, economictouse, and the chip has 4K of ROM, to facilitate programming. Circuit schematic diagram shown in Figure 2. 11 Figure 1 circuit principle diagram 40 kHz ultrasonic pulse generated with the launch Ranging system using the ultrasonic sensor of piezoelectric ceramic sensors UCM40, its operating voltage of the pulse signal is 40kHz, which by the singlechip implementation of the following procedures to generate. puzel: mov 14h, 12h。s arrival is based on thresholding the received signal with a fixed reference. The threshold is chosen well above the noise level, whereas the moment of arrival of an echo is defined as the first moment the echo signal surpasses that threshold. The intensity of an echo reflecting from an object strongly depends on the object39。s lives. Mobile robots designed to clear the drainage culvert and the automatic control system Free sewage culvert clear guarantee robot, the robot is designed to clear the culvert sewage to the core. Control System is the core ponent of the development of ultrasonic range finder. Therefore, it is very important to design a good ultrasonic range finder. 2. A principle of ultrasonic distance measurement The principle of piezoelectric ultrasonic generator 10 Piezoelectric ultrasonic generator is the use of piezoelectric crystal resonators to work. Ultrasonic generator, the internal structure as shown, it has two piezoelectric chip and a resonance plate. When it39。1 AT89C2051 Microcontroller Instructions Features ? Compatible with MCS51 Products ? 2 Kbytes of Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles ? V to 6 V Operating Range ? Fully Static Operation: 0 Hz to 24 MHz ? TwoLevel Program Memory Lock ? 128 x 8Bit Internal RAM ? 15 Programmable I/O Lines ? Two 16Bit Timer/Counters ? Six Interrupt Sources ? Programmable Serial UART Channel ? Direct LED Drive Outputs ? OnChip Analog Comparator ? Low Power Idle and Power Down Modes Description The AT89C2051 is a lowvoltage, highperformance CMOS 8bit microputer with 2 Kbytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high density nonvolatile memory technology and is patible with the industry standard MCS51 instruction set and pinout. By bining a versatile 8bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microputer which provides a highly flexible and cost effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2 Kbytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16bit timer/counters, a five vector twolevel interrupt architecture, a full duplex serial port, a precision analog parator, onchip oscillator and clock circuitry. In addition, the AT89C2051 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The 2 Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power Down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. Pin Configuration Pin Description VCC Supply voltage. GND Ground. Port 1 Port 1 is an 8bit bidirectional I/O port. Port pins to provide internal pullups. and require external pullups. and also serve as the positive input (AIN0) and the negative input (AIN1), respectively, of the onchip precision analog parator. The Port 1 output buffers can sink 20 mA and can drive LED displays directly. When 1s are written to Port 1 pins, they can be used as inputs. When pins to are used as inputs and are externally pulled low, they will source current (IIL) because of the internal pullups. Port 1 also receives code data during Flash programming and program verification. Port 3 Port 3 pins to , are seven bidirectional I/O pins with internal pullups. is hardwired as an input to the output of the onchip parator and is not accessible as a general purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that 3 are externally being pulled low will source current (IIL) because of the pullups. Port Pin Alternate Functions RXD (serial input port) TXD (serial output port) INT0 (external interrupt 0) INT1 (external interrupt 1) T0 (timer 0 external input) T1 (timer 1 external input) Port 3 also serves the functions of various special features of the AT89C2051 as listed below: Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an onchip oscillator, as shown in Figure 1. Either a quartz crystal