【正文】
t as long as after receiving a start signal in a transmission time internal energy of the characters and send equipment in sync can be received correctly. The arrival of the next character start bit make synchronization and recalibrate. System works in MSC 51 microcontroller serial port to send/receive data, through the two serial buffer SBUF, automatically send characters at the end of the beginning, by the hardware (low level) bined with a start bit and stop bit (electronic) and other control bits, such as the parity bit, etc.), and then under the control of the mobile pulse, low before, and in the high bit by bit from the TXD except way (0). In the process of accepting, serial port to receive or not under the control of the state of permitted to accept a REN, when REN is the software after the 1, allows the receiver to receive. Serial receiver to 16 times the speed of the selected baud rate to monitor RXD line. When 1 to 0 jump, detector sampling to RXD line low electricity at ordinary times in A row, then decided that there have start bit RXD, then receive the controller starts to work, in each transmission time 7, 8, 9 three pulse 6 sampling RXD state line, decided the received value of 0 or 1. When after receiving the stop bit, charge circuit using interrupt flag R1 1, the program can be MOV A, SBUF order will receive characters from SUBF into the accumulator A, to plete A frame data receiving work. In the design, the function of the system consists of two parts of hardware and software coordinated, the hardware part mainly plete information display。t transfer in both directions at the same time. 3) simplex mode allows only transmit data according to a fixed direction. (2) serial munication can be divided into two types: synchronous munication and asynchronous munication. 3 Asynchronous munication: a character in a character transfer, each character a a transmission, transmission of a character, begins with a start bit, and then transfer the character itself, ladies and gentlemen, then transfer check, finally ends with a stop bit the transmission of the characters. A transfer of the start bit, characters, ladies and gentlemen, parity, stop bits, constitute a plete set of information, known as the Frame (Frame). Between the frame and the frame can have any spare time. After the start bit is the least significant data. (1) a start bit is located in the character frame at the beginning, only one, for low level logic 0, is used to notify the receiving device, the sender to start sending data. Character on a line without transmission should be kept as 1. Receiving end constantly check the status of a line, such as continuous for later, 1 to a 0, know from a new character, should be ready to receive immediately. (2) data: data bits (D0 D7) j just behind the starting for, usually for 5 to 8, on the basis of data bits were transmitted from low to high order. (3) parity check bits, parity check bits only take up one, and immediately behind the data bits used to represent the serial munication using odd parity or even check, also can use this one (I/O) to determine the nature of this character represents more information in a frame (address/data, etc.). (4) stop bit: located in the character frame in the end, the characterizat