当前位置:
文档之家› 基于单片机的电子秤设计毕业论文
基于单片机的电子秤设计毕业论文
Key words:electronic scale; SCM;1602LCD;singlekeyboard
第1章绪论1
1.1选题背景与意义1
1.2电子秤的研究现状及发展趋势1
1.3本设计的主要工作2
第2章系统方案设计3
2.1电子秤的设计要求3
2.2系统工作原理3
2.3系统方案选择3
2.4各功能模块的分析与选型4
本设计以51系列单片机AT89S52为控制核心,实现电子秤的基本功能,即准确采集物体的质量,直观显示重量、单价及总价,并可对不同物品的重量、单价进行调整,此外系统还具有超量程报警功能。显示部分采用的是1602液晶显示器,运用独立式键盘实现重量、单价的调整和切换显示功能。软件设计以C语言作为编程语言,采用模块化编程思想,在Keil uVision开发环境下编写应用程序,结合硬件电路做整体调试,最终实现了所设计功能。整个系统结构简单、使用方便、功能齐全、精度高,具有一定的实用价值。
2.4.1单片机的选择4
2.4.2按键的选择5
2.4.3输出模块的选择6
2.4.4报警模块的选择6
2.5编程语言及开发工具选择6
2.5.1编程语言的选择6
2.5.2开发环境的选择7
2.6本章小结7
第3章系统软件设计8
3.1 AT89S52的介绍8
3.2主程序设计10
3.2.1函数声名以及变量定义10
商用电子秤的设计
摘要
在日常生活中,经常需要测量物体的质量,测量的准确性从而显得很重要。称重技术的改革影响着人民的生活,随着计量技术和电子技术的发展,以前常用的纯机械结构的杆秤、台秤等存在不精确、速度慢、不能计价易作弊等问题,已逐步被电子产品替代。本次电子秤设计将运用单片机来完成,具有小型化、智能化、准确度高等特点。
3.2.2主程序设计思想11
3.3按键处理程序12
3.3.1按键介绍12
3.3.2按键设计14
3.4显示子程序设计15
3.4.1 1602液晶简介15
3.4.2液晶显示子程序19
3.5报警子程序设计21
The design for the control of 51 computers AT89S52 core, to achieve the basic control functions of electronic scales.measuring the weight exactly、displaying the weight and unit price exactly、displaying the total price exactly、displaying the unit price after adjusting the unit price、displaying the unit weight after adjusting the unit weight.the displaying way is base on1602 LCD display.Stand-alone keyboard unit price and the weight adjustment.independent button control the changing which between the status.I select C language to be programme language,and compile the program inthe condition of Keil uVision. The designadopt the modularization programming and debug the program combine to hardware circuit.I analyse the cause of error and resolving thought in designning process,and finish the basic functions of electronic scale. The system at weighinghas also super-range alarm. The whole system is simple, easy to use, fully functional, highprecision, with somePracticalvalue.
关键词:电子gn ofCommercialElectronic Scales
ABSTRACT
In our daily life,we usually measure somethings’wight.The accuracy of measurement seem to be very important.The reform in weighting technology is affecting our life. With the development of measurement technology and electronics,the traditional mechanical steelyard which we used previously are sifted out step by step.Because the problem which including inaccuracy、slow、valuation or easy to cheating can be resolved by electronic products.The design is based on programming of SCM,then it can transform products to be minitype、modularization and intelligentize,the technical function of products become faster、more accurate and more reliable.