基于单片机与PC机通信的设计.doc
《基于单片机与PC机通信的设计.doc》由会员分享,可在线阅读,更多相关《基于单片机与PC机通信的设计.doc(32页珍藏版)》请在启牛文库网上搜索。
1、 题目:基于单片机与PC机通信的设计 目 录1摘要32设计内容及要求33串口通信原理34设计思路45设计框图56硬件实现56.1AT89C5256.2MAX232芯片66.3 9针串口87用VC+开发串口通信软件97.1用户界面设计97.2程序设计148硬件电路设计178.1设计思路178.2通信协议178.3电路图178.4单片机程序189软件仿真2110实物电路调试2411总结25参考文献26单片机与PC机串口双向数据通信1摘要PC与PC或PC与端口之间的数据传输能够使用串行通讯和并行通讯二种通讯方式。因为串行具有使用线路少、而且成本相对较低的特点,尤其是在距离较远的情况下传输时,防止了多
2、条线路特性大相径庭而被普遍使用。 串行通讯时,规定通讯双方必须使用相同标准的接口,使得不同的设备能够快速有效地连接起来进行通讯。 RS-232-C接口(又称 EIA RS-232-C)是目前已知最常用的几种串行通讯接口之一。是由各个厂商议共同拟定的用于串行通讯的使用标准。串行通讯标准的全称是“数据终端设备(DTE)和数据通讯设备(DCE)之间串行二进制数据交换接口技术标准”该标准规定采用一个25个脚的 DB25连接器,对连接器的各个引脚的信号内容加以明确,还对各种信号的电平加以明确。随着PC技术尤其是MCU微型计算机技术的延伸,人们已愈来愈多地使用单片机对众多工业控制应用加以管理和检测。例如温
3、度、流量和压力等参数。PC机有着非常强大的监控功能,而MS89C51/52MCU则拥有快速和灵便的监控特点,通过PC机的RS-232串行接口和外部设备进行连接,是众多监控系统中最为常用的通讯方式之一。因此怎么实现PC机与MCU之间的通讯变得极为有意义。Data transmission between PC and PC or PC and port to use serial communication and parallel communication two communication modes. Because the serial line with the use of sma
4、ll, and relatively low cost characteristics, especially in the long distance transmission case, prevent multiple line characteristics and is widely used to be quite different. Serial communication, communication both sides must use the same set of standard interface, so that different devices can be
5、 connected to communicate quickly and efficiently. The RS-232-C interface (also known as EIA RS-232-C) is one of the most commonly used serial communication interface is known at present. By the various factory negotiate together for serial communication using standard. The standard serial communica
6、tion is the full name of data terminal equipment (DTE) and the data communications equipment (DCE) between the serial binary data interchange interface technology standard DB25 connector of the standard requires the use of a 25 foot, the content of each signal pin connector to be clear, but also a v
7、ariety of signal level to be clear.With PC technology, especially the extension of the MCU micro computer technology, people have more and more use of SCM for many industrial control applications to manage and detection. Such as temperature, flow and pressure parameters. PC machine has a very powerf
8、ul monitoring function, while the MS89C51/52MCU has a fast and flexible monitoring features, are connected through the RS-232 serial interface and the external device PC, is one of the most commonly used means of communication of monitoring system. So how to realize the communication between PC and
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 基于 单片机 PC 通信 设计