cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
1,004 Views
Registered: ‎09-27-2018

Serial communication between Pynq Z1 board and Computer

 

I have developed an application in C/C++ onSDx(SDSOC) tool on linux(Ubuntu 16.04) with Pynq Z1 board where I am applying some filters on splitted chunks of an image. But I want to choose filters dynamically on my computer with some kind of user interface to be applied on chunks of an image through serial communication. I am using micro USB cable for this purpose. I did not find any Library/Core for UART specifically for this board which I can use for serial communication. Does any body have any idea?

 

P.S: I am not using Python or any Pynq framework. I am able to connect on serial with putty on my Board from my PC but I am stuck on serial Communication part. 

0 Kudos
5 Replies
Highlighted
Explorer
Explorer
997 Views
Registered: ‎09-19-2017

Re: Serial communication between Pynq Z1 board and Computer

Why not just use the Ethernet/TCP connection from the board to your PC? Then you can easily take advantage of C/C++ standard libraries both on the board and on your PC.

 

Sam

0 Kudos
Highlighted
988 Views
Registered: ‎09-27-2018

Re: Serial communication between Pynq Z1 board and Computer

 

Thanks for your suggestion. Ethernet option would be more better than UART. Could you please guide me in this direction?

0 Kudos
Highlighted
Explorer
Explorer
982 Views
Registered: ‎09-19-2017

Re: Serial communication between Pynq Z1 board and Computer

Sure, heres an example for building a tcp client/server configuration in C:

https://www.geeksforgeeks.org/socket-programming-cc/

 

You can try and test this out on your PC by running both the client and the server on the same machine. Then when you know it works and can send data back and forth, you can move the client or the server to Pynq and run it from there. Then if the Pynq is the server, you can start your program, then connect to it from your PC.

 

You can build any user interface you want on the PC side with TCP. Every programming language/environment supports TCP (Python, Matlab, C/C++, etc.)

 

But all of this is standard C/C++ TCP stuff. Nothing is unique to Pynq or your situation since the Pynq board is just like any other PC running Linux.


Sam

0 Kudos
Highlighted
977 Views
Registered: ‎09-27-2018

Re: Serial communication between Pynq Z1 board and Computer

Thanks for your detailed answer. The problem is that I am programming FPGA with my application on SDx(SDSOC) tool. So, my application is on FPGA. It would be easy, if my application was running on ARM processor but this is not the case. Do u know any IP core or library which I can use for UART(serial) or Ethernet?

0 Kudos
Highlighted
Explorer
Explorer
971 Views
Registered: ‎09-19-2017

Re: Serial communication between Pynq Z1 board and Computer

As long as youre running Linux, it doesnt matter how you program the FPGA or what Xilinx tool you use to compile your C program. Your software code is running on the ARM core, and the Ethernet is hardened into the PS. In fact you can write C code and run it on Pynq without programming the FPGA (and use the ethernet too!). So your program can use the ethernet separately from the FPGA.

 

Sam

0 Kudos