Receive incorrect information through serial

Thread Starter

pooya_b

Joined Feb 25, 2021
53
I don't open MS Word files as they can be a security risk
The file is saved in pdf format.
I will put the text for you in this post.
----------------------------------------------------------------------
Hi there

I'm writing a program for serial communication. The information of FPGA is sent to a computer through a USB using CH340 serial converter. Data is being read through LabVIEW software using the VISA Configure Serial Port VI and VISA Read modules. The submitted information is 8-bit and is sent in a 10-byte package. However, when it is read, the sent bytes are disordered.

In the image below, you can see the part of the FPGA code that is for sending information. This code reads and sends a memory 1024 times.
1630771368593.png
1630771394512.png


First two bytes of constant, then two bytes of data and one byte of constant, then two bytes of data and another byte of constant and two bytes of data are sent.

In the image below, you can also see the part of the code that receives the information in LabView.

After reading the information, 10 bytes are separated and we check the place of the constants by a condition that is correct, and if it is correct, the data will be sent to the next stage for processing.

1630771407820.png

1630771419456.png

I really appreciate if you could help me to solve this problem
 

Papabravo

Joined Feb 24, 2006
16,938
The file is saved in pdf format.
I will put the text for you in this post.
----------------------------------------------------------------------
Hi there

I'm writing a program for serial communication. The information of FPGA is sent to a computer through a USB using CH340 serial converter. Data is being read through LabVIEW software using the VISA Configure Serial Port VI and VISA Read modules. The submitted information is 8-bit and is sent in a 10-byte package. However, when it is read, the sent bytes are disordered.

In the image below, you can see the part of the FPGA code that is for sending information. This code reads and sends a memory 1024 times.
View attachment 247255
View attachment 247256


First two bytes of constant, then two bytes of data and one byte of constant, then two bytes of data and another byte of constant and two bytes of data are sent.

In the image below, you can also see the part of the code that receives the information in LabView.

After reading the information, 10 bytes are separated and we check the place of the constants by a condition that is correct, and if it is correct, the data will be sent to the next stage for processing.

View attachment 247257

View attachment 247258

I really appreciate if you could help me to solve this problem
The format of the file in post #1 was far from obvious given the misleading name you used to save the file. I'd recommend avoiding doing that in the future.

Can you show us in what way the bytes are disordered. What is the serial format of the bytes at the FPGA pins?
 
Top