Home > Software engineering >  MFC realize serial communication software number problem
MFC realize serial communication software number problem

Time:05-02

Using cserialport class through MFC realize serial communication software, communication with 51 single-chip microcomputer, the interface is the usb serial port, single-chip microcomputer in application to receive a character, returns a byte data, MFC software in the child thread through the while (1) to send number plus time delay method, the serialport class provides a serial port monitoring thread number, test found that if the number of hair cycle is 30 ms, data transceiver is normal, send the packet number and receive the same number, but when sending number is 20 ms cycle, can appear incomplete data reception, namely receive packet number is less than send packet number, use the same serial debugging assistant, 20 ms cycle number does not appear lost phenomenon, can you tell me what's the problem?
  • Related