CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 嵌入式/单片机编程 单片机(51,AVR,MSP430等)

文件名称:chashengboceju

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2012-11-16
  • 文件大小:
    169.58kb
  • 已下载:
    2次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

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)
(系统自动生成,下载前可以参看下载内容)

下载文件列表

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

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com