单片机课程设计报告数字频率计详细程序.doc
文本预览下载声明
单片机课程设计报告
题 目: 数字频率计
院 (系): 电子工程与自动化学院
专 业: 自动化
学生姓名: ------
学 号: ----------
指导教师: -----
2011 年 1 月 15 日
摘 要
该系统以STC89S51单片机为核心, 应用单片机的运算和控制功能并采用 LCD 显示器实时地将所测频率显示出来, 通过测量结果对比,分析了测量误差的来源,提出了减小误差应采取的措施。频率计具有电路结构简单、 成本低、 测量方便、 精度较高等特点,适合测量低频信号。
关键词:单片机,频率测量
Abstract
The paper introduces one cymometer system Based on singlechip which applys the singlechip`s function of operation and control and displays the result by LCD. By comparing results, the source of measurement error is analysed, the measures are proposed for reducing errors. T he frequency meter has characteristics of simple circuit, low cost, easy measurement and high precision, it fits for measuring low frequency signals.
Key words : Singlechip,frequency- measure
引言………………………………………………………………1
1 课程设计概述…………………………………………………1
1.1 课程设计任务及要求……………………………………………….1
1.2 主要仪器…………………………………………………………….1
1.3 数字频率计概述.........................................1
1.4 测频基本设计原理.......................................2
2 方案论证..........................................2
2.1 总体方案................................................2
2.2 测频方案选择............................................3
3硬件设计……………………………………………………….3
3.1系统功能描述............................................3
3.2硬件电路设计框架……………………………………………………3
3.3单片机部分…………………………………………………………..4
3.4 放大整形部分…………………………………………………………4
3.5分频部分.................................................5
3.6 LCD显示和键盘部分……...................................6
4 软件设计……………………………………………………….6
4.1 主程序流程图设计……………………………………………………6
4.2 子程序流程图设计………………………………………………....7
4.2.1 显示程序……………………………………………………......7
4.2.2频率测量程序框图………………………………………….......8
4.2.3 中断服务流程图........................................8
5 系统调试……………………………………………………….9
5.1显示调试………………………………………………………….....9
5.2键盘调试………………………………………………………….....9
5.3前置放大整形调试…………………………………………………...9
5.4软件调试.................................................9
6结果分析与结论
显示全部