摘要
针对在单片机湿度测量系统中,将湿度传感器HS1101和555组成振荡器的输出计频后,按技术手册给定的频率-湿度关系,为达到理想的转换精度,设计了几种将频率转换为湿度的算法以及实现该算法相应的C51源程序,在KEIL C软件环境下,进行编译并仿真运行,通过监视反汇编、性能分析等观察窗口,对生成代码长度、执行效率进行了具体分析比较,指出了在C51编程提高程序运行性能方面,应引起重视的算法和一些技术性问题。
This article designs several algorithms of the conversion between frequency and humidity with reference to the fixed relation of the tow elements stated in the technical manual to achieve the desired accuracy of the conversion,and provides a realization of these types of algorithms corresponding C51 source program. These algorithms apply to the microcontroller humidity measurements system in which the frequency of the output of the oscillator consisted of humidity sensor and 555 is counted. Apart from it, through the adoption of software KEILC,after compiler and simulation, the length of Generation code, executive efficiency have been compared and analyzed specificly while surveillance of the observation window. And some technical problems about the efficienal processing of C51 which should be stressed on are also pointed out in the article.
出处
《现代电子技术》
2008年第24期184-186,共3页
Modern Electronics Technique