没有合适的资源?快使用搜索试试~ 我知道了~
于基单片机简易计算器的设计--毕业设计.doc
0 下载量 186 浏览量
2023-07-12
01:07:12
上传
评论
收藏 692KB DOC 举报
温馨提示
试读
33页
于基单片机简易计算器的设计--毕业设计.doc
资源推荐
资源详情
资源评论
本科生毕业论文(设计)
基于单片机简易计算器的设计
学 院 电气信息工程学院
专 业 电气工程及其自动化
班 级 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-chip computer technology developing rapidly in recent years, among them,electronic
product update speed is fast. The calculator is one of the electronic products are common 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 microcomputer 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, multiply and divide operation
process and result, this is the computer's design process.
Key words: Single chip microcomputer; The C language; Calculating machine
目 录
序言 .............................................................1
1. 方案论证 ......................................................1
1.1 芯片 .................................................................1
1.1.1 方案一 .........................................................................................................................................1
1.1.2 方案优点 .....................................................................................................................................2
1.2 输入模块 .............................................................2
1.2.1 方案一 .........................................................................................................................................2
1.2.2 方案的优点 .................................................................................................................................2
1.3 显示模块 .............................................................2
1.3.1 方案一 .........................................................................................................................................2
1.3.2 方案的应用 .................................................................................................................................3
2. 计算器硬件设计 ................................................3
2.1 系统组成及硬件框图 ...................................................3
2.2 元器件简介 ...........................................................3
2.2.1 STC89C52 特点 ...........................................................................................................................3
2.2.2 LCD1602 液晶显示屏 .................................................................................................................8
3. 计算器设计原理分析 ...........................................11
3.1 设计方案一 ..........................................................11
3.2 计算器硬件方案及硬件资源分配 ........................................11
3.2.1 硬件资源分配 ...........................................................................................................................11
3.2.2 系统的硬件设计 .......................................................................................................................11
3.2.3 键盘电路的设计 .......................................................................................................................12
3.2.4 显示电路的结构 .......................................................................................................................13
4. 计算器软件设计 ...............................................14
4.1 计算器的软件规划 ....................................................14
4.2 主模块的程序设计 ....................................................14
4.3 显示模块的程序设计 ..................................................15
4.4 键盘模块的程序设计 ..................................................17
结 论 ...........................................................19
参考文献 ........................................................20
附录一 电路原理图 ...............................................21
附录二 软件程序 .................................................21
剩余32页未读,继续阅读
资源评论
xinkai1688
- 粉丝: 322
- 资源: 8万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功