摘要
笔者设计了基于STC89C52单片机的纸张计数显示装置。系统采用单片机STC89C52作为控制核心,实现通过555振荡电路获取频率值,应用单片机的控制功能和数学运算能力,实现计数和频率换算,用液晶1602显示测试张数并用蜂鸣器发出提示音。测频的基本方法是通过555振荡器以及单片机的定时计数器计数获得频率值,采用最小二乘法进行线性回归,得到1~10张纸的计算公式,通过二次函数回归,得到15张纸以上的计算公式。另外,本系统采用分段回归,具有良好的精度和可靠性,人机交互界面良好,测试模块设有按键并通过液晶显示,性能好,反应速度快。
The paper counting display device based on STC89C52 is designed.The system uses STC89C52 as the control core to obtain the frequency value through 555 oscillation circuit,uses the control function and mathematical operation ability of single chip computer to realize the counting and frequency conversion,displays the number of test sheets with liquid crystal 1602 and sends out the prompt tone with buzzer.The basic method of frequency measurement is to obtain the frequency value by counting the 555 oscillator and the timing counter of the single chip microcomputer,and to use the least square method for linear regression to obtain the calculation formula of 1-10 sheets of paper,and to obtain the calculation formula of more than 15 sheets of paper by quadratic function regression.In addition,the system adopts subsection regression,with good accuracy and reliability,good human-computer interface,test module with keys and LCD display,good per formance,fast response.
作者
李红
Li Hong(School of Computer Information Engineering,Shanxi Technology and Business College,Taiyuan Shanxi 030100,China)
出处
《信息与电脑》
2019年第22期39-41,共3页
Information & Computer
基金
山西工商学院校级课题资金资助项目“线上线下教学模式在项目化教学中的应用与研究——以数据结构课程为例”(项目编号:201983)
关键词
单片机
555振荡器
最小二乘法
二次函数回归
single chip microcomputer
555 oscillator
least square method
quadratic function regression