【摘要】
本文是基于STC89C52单片机,片外配合SP20C-G501型电阻应变式传感器模块、HX711模数转换器模块、蜂鸣器报警模块、键盘模块、JLX12864液晶显示器模块、晶振电路模块以及电源模块来设计的一款电子秤。它采用自上而下的模块化设计,具有形象直观、操作简单、结构紧凑、重量测试快速准确等优点。能够对小型物体进行实时并且快速地重量测试、重量显示、重量超阀报警以及置零等功能。
【关键词】:STC89C52芯片;秤重传感器;AD转换器;显示电路;
ABSTRACT
The digital design of electronic scale is STC89C52 MCU, chip with type SP20C-G501 strain resistance sensor module, HX711 analog to digital converter module, buzzer alarm module, keyboard module, 12864 liquid crystal display module, crystal oscillator circuit module, reset circuit module and power module are integrated to form a digital electronic design.The digital electronic called design uses the modular design from top to bottom, has the advantages of visual image, simple operation, compact structure, fast and accurate test weight. The system can real-time for small objects and fast weight test, weight display, alarm valve set to zero weight ultra and other functions.
【Key words】 STC89C52 microcontroller;weighing sensor;AD converters;display circuit;
目录
一 引言…………………………………………………………………………………………………………….. 1
二 数字式电子秤的总体方案设计……………………………………………………………………. 1
(一)方案的选择………………………………………………………………………………………. 1
(二)系统总体设计方案……………………………………………………………………………. 2
三 电子秤的硬件设计………………………………………………………………………………………. 2
(一)STC89C52单片机主控模块………………………………………………………………. 2
(二)振荡电路模块…………………………………………………………………………………… 3
(三)普通电阻应变式传感器SP20C-G501………………………………………………….. 4
(四)HX711模数转换器模块……………………………………………………………………… 5
(五)蜂鸣器报警模块……………………………………………………………………………….. 5
(六)4×4键盘模块………………………………………………………………………………….. 6
(七)JLX12864液晶显示器模块………………………………………………………………… 7
四 系统软件设计……………………………………………………………………………………………… 8
(一)系统主程序流程图设计…………………………………………………………………….. 8
(二)系统子程序流程图设计…………………………………………………………………….. 9
五 系统实现及功能调试…………………………………………………………………………………. 10
(一)系统初始界面图……………………………………………………………………………… 10
(二)单价显示界面图……………………………………………………………………………… 10
(三)金额显示界面图……………………………………………………………………………… 11
(四)超重报警界面图……………………………………………………………………………… 11
六 总结…………………………………………………………………………………………………………… 12
致谢…………………………………………………………………………………………………………………. 13
参考文献…………………………………………………………………………………………………………. 13
附录一 原理图…………………………………………………………………………………………………. 14
附录二 元器件清单………………………………………………………………………………………….. 15
附录三 程序…………………………………………………………………………………………………… 16