河南理工大学毕业设计(论文)说明书
摘要
本文设计了一种基于PC机与单片机构成的串口无线通讯方案,研究了实用的基于RS-232 串口的通信协议,并利用无线模块nRF905,探讨了FSK等调制方式。通过对方案的设计,可以利用单片机与PC机组建成低成本、可控性强、使用灵活的控制系统,在工程控制方面体现出单片机较PLC的优势,同时也可以由多台单片机构成无线通信网络,为通讯提供无线方案,并且降低了网络的开发成本,这为个人组建合适的通讯网络提供可行性方案。上位机控制平台采用DELPHI开发工具进行编写,所使用的DELPHI编程工具具有开发效率高、入门容易、开发周期短等特点,较之VB优势明显,更贴近英语格式。因控制系统需要根据具体的应用环境,本文只介绍了简单的事例应用,控制简单的单片机输入输出端口。
根据设计要求和功能实现,模拟调试了控制台控制终端,编写了控制台的
串口通讯控制软件,调试实现了串口通讯和无线通讯的结合,实现了理想的控制命令,介绍了编码方法以及在实验中运用了单片无线芯片。介绍了无线模块的设计及其应用电路的设计要求,阐述了串口无线通讯在控制中的运用,并且展望了串口无线通讯的发展与未来无限通讯的发展趋势。本文还提出了方案的二次开发和高级应用,为二次开发提供了软硬件的接口,实现了知识应用及专业技能的培养,为串口通讯提供了新的方向及发展前景。
关键词:RS-232; DELPHI;nRF905; AVR-MCU; 无线通讯电路
- 1 -
河南理工大学毕业设计(论文)说明书
Abstract
In this paper,the serial wireless-comunication which bassed on practical RS-232
serial
communication
protocol,
is
constituted
by
Personal
Computer-software and MCU, and using of wireless modules nRF905, which researchs FSK modulation and so on. The design of the program can be used to unit a systerm,which is controllability, flexible useful and controllable, with Microprocesser and Personal computer. It will no only reflect the advantages of Microprocesser than the PLC in engineering cyberne, but also can be constituted by numbers of Microprocesser with wireless communications chip to build a network communication program. The design provide a wireless programme, and reduce developing costs. It also provide a feasibility programme which is suitable for building private communication network.. Personal computer contol platform is built by DELPHI programming environment, which is used easily, high efficient, short development cycle and so on. The programming environment has many advantages than Visual Bassic programming environment, and it is more close to English. Because of cybernetic systerm being built bassing on practical application environment, The design only introduces a simple example application.
According to demant of design and function realization, the design simulated and debuged control platform and terminate-controlled, programmed control platform software by serail communication. The design carries out a programme which is combined by serial communication and wireless communication. It achieves ideable control command, and introduces the method coding. It is also experimented by using of a single-chip wireless chip and the function of wireless module circuit. The design advanced second-exploit and advantage application, provided second-exploit software and hadware interface. It also educated speciality knowledge and skills, exhibited programming software.
Keywords: RS-232; DELPHI; nRF905; AVR-MCU;
wireless-communication
- 2 -
河南理工大学毕业设计(论文)说明书
目 录
1 绪论 .................................................... - 1 -
1.1设计的背景和现状 ................................... - 1 - 1.2设计要求及目的 ..................................... - 2 - 1.3方案可行性分析 ..................................... - 2 - 2 系统概述 ................................................ - 3 -
2.1 串口通讯原理 ...................................... - 3 -
2.1.1 串口信号线的接法 ............................. - 3 - 2.2 数字信号调制解调方式介绍 .......................... - 4 -
2.2.1 ASK幅移键控法 ............................... - 5 - 2.2.2 PSK相移键控法 ............................... - 6 - 2.2.3 FSK频移键控法 ............................... - 6 - 2.2.4 QAM正交幅度调制法 ........................... - 7 - 2.2.5 MSK最小移频键控法 ........................... - 7 - 2.2.6 GMSK高斯滤波最小移频键控法 .................. - 8 - 2.3 系统框图 .......................................... - 8 - 2.4 上位机设计原理 .................................... - 9 -
2.4.1编译环境 ..................................... - 9 - 2.4.2上位机编写原理 .............................. - 12 -
第3章 各功能部件硬件设计 ................................ - 14 -
3.1 无线模块设计及应用 ............................... - 14 - 3.2 单片机串口通讯模块设计 ........................... - 16 - 3.3 演示电路工作原理及设计 ........................... - 20 - 4 软件流程设计 ........................................... - 22 -
4.1 上位机软件设计 ................................... - 22 - 4.2 单片机软件设计 ................................... - 23 - 4.3 无线模块驱动原理 ................................. - 25 -
- 3 -
河南理工大学毕业设计(论文)说明书
4.3.1 Shock Burst TX模式 ......................... - 26 - 4.3.2 ShockBurst RX模式 .......................... - 28 - 4.3.3曼彻斯特编码 ................................ - 30 -
5 调试实验 ............................................... - 32 -
5.1 上位机运行介绍及截图 ............................. - 32 - 5.2 下位机运行介绍及截图 ............................. - 33 - 6 总结和展望 ............................................. - 35 - 参考文献 ................................................. - 36 - 附录 ..................................................... - 37 - 致谢 ..................................................... - 51 -
- 4 -
河南理工大学毕业设计(论文)说明书
1 绪论
在计算机控制系统中,不可避免的要采用计算机串口进行通信。而在由一台PC机(上位机)和多台单片机(下位机)构成的分布式控制系统中,往往以PC 机为上位机完成较为复杂的数据处理和对前沿机的监督管理,以及对下位机进行多机协调;单片机主要执行上位机的命令,对来自微机串行口的命令进行操作,完成对被控对象的直接控制并把被控对象的信息上报给上位机。实现PC 机与多个单片机的通信有很多方法,其中通过PC 机的串口实现与多台单片机的通信是最方便的。在这样的分布式控制系统中,单片机与微机之间的通信是整个系统的关键。同时采用无线模块进行通讯范围和通讯灵活性的扩展。本文设计了在Windows 环境下利用Delphi开发微机与单片机通讯无线控制系统,并详细的介绍了无线通讯的原理和工作方式,并通过实物进行测试,验证了方案的可行性,为分布式无线控制系统的设计奠定了基础,并降低了对于大型系统开发周期长开发难度大的一般性问题。本文将详细的介绍基于DELPHI的PC机与单片机无线串口通讯,通过整体系统方案、无线通讯编码调制方法、单片机应用及程序设计等方面进行详细论述。
1.1设计的背景和现状
伴随着集成化工业控制系统的发展,各个控制部件间的通讯已提升到了相当重要的地位,而开发便捷、成本低廉的串口通讯方案被广泛的的运用于其中。例如工控经常使用到的PLC(Programmable Logic Controller)控制系统就是这样。串口通讯由于其可靠性高而被PLC(Programmable Logic Controller)所青睐。本文就是根据这个特性而设计的基于DELPHI的PC机与单片机串口无线通讯,将串口的使用更加灵活化,更加突出串口的优势,并且通过串口组建完善的控制网络。
就目前国内外串口通讯来看,串口通讯技术已经发展到了一定的高度,技
- 1 -
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库基于DELPHI的PC机与单片机无线串口通讯--毕业设计在线全文阅读。
相关推荐: