1、基于单片机系统的电子秤设计 1 基于单片机的电子秤设计 摘摘 要要: :本设计以 51 系列单片机 STC89C52RC 为控制核心, 实现电子秤的基本控制 功能。在设计系统时,为了更好地采用模块化设计法,分步的设计各个单元功能 模块,系统的硬件部分可以分为最小系统、数据采集、人机交互界面(键盘以及显 示)和系统电源四大部分。最小系统部分为 STC89C52RC 系统;数据采集部分由压 力传感器、信号的前级处理和 A/D 转换部分组成,包括运算放大器 OP07 和 A/D 转换器 ADC0809;人机交互界面为键盘输入和数码管显示,主要使用 5X5 键盘、 CH423 数码管控制芯片及 13
2、位数码管显示,可以方便的输入数据并直观的显示重 量、单价和总价。系统电源是以 LM7805、 LM7812 为核心设计电路以提供系统 正常工作电源。软件部分应用单片机 C51 语言进行编程,实现了该设计的基本控 制功能。该电子秤可以实现基本的称重功能(称重范围为 010Kg,重量误差不大 于0.02Kg),重量、单价、总价的计量可以精确到两位小数,键盘设置有数字键 ( 09 、 . ) 、储存键、单价 1单价 8 调用单价键、清除键、去皮键等; 发挥部分有 8 种不同物品的单价记忆功能、99 种消费商品价格累计功能、 ;待发挥 部分为讲电子秤与打印机连接,能打印消费记录(小票) ,超量程和欠量
3、程的报警 功能。本系统结构简单,使用方便,功能齐全,精度高,具有一定的开发价值。 关键词:关键词:单片机 采样电路 A/D 转换器 CH423 数码管驱动芯片 数码管显示 工作 电源 基于单片机系统的电子秤设计 2 the design of electronic scales based on Single-chip Microcomputer ABSTRACT :The design for the control of 51 computers STC89C52RC the core, to achieve the basic control functions of electroni
4、c scales. In designing the system, in order to better modular design, the design of each unit step function modules, the system can be divided into the minimum hardware system, data acquisition, man-machine interface (keypad and display) and the system power 4 most. Minimum system partly STC89C52RC system; data collection in part by the pressure sensor, signal processing and the first class A / D conversion components, including the operational amplifier OP07 and the A / D converter