2013 届毕业设计说明书
科学计算器设计
系 、 部:电气与信息工程系 学生姓名:里福佳 指导教师:戴日光 职称 老师 专 业:电子信息工程技术 班 级:电信本0901班 完成时间:2012/5/13
摘 要
单片机由于其微小的体积和极低的成本,广泛的应用于家用电器、工业控制等领域中。在工业生产中。单片机微型计算机是微型计算机的一个重要分支,也是颇具生命力的机种。单片机微型计算机简称单片机,特别适用于控制领域,故又称为微控制器。
近年来,单片机以其体积小、价格廉、面向控制等独特优点,在各种工业控制、仪器仪表、设备、产品的自动化、智能化方面获得了广泛的应用。与此同时,单片机应用系统的可靠性成为人们越来越关注的重要课题。影响可靠性的因素是多方面的,如构成系统的元器件本身的可靠性、系统本身各部分之间的相互耦合因素等。其中系统的抗干扰性能是系统可靠性的重要指标。
计算器在人们的日常中是比较的常见的电子产品之一。在本次的毕业设计课题中,我以《MCS-51系列单片微型计算机及其应用》课程中所学知识为基础,设计了简易计算器。本系统以MCS-51系列中的8051单片机为核心,能够实现两位数的四则运算。该系统通过检测矩阵键盘扫描,判断是否按键,经数据转换把数值送入数码管动态显示。
关键词 :计算器,51单片机,液晶显示屏,独立键盘
ABSTRACT
Because of its small volume of single chip microcomputer and very low cost, widely used in home appliances, industry control, etc. In industrial production. Single chip microcomputers are microcomputer as an important branch, is also a vitality of the model. Single chip microcomputer hereinafter referred to as the single chip microcomputer, is particularly applicable to control field, so it is also called the micro controller. In recent years, microcontroller with its small size, inexpensive price, for the control and other unique advantages in a variety of industrial control, instrumentation, equipment, automation products, the
intelligentaspects of a wide range of applications. At the same time, the reliability of the system ofmicrocomputer application to become an important issue of growing concern. Affect thereliability of many factors, such as to constitute the components of the system's reliability,the system itself is all part of the coupling between factors.
Anti-interference performanceof the system which is an important
indicator of system reliability. One of the calculator inpeople's daily in common electronic products. Calculator students are familiar with each and every one of us, from junior high to high school and then to the University. In the graduation design topic, I with \series single chip computer and its application\the design the simple calculator. This system to MCS-51 of the 8051 series single chip microcomputer as the core, can achieve double-digit arithmetic. The system through the test matrix keyboard scan, judge whether key, the data transfer the numerical into digital tube dynamic display.
Key words Calculator; 51microcontroller; LCD display; separate
keyboard
目 录
1 方案论证与设计 .................................................. 1 1.1 设计目的与要求 ............................................... 1 1.2 方案论证与设计 ............................................... 1 2 硬件模块介绍 .................................................... 3 2.1 单片机(AT89S52) .............................................. 3 2.1.1 单片机(AT89S52)的引脚功能 ................................ 4 2.1.2 单片机(AT89S52)的引脚介绍 ................................ 5 2.1.3 单片机(AT89S52)的内部结构 ............................... 10 2.2 输入模块 .................................................... 11 2.3 输出模块 .................................................... 13 2.3.1 液晶介绍 ................................................ 13 2.3.2 液晶显示功能介绍 ........................................ 13 2.3.3 液晶显示的原理 ......................................... 14 2.3.4 12864液晶显示功能具体参数............................... 15 2.3.5 12864液晶显示并行接口................................... 16 2.3.6 控制器接口信号 .......................................... 17 2.3.7 字符显示 ................................................ 18 2.4 实物制作模块 ................................................ 19 3 软件设计......................................................... 21 3.1 软件总体设计 ................................................ 21 3.2 主程序流程图 ................................................ 21 3.3 键盘扫描及处理程序设计 ...................................... 22 3.4 中断子程序设计 .............................................. 23 3.5 液晶显示流程图 .............................................. 24 3.6功能实现详解 ................................................. 25 4.调试............................................................. 27 4.1 硬件调试 ..................................................... 27 4.2 软件调试 ..................................................... 27