跪求!!!单片机题 简述:MCS-51串行口工作方式1时的数据接收过程!

如题所述

MCS-51串行口mode 1就是异步通讯方式,没有时钟。要先设好波特率,没有信号时为‘1’电平,数据是一个byte一个byte传,每个byte共十位。先收到的是起始位‘0’,然后是八个数据位,由低到高,最后是停止位‘1’。发送用的是TXD线,接收用的是RXD线。注意,如果用RS232C传输的话,线上的信号可是反的啊!要用1488/1489倒相。
参考一下 RS-232C 的 spec 吧。
看看以下的说明也行啊:

Mode 1
As can be seen from the table above, the serial port in mode 1 operates as an 8-bit UART (Universal Asynchronous Receive/Transmit). This is asynchronous communication, therefore no clock signal is sent with the data. Instead, a single start bit (always logic 0) and a single stop bit (always logic 1) encapsulate the data (8 bits). Therefore, in total, ten bits are sent per byte of data.
Data is transmitted on TXD. Transmission is initiated by a write to the serial buffer (eg; MOV SBUF, R0). Once the stop bit is transmitted TI is set, alerting the processor to the fact that the entire byte has been transmitted. When no data is being transmitted the TXD line is constantly held HIGH (ie; a constant stream of stop bits).
Received data arrives on RXD. When the stop bit is received the RI flag is set, alerting the processor to the fact that an byte has been received.
If no data is being received RXD will be a constant HIGH (because the transmitter, working off the same protocol, will hold its TXD line HIGH when not transmitting data). Therefore, the receiver waits for a 1 to 0 transition. This signals the arrival of a start bit, which indicates a data byte is following. The start bit is skipped and the eight data bits are fed into the serial port shift register. When all eight bits have been shifted into the register the following occur:
The stop bit is copied to RB8 in SCON.
The data in the shift register is moved (in parallel) into SBUF (read-only).
RI is set.
温馨提示:答案为网友推荐,仅供参考
相似回答