自动售货机是劳动密集型的产业构造向技术密集型社会转变的产物。作为一种聪明的商业售货设备,控制系统是其最核心的部分。本文设计了一款可实现货币识别、商品选择、缺货提醒、缺币提醒、硬币找零、准确出货、金额显示和语音提示警报等
功能的控制系统。并着重于该控制系统的硬件选择、电路设计等内容。
以单片机MSP430f149为核心设计;以MDB为通信协议;使用3×4矩阵键盘作为输入设备,并扩展TC2002型字符液晶模块和ZY1730语音模块作为人机接口设备。
关键词:自动售货机;单片机;C51;MDB
Vending machine construction industry is labor-intensive to technology-intensive product of social change. As a smart business vending equipment, the control system is the most core part. This article is designed to achieve a currency recognition, product selection, out alerts, missing credits reminder, coin changer, accurate delivery, the amount display and voice prompts alarm control systems and other functions. And focus on the control system hardware selection, circuit design, and more.
MSP430f149microcontroller as the core design; with MDB communications protocols; using 3×4 matrix keyboard as an input device, and TC2002 extended character type LCD module and ZY1730 voice module as a human interface device.
Key words: automatic vending machine; SCM; C51; MDB
引言·································· 1
第1章 控制系统总体方案的概述····················· 2
1.1自动售货机的工作时序······················ 2
1.2控制系统的硬件需求分析····················· 2
1.3控制系统的软件需求分析····················· 3
第2章 控制系统的硬件设计······················· 5
2.1 硬件设计概述·························· 5
2.2 中央处理器模块························· 5
2.2.1微控制器的选择······················ 5
2.2.2微控制器MSP430f149的介绍················· 5
2.2.3时钟电路························· 6
2.2.4复位电路························· 7
2.3 键盘输入模块·························· 8
2.5 MDB货币识别模块························ 9
2.5.1MDB/ICP协议介绍······················ 9
2.5.2MDB通信接口电路······················ 9
2.6电机驱动模块·························· 11
2.6.1J-3F075M型驱动器介绍··················· 11
2.6.2接线端子说明······················· 11
2.7液晶显示模块·························· 12
2.8语音模块···························· 13
第3章 控制系统的软件设计······················· 15
3.1软件设计概述·························· 15
3.2 键盘输入程序························· 17
3.3 MDB程序设计·························· 17
3.3.1MDB通信程序设计····················· 17
3.3.2MDB外设简介······················· 19
3.3.4纸币器会话程序设计···················· 20
3.4 字符型液晶模块程序设计···················· 20
3.4.1基本操作时序······················· 20
3.4.2指令描述(其中,L=0,H=1,X=0/1)············ 22
3.4.3初始化流程························ 24
3.5 语音模块的程序设计······················ 24
3.5.1 SPI接口说明······················· 25
3.5.2 SPI串行接口协议····················· 25
3.5.3 SPI串行接口指令····················· 25
第四章 结论与展望··························· 28
参考文献······························· 29
致谢································· 31