Font Size: a A A

Communication System Of Multi Soft Serial Ports Based On AT89S52

Posted on:2008-06-07Degree:MasterType:Thesis
Country:ChinaCandidate:Y DiFull Text:PDF
GTID:2178360245993257Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
With SCM development, application has gradually shifted gradually from single SCM to multi-machine and network and exchange information is the key to the application of multi-machine. Serial communication which can transmit binary data bit by bit is the main form of communication for SCM, so it needs very few transmission lines and it is particularly applicable to grading, layering and distributed control systems and long-range communications.Because the current mainstream of the MCS-51 in application its serial number is insufficient and more than one serial ports are needed in the multi-machine and net application. This paper introduces a Communication System of Multi Soft Serial Ports Based on AT89S52 and proposes a set of solutions to the serial port expansion. The working principle is that this paper uses parallel port P1 and timer T0 to simulate two full-duplex serial ports in AT89S52 based on the principle of asynchronous serial transmission. Upper-machine transmits data to AT89S52 by the real serial port in accordance with the provision of the communication protocols for data. AT89S52 uses the received data to set the baud rate or put it into corresponding soft serial port's transmission buffer based on AT89S52 analysis address space bit. AT89S52 sends the data in this buffer by the corresponding soft serial port to the corresponding terminal. When terminals sends data to AT89S52,AT89S52 receives the data by corresponding soft serial port and puts it into soft serial port's reception buffer, AT89S52 sends these data without packaging to Upper-machine through the real serial port. So upper-machine and two terminals communicate well by the two soft serial ports and the real serial port. The innovation lies in the simulation of two full-duplex soft serial ports and the two serial ports can handle two parallel routes data transmission or reception without making mistakes.The communication system is universal and transplantable. It expands two full-duplex soft serial ports. The method and thought of expansion full-duplex soft serial ports will be good to other applications. Even more SCM with two serial ports occur, there is a great use of space and the reference value.
Keywords/Search Tags:AT89S52, Serial communication, Full-duplex, Soft serial port, Communication system
PDF Full Text Request
Related items