Home > Back-end >  PC serial port communication problems, how to distinguish I received data? For help
PC serial port communication problems, how to distinguish I received data? For help

Time:03-22

A serial port communication, PC can send two commands to SCM: "QRV + # newline" query voltage, "QRC + # newline" query current,
Send a query command each second,
I want to send a query to the voltage value on "text box 1", according to the current value in the "text box 2", according to



But received data are current and voltage values together, how can I distinguish? Is sending QRV return value to text box 1, send QRC return value to text box 2, how to do?



Add: program description

'port=com2, 38400 baud rate, data bits, stop bits 1, parity=false


Clock 1. The clock cycle=1000 'clock trigger per second sent a


Port 1. Sending data (" QRC "+ # newline) 'second sends a command to check current
Port 1. Sending data (" QRV "+ # newline) 'sends a command to check a second voltage



CodePudding user response:

You need to appoint a communication protocol and MCU program, add logo in front of the data

CodePudding user response:

reference 1st floor focuslight response:
you need to appoint a communication protocol and MCU program, plus id before data

MCU program need not change, that has a PC software, I just want to redo a,

CodePudding user response:

To believe that the opposite
What is you first check, opposite the starter is what,
  • Related