1、 本 科 毕 业本 科 毕 业 论 文论 文 (2012 届)届) 题题 目目 单片机脉冲计数电路设计 学学 院院 理学院 专专 业业 应用物理专业 班班 级级 学学 号号 学生姓名学生姓名 指导教师指导教师 完成日期完成日期 摘 要 随着单片机技术和电子技术的不断发展(单片机在医学仪器领域得到广泛应用, 其在 生物医学信号处理和控制中发挥着越来越重要的作用。各种生物医学信号经过放大、滤 波等处理后(可将模拟信号转换为数字信号送到单片机处理(此外还可以通过单片机根 据处理结果对医疗仪器进行控制)。可以更精确简单便携的检测脉搏、心跳、血压等数 据。因此本论文所做脉冲计数系统采用了以单片机(PIC
2、16F877A)为核心,结合相关 的外围元器件例如六位8段数码管、复位电路,再配以相应的软件,达到制作简易脉冲 计数器的目的。以C语言为程序设计的基础,利用PIC单片机独有的CCP捕捉模式能实现 脉冲的检测计算,频率实时显示在数码管上。 关键词: PIC16F877A;CCP 捕捉模式;脉冲;C 语言 ABSTRACT With the single chip microcomputer technology and electronic technology development of microcomputer in the medical instrument (was widely
3、used in the, in the biomedical signal processing and control a more and more important role in biological medicine. Various signal amplified, filtering processing (analog signal after can be converted to digital signals to SCM processing (also can through the MCU according to deal with the results o
4、f the medical instrument control). It will be more accurate, simple and portable for the detection of heart beating, blood pressure and pulse data. This research of the digital clock with the single chip processor (PIC16F877A) as the core, combining related peripheral components such as six 8 period
5、 of digital tube and reset circuit, matching again with the corresponding software to create a simple counter to the purpose of the pulse. C language program is designed for the foundation, PIC microcontroller unique CCP capture mode is used to realize pulse test calculation, frequency real-time dis
6、play in digital tubes. Keywords: PIC16F877A;CCP Capture mode;Pulse;C Language 杭州电子科技大学本科毕业论文 目目 录录 引 言 . 1 第一章 方案选择 2 1.1 脉冲检测方案 2 1.2 显示方案 2 1.3 编程语言选择方案 2 第一章 系统设计 4 2.1 总体设计 . 4 2.2 主控制模块的方案选择与设计 4 2.3 芯片介绍 4 2.3.1 基本介绍 4 2.4 主控模块电路 . 10 2.5 数码管显示电路设计 . 11 2.6 Protel99SE 设计 . 11 第三章 软件设计 . 13 3.1 编程语言的选择 . 13 3.2 程序设计 . 13 3.2.1 程序流程图 . 13 3.2.2 CPP 捕捉中断函数 . 14 3.2.3 初始化函数 . 14 3.2.4 BCD 转化函数 17 3.2.5 延时函数 . 18 第四章 选材及应用软件 . 20 4.1 制作选材 . 20 4.1.1 硬件选材 . 20 4.1.2 电路制作 . 20 4.2