文档介绍:本科生毕业论文(设计)
基于STC89C52单片机简易计算器的设计
学院电气信息工程学院
专业电气工程及其自动化
班级 09级电气四班
学号 0612090533
学生姓名
联系方式
指导教师罗书克职称: 讲师
2013年 5月
摘要
近几年单片机技术的发展很快,其中,电子产品的更新速度迅猛。计算器是日常生活中比较常见的电子产品之一。如何才能使计算器技术更加的成熟,充分利用已有的硬件和软件条件,设计出更出色的计算器。
本设计是以STC89C52单片机为核心的计算器模拟系统设计,输入采用4*4矩阵键盘,可以进行加、减、乘、除带符号数字运算(六位整数、两位小数),并在液晶显示屏LCD1602上静态显示操作过程及结果。本设计的操作过程是利用SCTT89C51的来控制LXD1602显示器,SCT89C51有共四个端口,作为数据的输入端和输出端,其中两个端口作为输出端,两个端口作为输出端,两个特殊的端口XTAL2和XTAL1,则作为外部振荡器的输入端和输出端。四个端口的作用是:一个输入端接4*4矩阵键盘,另一个数据输入端接显示屏LCD1602的三个特殊端口,而另外两个端口作为输出端口,一个端口接显示屏LCD1602的数据端口,另一个端口作为振荡电路的输入端和输出端,连接好电路,接通电源,则可在液晶显示屏LCD1602显示加、减、乘、除的运算过程及结果,这是计算机的设计总过程。
关键词:单片机;C语言;计算器
Simple calculator design based on single chip
ABSTRACT
Single-puter technology developing rapidly in recent years, among them,electronic product update speed is fast. The calculator is one of the electronic products mon in everyday life. How can you make the calculator technology more mature, make full use of existing hardware and software conditions, design a better calculator.
This design is based on STC89C52 single-chip puter as the core of calculator simulation system design, input use 4 * 4 matrix keyboard, could add, subtract, multiply and divide signed number-crunching six (integer, two decimal places), and static on the LCD display LCD1602 display operation process and results. This design process is controlled by using SCTT89C51 LXD1602 display, SCT89C51 has a total of four ports, as the data input terminal and output terminal, two of the port as the output side, the two ports as the output side, and two special port XTAL1 and XTAL2, as external oscillator input end and output end. Four port is: a 4 * 4 matrix keyboard input, another data input termination display LCD1602 three specific ports, and the other two ports as output port, a port display LCD1602 data port, another port as oscillation circuit input end and output end, good connection electric circuit, switch on the power, can be in the LCD display LCD1602 display of add, subtract, mu