基于单片机的计算器
电子工程专业学生勾艳玲
指导教师曾实现
摘要:本设计采用单片机作为控制芯片,用C语言对其进行编程实现,输入由4*4矩阵式键盘控制,输出采用人性化的SBY12864K-ZK型液晶实现。该计算器为多功能计算器,在未进行计算时,它是一个万年历时钟,并且带脑钟和星期显示,所以数据均可随时进行校准,校准数据采用的是独立式键盘,是将4*4矩阵式键盘的一根线拉低,然后读取与这根线交叉的4根线的所处状态来判断按键是否被按下,而这4个按键中只有3个按键用于万年历的校准和对脑钟的控制,另一个按键则用来切换进入计算模式。
对于计算这个部分我采用的是矩阵键盘,10个数字键,一个小数点键,四个符号键,一个多功能键,通过判别该多功能键连续按的次数来决定该键此时的命令。由于C语言库函数繁多,所以我采用调用C语言库函数来解决多种运算类型,这样编程更简单,运行起来也更可靠。。
关键字:单片机,点阵图形液晶,矩阵键盘,C语言库函数。
Title(3号Times New Romar)
Student majoring in ×××× Name
Tutor Name(小四Times New Romar)
Abstract: The design uses a single-chip puter as the control chip, using C programming language of its input from 4 * 4 matrix keyboard control, the output of the use of human SBY12864K-ZK-type liquid crystal to achieve. Multi-function calculator for the calculator, before the calculation, it is a calendar clock and bell and weeks with the brain showed that there may at any time calibration data, calibration data is used in stand-alone keyboard, is a 4 * 4 matrix keyboard down one line, and then read with the root of the cross-line 4-line state to determine which button has been pressed, which is only four keys for the three calendar button calibration and the control of the brain clock, and the other button is used to switch into the mode of calculation.
For this part of the calculation I used the keyboard matrix, 10 numeric keys, a decimal point key, four symbol keys, a multi-function keys, multi-function through the identification of the row by the number of keys to determine the order of the key at this time. C language library function as a result of many, so I used to call C language library function to solve a wide range of operator types, such programming is much simpler, it is also more reliable.
Keywords: Single-chip, dot-matrix graphic LCD, matrix keyboard, C language library function.
引言说起计算器,值得我们骄傲的是,最早的计算工具诞生在中国。中国古代最早采用的一种计算工具叫筹策,又被叫做算筹。这种算筹多用竹子制成,也有用木头,兽骨充当材料的。约二百七十枚一束,放在布袋里可随身携带。直到今天仍在使用的珠算盘,是中国古代计算工具领域中的另一项发明,明代时的珠算盘已经与现代的珠算盘几乎相同。17世纪初,西方国家的计算
基于单片机的论文 来自淘豆网m.daumloan.com转载请标明出处.