0

I'm using pyserial to get data from a psoc device (microcontroller). the microcontroller sends data via uart and an internal (inside psoc) uart to usb is used to convert data from uart to usb, however I have communication flow issues. I tried to use an external ftdi uart/usb converter but I'm still facing the same problem. As a non suitable solution, I used an arduino mega board between my psoc and laptop, it receives data via uart and send them via usb to my laptop, it works without any data flow issue. Can you help me to solve this issue? thanks :)

  • 1
    please post the relevant code and whatever errors you're encountering. As it stands, it's difficult to figure what communications flow issues you are referring to. – ewokx Sep 10 '20 at 04:51
  • this is the python code I'm using: import time import serial ser = serial.Serial('COM9', 9600) data =[0x74,0x03,0x31,0x2E,0x41,0x3B] data1 =[0x74,0x02,0x43,0x31,0x3B] data2 =[0x62,0x01,0x01,0x3B] data3 =[0x65,0x00,0x3B] t=0.6 time.sleep(2) for k in range (3): ser.write(data) time.sleep(t) ser.write(data2) time.sleep(3) y=ser.read(900) ser.write(data1) time.sleep(t) ser.write(data2) time.sleep(3) x=ser.read(127) ser.write(data3) time.sleep(t) print(y) print(x) ser.close() – Driss Oulad-abbou Sep 12 '20 at 10:01
  • on the PSoC side, I'm using the module USB (https://www.cypress.com/file/376416/download) as a USBUart to convert data from uart to usb – Driss Oulad-abbou Sep 12 '20 at 10:07

0 Answers0