毕业论文之单片机简易计算器 - C51 - MAX7219 - 图文 下载本文

计算器模拟系统的设计与制作

摘 要

当今社会,随着人们物质生活的不断提高,电子产品已经走进了家家户户,无论是生活或学习,还是娱乐和消遣几乎样样都离不开电子产品,大型复杂的计算能力是人脑所不能胜任的,而且比较容易出错。计算器作为一种快速通用的计算工具方便了用户的使用。而计算器是人们日常非常熟悉的一款电子产品,本设计着重在于分析计算器软件和开发过程中的环节和步骤,并从实践经验出发对计算器设计做了详细的分析和研究,

单片机已逐渐成为电子产品研制和开发中首选的控制器,它的应用越来越成为人们关注的焦点,本设计基于STC89C51单片机以及MAX7219数码管显示驱动来设计简易计算器。通过其他外围模块电路的设计,电源模块,单片机程序下载模块,蜂鸣器驱动模块,单片机最小系统的设计,MAX7219驱动电路,组成简易计算器。论文从设计要求出发,通过对每个方案的分析和研究,最终确立最佳方案。论文分析简易计算器模拟系统的设计过程,每个硬件模块的设计详情以及软件部分的设计详情,来阐述整个设计。最终根据设计方案,制作出实物。

关键词:单片机 STC89C51 MAX7219 数码管

i

DESIGN OF CALCULATER IMITATESAND

Abstract

Is social nowadays, continuously raise along with people's physical life, the electronics product has already walked into all families, regardless is life or study, is still that amusement and amusement almost and all everything can not get away from an electronics product, the large and complicated calculation ability is a person brain not competent for of, and a little bit easily come amiss.The calculator is a kind of quickly in general use calculation tool convenience the customer's use.But the calculator is a style of electronics product that acquaint with really everyday of people, this design emphasizes to lie in analyze calculator software and development process in of the link and the step, and from practiced experience to set out to do a detailed analysis and research to the calculator design,

The list slice machine has already become an electronics product to develop gradually and develop medium head the controller for choosing, its application more and more becomes the focus that people pay attention to, this design according to STC89 C51 list slice the machine and MAX7219 figures tube shows to drive to design simple calculator.Pass the design of other outer circle mold piece electric circuits, the power mold piece, the list slice machine procedure downloads a mold piece, the buzzer drives a mold piece, list the design of the slice machine's minimum system, the MAX7219 drives electric circuit and constitutes simple calculator.The thesis requests to set out from the design, passes the analysis to each project and research and finally establishes the best project.The thesis is analytical the simple calculator imitate the design process of system, the design detail of each hardware mold piece and the design detail of the software part, elaborate the whole design.Finally according to the design project, create a real object.

Keyword:Single-chip MCU STC89C51 MAX7219 Nixie tubu

ii

目 录

摘 要 ...................................................... I ABSTRACT ................................................... II 第一章 绪 论 .............................................. 1

1.1 1.2 1.3 第二章2.1 2.2 第三章第四章4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 第五章第六章第七章

研究单片机简易计算器的意义 .................................... 1 计算器的发展趋势 .............................................. 1 本文研究思路与安排 ............................................ 2

计算器模拟系统的设计与制作总体方案 .................. 3

使用到的工具软件 .............................................. 4 多个方案的对比 ................................................ 4

核心部分硬件仿真 ................................... 5 模块电路设计详解 ................................... 7

电源部分的设计 ................................................ 7 程序下载模块的设计 ............................................ 8 单片机最小系统的设计 ......................................... 10 时钟电路模块的设计。 ......................................... 12 复位电路模块的设计。 ......................................... 13 键盘扫描模块的设计。 ......................................... 14 显示电路模块的设计 ........................................... 16 更好的解决方案 ............................................... 18

硬件整体设计 ...................................... 20 软件部分的总体设计 ................................ 20 程序分模块设计 .................................... 21

iii

7.1 程序头 ....................................................... 21 7.2 延时子程序的设计 ............................................. 21 7.3 键盘扫描子程序 ............................................... 22 7.4 数据发送子程序 ............................................... 23 7.5 数据显示子程序 ............................................... 26 7.6 主函数 ....................................................... 27

第八章 总结与展望 ........................................ 28 参考文献 .................................................. 29 致 谢 .................................................... 30 附录1.硬件仿真图 .......................................... 31 附录2.硬件原理图和PCB图 .................................. 33 附录3.制作好的实物 ........................................ 35 附录4.程序清单 ............................................ 36

iv