鉴于大家对自动化PLC相关毕业设计十分关注,我们编辑小组在此为大家搜集整理了“基于单片机的数字式频率计软件设计”一文,供大家参考学习
论文编号:DQ199 论文字数:12659,页数:43
摘 要
数字频率计是计算机、通讯设备、音频视频等科研生产领域不可缺少的测量仪器,其基本功能是测量正弦信号、方波信号及其他各种周期信号的频率及周期参数,并采用十进制数字显示被测量参数,具有测量迅速、精度较高、显示直观等优点。本文基于单片微处理器及其外围电路,设计制作一个频率测量系统,主要研究程序设计实现方法。设计思想采用定时、计数的方法实现对周期信号的频率测量,然后通过进制转换并运用LED显示器动态显示4位频率参数,其测量范围为1Hz-10kHz。程序采用汇编语言,主要通过伟褔编译器编写。实际运行表明,所设计的系统运行正常,结果正确。同时,通过对输入信号的波形整形可实现对各种周期性变化信号的频率及周期参数测量,若配以适当的传感器,本系统也可实现多种非电量周期信号参数的测量,如机械振动的频率,转速,声音的频率等。
关键词: 数字频率计系统,单片机系统,系统设计,软件设计
Abstract
The digital frequency meter is essential metering equipment in the production field of computer, communication equipment, audio frequency and video frequency, its basic function is measure sinusoidal signal, the square-wave signal and any other periodic signal frequency and the cyclical parameter. The digital frequency meter demonstrate the measured parameter by decimal, so it has many advantages like rapidly measure、high precision and Visual display.Now we based on the single-chip microprocessor and some peripheral circuit to design and produce a frequency measurement system, and mainly research the part of programmer. The main design idear is used by timing and counting to realize the measurement of periodic signal ''''s frequency, and then through the M-ary conversion and use of the LED display to dynamicly display four frequency parameters, and the measurement range is 1Hz-10kHz.The programme use of assembly language, and mainly used by preparation of the compiler-wei Fu. Practical operation show that the designed system is running normally,and the results is correct. In the orthe side, it can measure the frequency and cycle parameters of a variety of cyclical changes signall through shaping the input signa''''s waveform, if accompanied a appropriate sensors, the system can also measure various non-periodic signal parameters, such as mechanical vibration frequency, speed and sound frequency.
Key words:Digital frequency meter system,Single-chip microcomputer system,System Design,Software Design
目 录
摘要 Ⅰ
1 前言 1
1.1 数字频率计研究的意义与目的 1
1.2 数字频率计的现状和发展前景 1
1.3 数字频率计设计的工作内容 3
2主要硬件简介 4
2.1 AT89S51单片机 4
2.2 触发器 6
2.3 译码器 6
3数字频率计硬件设计 9
3.1 频率计的工作原理 9
3.2频率计的系统级框图 9
3.3数字频率计硬件设计原理 9
3.3.1输入单元 10
3.3.2 显示单元 10
3.3.3 引脚图 11
3.3.4 功能表 11
3.4 系统总设计 12
4 数字频率计软件系统设计 14
4.1系统软件的设计的基本原理 14
4.1.1 系统软件的设计的总原理及总框图 14
4.1.2定时循环的程序设计框图 15
4.1.3 进制转换 17
4.1.4 数码显示 19
4.1.5频率计系统总体程序 25
4.2 程序的调试 25
4.3 单片机仿真器简介 27
5总结 28
致谢 29
参考文献 30
附录 系统总程序 31