欢迎您访问52IJ教育培训网,今天小编为你分享的学习资料方面的学习知识是通过网络精心收集整理的:“串口通信_“串口通信”如何翻译成英文?~~如题,谢谢~~”,注意:所整理内容不代表本站观点,如你有补充或疑问请在正文下方的评论处发表。下面是详细内容。
serial communication
其他类似问题
问题1:串行通信口 英语怎么说串行通信口简称串口.英语怎么说?
COM:串行通讯端口
COM stands for cluster communication port.串行通讯端口简称串口
问题2:英语翻译本文研究了基于VC++6.0的串口通信编程技术,设计并实现了一个基于微机和单片机串口通讯的数据采集显示系统.论文首先具体介绍了该系统的硬件部分,主要是89C51单片机系统(含串口
This article has studied based on the VC++6.0 serial port correspondence programming technology,designed and has realized one based on the microcomputer and the monolithic integrated circuit serial port communication data acquisition display system.The paper first specifically introduced this system's hardware part,is mainly the 89C51 monolithic integrated circuit system (including serial port communication interface circuit and A/D switching circuit); The monolithic integrated circuit electric circuit realizes the function is transmits the exterior 8 input analogue voltage value through the serial port to the computer.Then elaborated system's software design in detail,including monolithic integrated circuit system's assembly language programming and VC++6.0 programming entire process (including contact surface design,display system as well as data reduction program); Finally gave has carried on the preliminary test data and the result to the system,had indicated system's design and the debugging has served the anticipated purpose and the request basically .
问题3:求基于vc的串口通信的英文文献没有翻译的也没关系,有翻译的是最好啦![英语科目]
Caveat
Using the EV_RXCHAR flag will notify the thread that a byte arrived at the port.This event,used in combination with the ReadFile function,enables a program to read data only after it is in the receive buffer,as opposed to issuing a read that waits for the data to arrive.This is particularly useful when a port is open for nonoverlapped operation because the program does not need to poll for incoming data; the program is notified of the incoming data by the occurrence of the EV_RXCHAR event.Initial attempts to code this solution often produce the following pseudocode,including one oversight covered later in this section:
DWORD dwCommEvent;
DWORD dwRead;
char chRead;
if (!SetCommMask(hComm,EV_RXCHAR))
// Error setting communications event mask.
for ( ; ; ) {
if (WaitCommEvent(hComm,&dwCommEvent,NULL)) {
if (ReadFile(hComm,&chRead,1,&dwRead,NULL))
// A byte has been read; process it.
else
// An error occurred in the ReadFile call.
break;
}
else
// Error in WaitCommEvent.
break;
}
The above code waits for an EV_RXCHAR event to occur.When this happens,the code calls ReadFile to read the one byte received.The loop starts again,and the code waits for another EV_RXCHAR event.This code works fine when one or two bytes arrive in quick succession.The byte reception causes the EV_RXCHAR event to occur.The code reads the byte.If no other byte arrives before the code calls WaitCommEvent again,then all is fine; the next byte to arrive will cause the WaitCommEvent function to indicate the occurrence of the EV_RXCHAR event.If another single byte arrives before the code has a chance to reach the WaitCommEvent function,then all is fine,too.The first byte is read as before; the arrival of the second byte causes the EV_RXCHAR flag to be set internally.When the code returns to the WaitCommEvent function,it indicates the occurrence of the EV_RXCHAR event and the second byte is read from the port in the ReadFile call.
The problem with the above code occurs when three or more bytes arrive in quick succession.The first byte causes the EV_RXCHAR event to occur.The second byte causes the EV_RXCHAR flag to be set internally.The next time the code calls WaitCommEvent,it indicates the EV_RXCHAR event.Now,a third byte arrives at the communications port.This third byte causes the system to attempt to set the EV_RXCHAR flag internally.Because this has already occurred when the second byte arrived,the arrival of the third byte goes unnoticed.The code eventually will read the first byte without a problem.After this,the code will call WaitCommEvent,and it indicates the occurrence of the EV_RXCHAR event (from the arrival of the second byte).The second byte is read,and the code returns to the WaitCommEvent function.The third byte waits in the system鈥檚 internal receive buffer.The code and the system are now out of sync.When a fourth byte finally arrives,the EV_RXCHAR event occurs,and the code reads a single byte.It reads the third byte.This will continue indefinitely.
The solution to this problem seems as easy as increasing the number of bytes requested in the read operation.Instead of requesting a single byte,the code could request two,ten,or some other number of bytes.The problem with this idea is that it still fails when two or more extra bytes above the size of the read request arrive at the port in quick succession.So,if two bytes are read,then four bytes arriving in quick succession would cause the problem.Ten bytes requested would still fail if twelve bytes arrived in quick succession.
The real solution to this problem is to read from the port until no bytes are remaining.The following pseudocode solves the problem by reading in a loop until zero characters are read.Another possible method would be to call ClearCommError to determine the number of bytes in the buffer and read them all in one read operation.This method requires more sophisticated buffer management,but it reduces the number of reads when a lot of data arrives at once.
DWORD dwCommEvent;
DWORD dwRead;
char chRead;
if (!SetCommMask(hComm,EV_RXCHAR))
// Error setting communications event mask
for ( ; ; ) {
if (WaitCommEvent(hComm,&dwCommEvent,NULL)) {
do {
if (ReadFile(hComm,&chRead,1,&dwRead,NULL))
// A byte has been read; process it.
else
// An error occurred in the ReadFile call.
break;
} while (dwRead);
}
else
// Error in WaitCommEvent
break;
}
The above code does not work correctly without setting the proper time-outs.Communications time-outs,discussed later,affect the behavior of the ReadFile operation in order to cause it to return without waiting for bytes to arrive.Discussion of this topic occurs later in the 鈥淐ommunications Time-outs鈥 section of this article.
The above caveat regarding EV_RXCHAR also applies to EV_RXFLAG.If flag characters arrive in quick succession,EV_RXFLAG events may not occur for all of them.Once again,the best solution is to read all bytes until none remain.
The above caveat also applies to other events not related to character reception.If other events occur in quick succession some of the notifications will be lost.For instance,if the CTS line voltage starts high,then goes low,high,and low again,an EV_CTS event occurs.There is no guarantee of how many EV_CTS events will actually be detected with WaitCommEvent if the changes in the CTS line happen quickly.For this reason,WaitCommEvent cannot be used to keep track of the state of the line.Line status is covered in the 鈥淢odem Status鈥 section later in this article.
Serial Communications in Win32
问题4:用英语翻译以下句子——Pc机串口通信控制单片机显示系统
Pc Serial Communication Control Display System MCU .
问题5:串行通讯参数及连接 这个用英文怎么说?关键是串行两字.[数学科目]
Serial
communication
parameter
connection
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
