论文部分内容阅读
一、引言在功能比较复杂的控制系统或数据采集系统中,通常用PC/XT或PC/AT作为主机,用MCS-51系列单片机作为从机,因此主、从机之间的数据传输问题是一个带有共性的问题。本文介绍一种利用PC机的RS-232C串行口实现主、从机间的双向通信的方法,这种方法已成功地应用到PC机和数控机床的通信上。值得一提的是,本文介绍的接口电路非常简单,省去了±12V电源和1488、1489电平转换芯片。另外,文中所介绍的程序都是实际使用的,分别采用C语言和8031汇编语言编写,读者可直接应用。
I. INTRODUCTION In the more complex control system or data acquisition system, usually PC / XT or PC / AT as the host, with the MCS-51 series microcontroller as the slave, so the data transfer between the master and slave is A common problem. This article describes a method of using PC-based RS-232C serial port to achieve two-way communication between the master and slave, this method has been successfully applied to the communication between the PC and CNC machine tools. It is worth mentioning that this article describes the interface circuit is very simple, eliminating the ± 12V power supply and 1488,1489 level conversion chip. In addition, the procedures described in the article are actually used, respectively, written in C language and 8031 assembly language, the reader can be applied directly.