《传感器世界》月刊2023年 单价¥20.00/册,全年价:¥240.00,邮发代号:82-694。
用户名: 密码:    注册                       首页 | 网站简介 | 联系我们 | 收藏本站 | 会员服务 | 广告服务 | 投稿须知
gksens
 |   |   |   |   |   |   |   |     
热门产品 :  
 | 压力  | 温度  | 湿度  |   | 力矩  | 位移  | 速度  | 加速度  | 物位  | 姿态  | 流量  | 气体  | 图像  | 开关  | 特殊专用
       会员发布 :    | 产品信息 | 招聘信息 | 展会信息
 | 供应信息  | 求购信息  | 招标信息  | 代理信息  | 合作信息
 
 
 
基于单总线协议的温湿度传感器中断读取方法的研究2021年08月12
   栏目: 信号与系统
  文章内容

作者:夏铁铮1,于虹博2
单位:1. 哈尔滨芯明天科技有限公司,黑龙江哈尔滨 150080;
      2. 黑龙江外国语学院,黑龙江哈尔滨,150025
中图分类号:TP274                
文献标识码:A             
文章编号:1006-883X(2020)09-0033-06
收稿日期:2020-07-06

摘要:本文介绍了一种采用外部中断结合定时器控制的单总线传感器读写方法,该方法避免了传统阻塞读取方式中的系统资源长期占用。在需要长时间参数监测的应用中,能够有效利用系统资源,避免了阻塞过程中外部IO和通讯信号进入后的处理滞后甚至遗漏,也避免了因为不确定的中断服务程序(ISR)造成了输出波形周期和脉宽的波动,避免了因为脉宽波动过大引起的通讯失败,具有稳定性高、占用资源少、无阻塞和定时精确的优点,有效提高了新型MCU的利用率,降低不必要的时间开销,更符合MCU应用高速化和实时性的趋势。本方案均通过实验验证并应用于批量产品中,具有实际的工程意义。
关键词:单总线;温湿度传感器;单片机;AM2302

Research on Interrupt Reading Method of Temperature and Humidity Sensor Based on Single Bus Protocol
XIA Tie-zheng 1, YU Hong-bo 2
1. Harbin Core Tomorrow Science & Technology Co., Ltd., Harbin 150080, China; 2. Heilongjiang International University, Harbin 150025, China
Abstract: A method of reading and writing one-wire bus sensor controlled by external interrupt combined with timer is introduced in this paper. The long-term occupancy of system resources in traditional blocking reading mode is avoided during this method. In applications requiring long-time parameter monitoring, system resources can be effectively utilized and processing lag or even omission after external IO and communication signals entered the blocking process can be avoided. The fluctuation of output waveform cycle and pulse width which is caused by uncertain interrupt service program (ISR), the communication failure which is caused by excessive pulse width fluctuation also can be avoided. With the advantages of high stability, low resource consumption, no blocking and accurate timing, effectively improves the utilization rate of new MCU, unnecessary time overhead is reduced, and the schemes was made more in line with the trend of MCU high speed and real-time performance. The schemes have been validated experimentally and applied in batch products, which has practical engineering significance.
Key words: one-wire bus; temperature and humidity sensor; MCU; AM2302

阅读全文


备注:2020年 第26卷 第09期
 

 
文章编号:提交者:jenny点击次数:【482
友情链接
     
传感器世界 中国知网  自动化网 传感器英才网 中华自动化 北京国科舰航 控制工程网
中国传感器交易网 中国电气论坛  华强电子网  维库仪器仪表网     

传感器信息港版权所有 2010 京ICP备05033269号-1010-64878218,64870295