Research on Communication, Based on PowerBuilder, between Microcomputers and Single-Chip Computers
Su-wen ZHANG,Xiao-qing HANG,Lan LIU
DOI: https://doi.org/10.3963/j.issn.1007-144X.2001.02.010
2001-01-01
Abstract:A circuit that can realize asynchronous, both-way serial communication between microcomputers and 8031 single-chip computers using RS232 interfaces is detailed and its hardware circuit and the realization of its software are analyzed. In this circuit, the microcomputer is a master computer and the 8031 single-chip computer is a slave computer. A two-way call between a master computer and slave computers is realized through two call lines(DSR and DTR). A both-way serial communication between a master computer and slave computers is realized through a pair of communication lines(RXD and TXD). A MC 3487 is used as the remote driver and a MC 3486 as the remote receiver in order to realize remote communication and signal isolation. Data communication is realized by using the inquiry method in a microcomputer, and the interruption method in a 8031 single-chip computer. PowerBuilder language is used to realize the communication in the software design. PowerBuilder is efficient, fast and convenient as a software-developing tool. There are two methods to realize serial communication using PowerBuilder: (1) with the API communication function of Windows; (2) with the MSComm control. Programming by using API function of Windows is complicated, but the function is powerful. On the contrary, programming by using Mscomm control is simple, but the low level program can not be transferred. A method to realize communication by using Pcomm Pro function in PowerBuilderis presented, the format of the function defined and the process to call a function described. It is shown that this method is simple, efficient and applicable.