【正文】
ansmitting and receiving control. Interrupt service routines from time to time to plete three of the rotation direction of ultrasonic launch, the main external interrupt service subroutine to read the value of pletion time, distance calculation, the results of the output and so on.. System initialization after the start timer T1 starts counting from 0 to enter the main program to wait for the T1 overflow into the T1 interrupt service routine when the time is reached。 calculate the time difference MOV 31H, A。s nature, size and distance from the sensor. Further, the time interval from the echo39。 第五步:發(fā)射兩串脈沖產生干擾波。 40kHz 脈沖的產生與超聲波發(fā)射 測距系統中的超聲波傳感器采用 UCM40 的壓電陶瓷傳感器,它的工作電壓是40kHz 的脈沖信號,這由單片機執(zhí)行下面程序來產生。由于參考的距離是眾所周知的聲速,比例反產出是利用數學以確定所期望的距離來衡量。 出版日期 : 1995 年 8月 15日 主審查員:羅保 .伊恩 j. 一、背景發(fā)明 本發(fā)明涉及到儀器的測量距離,最主要的是,這種儀器,其中兩點之間傳輸超聲波。不過,使用這種裝置并不利于本身的自動化技術發(fā)展。超聲波發(fā)生器內部結構如 下 所示,它有兩個壓電晶片和一個共振板。 超聲波的接收與處理 接收頭采用與發(fā)射頭配對的 UCM40R,將超聲波調制脈沖變?yōu)榻蛔冸妷盒盘?,經運算放大器 IC1A 和 IC1B 兩極放大后加至 IC2。 第六步:通過公式計算距離 y。 output 40kHz square wave nop。 T1 interrupt service routine will start a new ultrasonic transmitting, the square wave will be generated in the pin at the same time open the timer T0 timing, in order to avoid the diffraction of the direct wave, the delay 1ms and then, after the INT0 interrupt Enable。 read the time value MOV R6, TL0 CLR C MOV A, R6 SUBB A, 0BBH。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。根據第二部的數據設定時間窗。其中只畫出前方測距電路的接線圖,左側和右側測距電路與前方測距電路相同,故省略之。在每一個單位,脈沖提供一個反饋。該脈沖序列提供給各自的計數器,計數器的產出的比率,是用來確定被測量的距離。據了解,兩點之間的距離可以通過測量兩點之間的行波傳播時間的決定。 當它的兩極外加脈沖信號,其頻率等于壓電晶片的固有振蕩頻率時,壓電晶片將會發(fā)生共振,并帶動共振板振動,便產生超聲波。 IC2 是帶有鎖 定環(huán)的音頻譯碼集成塊 LM567,內部的壓控振蕩器的中心頻率 f0=1/,電容 C4 決定其鎖定帶寬。 四、超聲波測距系統的軟件設計 軟件分為兩部分,主程 序和中斷服務程序,如圖 3( a)( b) (c) 所示。 nop。 the INT0 interrupt to allow open, if thisoccurs when the low is representative of the received echo signal, the interrupt request to INT0 interrupt service routine, the INT0 interrupt service routine will stop the timer T0 timing, read the time value of T0 timer to the appropriate storage to receive a sign of success。 related external interrupt 0 MOV R7, TH0。s two plus pulse signal, the frequency equal to the intrinsic piezoelectric oscillation frequency chip, the chip will happen piezoelectric resonance, and promote the development of plate vibration resonance, ultrasound is generated. Conversely, if the two are not interelectrode voltage, when the board received ultrasonic resonance, it will be for vibration suppression of piezoelectric chip, the mechanical energy is converted to electrical signals, then it bees the ultrasonic receiver. The traditional way to determine the moment of the echo39。通過脈沖的周期設置下一個脈沖。電路原理圖如圖所示。 重復率脈沖是成反比關系之間的距離發(fā)射器和接收器。在每一個單位,重復的一系列脈沖的產生,每有一個重復率,直接關系到各自之間的距離,發(fā)射機和接收機。這樣的一個波浪型是一種超聲波,或聲波。反之,如果兩電極間未外加電壓,當共振板接收到超聲波時,將壓迫壓電晶片作振動,將機械能轉換為電信號,這時它就成為超聲波接收器了。調節(jié) R8 在發(fā)射的載頻上,則 LM567 輸入信號大于 25mV,輸出端 8腳由高電平躍變?yōu)榈碗娖?,作為中斷請求信號,送至單片機處理 。主程序完成初始化工作、各路超聲波發(fā)射和接收順序的控制。 nop。 main program detects reception hallmarks of success, the temperature subroutine is called, collecting the ambient temperature when the ultrasonic ranging, and converted the accurate speed of sound stored in RAM storage unit。 left Ranging entrance circuit interrupt service routine Ajmp Return 3, the calculation of ultrasonic propagation time When you start fi