´®¿ÚͨÐÅÉè¼ÆÓëʵÏÖ_µç×ÓÐÅÏ¢¹¤³Ì±ÏÒµÂÛÎÄ·¶ÎÄ
·¢²¼Ê±¼ä£º
2015-01-14
À´Ô´£º
ÈË´ó¾¼ÃÂÛ̳
µç×ÓÐÅÏ¢¹¤³Ì±ÏÒµÂÛÎÄ·¶ÎÄ
Ŀ¼
ÕªÒªI
AbstractII
µÚ1Õ Ð÷ÂÛ1
1.1 ϵͳ¿ª·¢±³¾°1
1.2 ÈÎÎñ»òÎÊÌâ1
1.3 ÎҵŤ×÷1
µÚ2Õ ϵͳ¿ª·¢»·¾³3
2.1 C++Builder¼ò½é3
2.2 C++BuilderµÄ»·¾³Ä£Ê½3
µÚ3 Õ ¶Ô´®ÐÐͨÐż°RS-232µÄÈÏʶ5
3.1 ´®ÐÐͨÐżòµ¥ÈÏʶ5
3.1.1 ͬ²½´®ÐÐͨÐÅ·½Ê½5
3.1.2 Òì²½´®ÐÐͨÐÅ·½Ê½5
3.2 ´®¿ÚͨÐÅ6
3.3 ´®ÐÐͨÐŽӿڱê×¼7
3.3.1 ʲôÊÇRS-232£¿7
3.3.2 RS-232½Ó¿Ú¶¨Òå¼°Á¬Ïß7
3.3.3 RS-485½Ó¿Ú±ê×¼9
3.4ÎÕÊÖ10
3.4.1Èí¼þÎÕÊÖ10
3.4.2 Ó²¼þÎÕÊÖ11
3.4.3 XModemÎÕÊÖ11
µÚ4Õ ÓÃC++Builder½øÐгÌÐò±àд13
4.1 ´®ÐÐͨÐŵÄWindows API¼òÊö13
4.1.1´®ÐÐͨÐÅÏà¹Øº¯Êý13
4.1.2ʹÓÃÁ÷³Ì14
4.1.3¼ì²é×ÊÔ´ÉèÖÃ15
4.2 MSComm¿Ø¼þ17
4.2.1 MSComm¿Ø¼þ´¦ÀíÎÊÌâµÄ·½·¨17
4.2.2 MSComm¿Ø¼þµÄ³£ÓÃÊôÐÔºÍʼþ17
µÚ5Õ ϵͳ·ÖÎöÓëÉè¼Æ19
5.1 ϵͳ´«Êäͼʾ19
5.2 ϵͳÉè¼ÆÕûÌåÁ÷³Ì·ÖÎö19
5.3 ³õʼ»¯20
5.4 ·¢ËÍ×Ö·û´®21
5.5¶ÁÈ¡×Ö·û´®22
µÚ6Õ ³ÌÐò»ù±¾¹¦ÄܵÄʵÏÖÓë½éÉÜ24
6.1 ³ÌÐòµÄÖ÷Òª¹¦ÄÜ24
6.2 ³ÌÐòµÄʵÏÖ24
6.3 ÉÏλ»úÔËÐнá¹û29
6.4 ÏÂλ»ú³ÌÐòÉè¼Æ30
6.5 LEDÏÔʾÆÁÓë¿ØÖÆÆ÷ϵͳʵÏÖ30
µÚ7Õ ±ÏÒµÉè¼Æ×ܽá33
ÖÂл34
²Î¿¼ÎÄÏ×35
¸½Â¼1 ÉÏλ»úÖ÷Òª³ÌÐò´úÂë36
¸½Â¼2 ÏÂλ»úÖ÷Òª³ÌÐò´úÂë61
ÕªÒª
µ±½ñÉç»áÊÇÒ»¸ö¸ß¶È×Ô¶¯»¯µÄÉç»á£¬¸÷ʽ¸÷ÑùµÄÉ豸¶¼¿ÉÒԺͼÆËã»úÁª»ú£¬¶ø×î¼òµ¥µÄ×Ô¶¯»¯Áª»ú·½Ê½¾ÍÊÇʹÓô®ÐÐͨÐÅ¡£´®ÐÐͨÐÅ´æÔÚµÄʱ¼äÒѾ²»¶ÌÁË£¬Ëæ×ſƼ¼µÄ·¢Õ¹£¬Ëü²»½öûÓб»È¡´ú£¬ÆäÓ¦Ó÷¶Î§·´¶øÔ½À´Ô½¹ã¡£´®ÐÐͨÐÅ×÷ΪһÖÖÁé»î¡¢·½±ã¡¢¿É¿¿µÄͨÐÅ·½Ê½£¬¾ßÓÐÁ¬½Ó¼òµ¥¡¢´«Êä¾àÀ볤µÈÓŵ㣬ÔÚ¹¤Òµ¼à¿Ø¡¢Êý¾Ý²É¼¯ºÍʵʱ¿ØÖÆϵͳÖеõ½Á˹㷺ӦÓá£ÕâЩӦÓÃÖÐÓÈÒÔ×Ö½ÚͨÐÅ×îΪ³£¼û¡£
±¾±ÏÒµÉè¼ÆµÄ¿ÎÌâΪ¡°´®¿ÚͨÐÅÉè¼ÆÓëʵÏÖ¡±£¬Ö÷ÒªÊÇÀûÓÃC++builder³ÌÐò½øÐÐÉè¼Æ£¬¼ÆËã»úͨ¹ýRS-232×ÜÏßÓëÒº¾§ÆÁ»ò²¨¶Î¿ª¹Ø¿ØÖÆÆ÷ÏàÁ¬£¬Òº¾§ÆÁ»ò²¨¶Î¿ª¹ØÔÙ¿ØÖÆLEDÏÔʾÆÁ¡£¼ÆËã»úͨ¹ýRS-232ÏàÁ¬, ¿É´¢´æ¡¢´«ÊäºÍÏÔʾ3¡¢4¡¢8¡¢16ÌõµÈµÈ²»Í¬µÄÐÅÏ¢£»ÊµÏÖ´®¿ÚÉèÖúÍÊý¾Ý·¢ËͺͽÓÊÕ.
¹Ø¼ü´Ê£º´®ÐÐͨÐÅ,RS-232,C++builder ,LEDÏÔʾÆÁ
Abstract
Now the society is a high automated society, all kinds of equipment can link to the computer on-line, but the simple automated on-line way is to use serial communication. Serial communication existence time is already not short, along with the technical development, it not only has not been substituted, its application scope is more broadly. The serial communication take one kind nimble, convenient, reliable mailing address, has the connection simply, and the transmitting range is long and so on the merit. In the industry monitoring, the data acquisition and the real-time control system obtained the widespread application. In these applications is especially most common by the byte correspondence.
This graduation project topic is "the design and realization of data communication Serial communication ", it is designed by C++ Builder mainly . The computer is connected through the RS-232 main-line and the liquidcrystal screen, then the liquidcrystal screen or the range selector control the LED display monitor again. It is designed by C++Builder, compile the computer connect the singlechip with RS-232,and made it to storage, transmit and show 3¡¢4¡¢8¡¢16 massages.So it is realized to send and accept the data.
Key words: Serial communication £¬RS232 C++Builder£¬LED display monitor.