Home > Back-end > C CISerialPort serial port to receive the string garbled
C CISerialPort serial port to receive the string garbled
Time:09-20
MFC to do upper machine, communicate with the board, a serial port Settings: no problem,
Processes are PC issued instructions, the board return a string (only English letters and Numbers), the question now is sometimes received garbled, messy, sometimes Numbers into letters, sometimes become at sixes and sevens in Chinese digital, probably 200 times appeared once,
You see what reason?
Receive data part code:
The static UINT m_nReceiveBytes=0;//this variable is used to receive the character count Cstrings m_strReceive;