文件名称:chashengboceju
介绍说明--下载内容来自于网络,使用问题请自行百度
AT89S52单片机控制的超声波测距,主程序首先对系统环境初始化,设置定时器T0工作模式为16位的定时计数器模式,置位总中断允许位EA并给显示端口P0和P2清0。然后调用超声波发生子程序送出一个超声波脉冲,为避免超声波从发射器直接传送到接收器引起的直接波触发,需延迟0.1ms(这也就是测距器会有一个最小可测距离的原因)后,才打开外中断0接收返回的超声波信号。由于采用12MHz的晶振,机器周期为1us,当主程序检测到接收成功的标志位后,将计数器T0中的数(即超声波来回所用的时间)按下式计算即可测得被测物体与测距仪之间的距离,设计时取20℃时的声速为344 m/s则有:
d=(C*T0)/2 =172T0/10000cm(其中T0为计数器T0的计数值)
测出距离后结果将以十进制BCD码方式LED,然后再发超声波脉冲重复测量过程-AT89S52 MCU-controlled ultrasonic ranging, the main program first initializes the system environment, set the timer T0 mode for 16-bit timer counter mode, the set EA and the total Interrupt Enable bit ports P0 and P2 to show clear 0. Then send a subroutine call occurs ultrasonic ultrasonic pulses, in order to avoid direct transmission of ultrasound from the transmitter to the receiver caused by the direct-wave trigger, must delay 0.1ms (This is the range-finder will have a minimum measurable distance reasons) after the Only open the external interrupt 0 to receive the returned ultrasonic signals. As a result of 12MHz crystal, the machine cycle 1us, when the main program detects that received flag of success, will be the counter of the number of T0 (ie, used ultrasound back and forth time) determined by the formula and the measured object can be measured measured from the distance between the instrument, designed to take 20 ℃ when the speed of sound is 344 m/s there are:
d = (C* T0)
d=(C*T0)/2 =172T0/10000cm(其中T0为计数器T0的计数值)
测出距离后结果将以十进制BCD码方式LED,然后再发超声波脉冲重复测量过程-AT89S52 MCU-controlled ultrasonic ranging, the main program first initializes the system environment, set the timer T0 mode for 16-bit timer counter mode, the set EA and the total Interrupt Enable bit ports P0 and P2 to show clear 0. Then send a subroutine call occurs ultrasonic ultrasonic pulses, in order to avoid direct transmission of ultrasound from the transmitter to the receiver caused by the direct-wave trigger, must delay 0.1ms (This is the range-finder will have a minimum measurable distance reasons) after the Only open the external interrupt 0 to receive the returned ultrasonic signals. As a result of 12MHz crystal, the machine cycle 1us, when the main program detects that received flag of success, will be the counter of the number of T0 (ie, used ultrasound back and forth time) determined by the formula and the measured object can be measured measured from the distance between the instrument, designed to take 20 ℃ when the speed of sound is 344 m/s there are:
d = (C* T0)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
test/cheshi/cheshi.OBJ
test/cheshi/cheshi.SRC
test/cheshi/cheshi._ia
test/cheshi/cheshi.__i
test/cheshi/STARTUP.obj
test/cheshi/tiaoshi
test/cheshi/tiaoshi.hex
test/cheshi/tiaoshi.lnp
test/cheshi/tiaoshi.plg
test/cheshi.c
test/cheshi.ls1
test/cheshi.LST
test/cheshi.OBJ
test/fdf.hex
test/fdf.lnp
test/fdf.M51
test/fdf.Opt
test/fdf.plg
test/fdf.Uv2
test/huibian/CFUNC.A51
test/huibian/CFUNC.c
test/huibian/CFUNC.ls1
test/huibian/CFUNC.LST
test/huibian/CFUNC.OBJ
test/huibian/CFUNC.__i
test/huibian/cs_t.a51
test/huibian/cs_t.LST
test/huibian/cs_t.OBJ
test/huibian/delay.a51
test/huibian/delay.LST
test/huibian/delay.OBJ
test/huibian/DISPLAY.a51
test/huibian/DISPLAY.LST
test/huibian/DISPLAY.OBJ
test/huibian/huibian
test/huibian/huibian.lnp
test/huibian/huibian.M51
test/huibian/huibian.Opt
test/huibian/huibian.plg
test/huibian/huibian.Uv2
test/huibian/laoshigeide
test/huibian/laoshigeide.c
test/huibian/laoshigeide.hex
test/huibian/laoshigeide.lnp
test/huibian/laoshigeide.LST
test/huibian/laoshigeide.M51
test/huibian/laoshigeide.OBJ
test/huibian/laoshigeide.Opt
test/huibian/laoshigeide.plg
test/huibian/laoshigeide.Uv2
test/huibian/lizhong.hex
test/huibian/lizhong.lnp
test/huibian/lizhong.M51
test/huibian/lizhong.Opt
test/huibian/lizhong.plg
test/huibian/lizhong.Uv2
test/huibian/lizhong1.plg
test/huibian/lizhong1122.plg
test/huibian/main.c
test/huibian/main.ls1
test/huibian/main.LST
test/huibian/main.OBJ
test/huibian/main.SRC
test/huibian/STARTUP.A51
test/huibian/STARTUP.LST
test/huibian/STARTUP.OBJ
test/huibian/ttpp
test/huibian/ttpp.hex
test/huibian/ttpp.lnp
test/huibian/ttpp.M51
test/huibian/ttpp.Opt
test/huibian/ttpp.plg
test/huibian/ttpp.Uv2
test/huibian/新建 文本文档.LST
test/huibian/李忠.c
test/huibian/李忠.LST
test/huibian/李忠.OBJ
test/shiyan.lst
test/shiyan.obj
test/shiyan.__i
test/STARTUP.A51
test/STARTUP.LST
test/STARTUP.OBJ
test/sy.bin
test/tiaoshi
test/tiaoshi.lnp
test/tiaoshi.M51
test/tiaoshi.Opt
test/tiaoshi.plg
test/tiaoshi.Uv2
test/yin
test/yin.c
test/yin.hex
test/yin.lnp
test/yin.LST
test/yin.M51
test/yin.OBJ
test/yin.Opt
test/yin.plg
test/yin.Uv2
test/新建 文本文档.c
test/新建 文本文档.ls1
test/新建 文本文档.LST
test/新建 文本文档.SRC
test/新建 文本文档.__i
test/新建文件夹.rar
test/cheshi
test/huibian
test
test/cheshi/cheshi.SRC
test/cheshi/cheshi._ia
test/cheshi/cheshi.__i
test/cheshi/STARTUP.obj
test/cheshi/tiaoshi
test/cheshi/tiaoshi.hex
test/cheshi/tiaoshi.lnp
test/cheshi/tiaoshi.plg
test/cheshi.c
test/cheshi.ls1
test/cheshi.LST
test/cheshi.OBJ
test/fdf.hex
test/fdf.lnp
test/fdf.M51
test/fdf.Opt
test/fdf.plg
test/fdf.Uv2
test/huibian/CFUNC.A51
test/huibian/CFUNC.c
test/huibian/CFUNC.ls1
test/huibian/CFUNC.LST
test/huibian/CFUNC.OBJ
test/huibian/CFUNC.__i
test/huibian/cs_t.a51
test/huibian/cs_t.LST
test/huibian/cs_t.OBJ
test/huibian/delay.a51
test/huibian/delay.LST
test/huibian/delay.OBJ
test/huibian/DISPLAY.a51
test/huibian/DISPLAY.LST
test/huibian/DISPLAY.OBJ
test/huibian/huibian
test/huibian/huibian.lnp
test/huibian/huibian.M51
test/huibian/huibian.Opt
test/huibian/huibian.plg
test/huibian/huibian.Uv2
test/huibian/laoshigeide
test/huibian/laoshigeide.c
test/huibian/laoshigeide.hex
test/huibian/laoshigeide.lnp
test/huibian/laoshigeide.LST
test/huibian/laoshigeide.M51
test/huibian/laoshigeide.OBJ
test/huibian/laoshigeide.Opt
test/huibian/laoshigeide.plg
test/huibian/laoshigeide.Uv2
test/huibian/lizhong.hex
test/huibian/lizhong.lnp
test/huibian/lizhong.M51
test/huibian/lizhong.Opt
test/huibian/lizhong.plg
test/huibian/lizhong.Uv2
test/huibian/lizhong1.plg
test/huibian/lizhong1122.plg
test/huibian/main.c
test/huibian/main.ls1
test/huibian/main.LST
test/huibian/main.OBJ
test/huibian/main.SRC
test/huibian/STARTUP.A51
test/huibian/STARTUP.LST
test/huibian/STARTUP.OBJ
test/huibian/ttpp
test/huibian/ttpp.hex
test/huibian/ttpp.lnp
test/huibian/ttpp.M51
test/huibian/ttpp.Opt
test/huibian/ttpp.plg
test/huibian/ttpp.Uv2
test/huibian/新建 文本文档.LST
test/huibian/李忠.c
test/huibian/李忠.LST
test/huibian/李忠.OBJ
test/shiyan.lst
test/shiyan.obj
test/shiyan.__i
test/STARTUP.A51
test/STARTUP.LST
test/STARTUP.OBJ
test/sy.bin
test/tiaoshi
test/tiaoshi.lnp
test/tiaoshi.M51
test/tiaoshi.Opt
test/tiaoshi.plg
test/tiaoshi.Uv2
test/yin
test/yin.c
test/yin.hex
test/yin.lnp
test/yin.LST
test/yin.M51
test/yin.OBJ
test/yin.Opt
test/yin.plg
test/yin.Uv2
test/新建 文本文档.c
test/新建 文本文档.ls1
test/新建 文本文档.LST
test/新建 文本文档.SRC
test/新建 文本文档.__i
test/新建文件夹.rar
test/cheshi
test/huibian
test
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.