Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Create GUI and communication between computer and FPGA

Status
Not open for further replies.

KingMoshe

Member level 2
Member level 2
Joined
Aug 10, 2021
Messages
48
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
362
Hello,
I will explain what I want to do step by step and maybe someone will be able to guide me how to get started.
First of all I will tell that I have knowledge in: analog design, digital HW design, FPGA, verilog, Arduino, C, Python and more.

My goal: I want to communicate with my FPGA device with SPI / UART or somehow using windows GUI that I will build.

This is what I need:
1. Understand what is the best way to send a command from the computer to an FPGA device from a software and hardware point of view.

2. Understand the HW requirements necessary for this.

3. Understand the software requirements necessary for this.

4. Understand how to create my own standalone GUI for Windows.

Thanks,
Moshe.
 

Hello,
I will explain what I want to do step by step and maybe someone will be able to guide me how to get started.
First of all I will tell that I have knowledge in: analog design, digital HW design, FPGA, verilog, Arduino, C, Python and more.

My goal: I want to communicate with my FPGA device with SPI / UART or somehow using windows GUI that I will build.

This is what I need:
1. Understand what is the best way to send a command from the computer to an FPGA device from a software and hardware point of view.

2. Understand the HW requirements necessary for this.

3. Understand the software requirements necessary for this.

4. Understand how to create my own standalone GUI for Windows.

Thanks,
Moshe.
I’d use SPI. Depending on your environment, maybe you’d need differential signals.
If you’re familiar with Python, then write you GUI in Python.

not sure what else you want; ask more specific questions.
 

I’d use SPI. Depending on your environment, maybe you’d need differential signals.
If you’re familiar with Python, then write you GUI in Python.

not sure what else you want; ask more specific questions.
How do I drive the signals from the computer using the usb?
How do I write the GUI? I want a standalone software.
I am not surw hiw to start.
At the beggining I want to drive the uart/spi signals from my pc.
 

For low and medium speed PC interface, I'd prefer UART. You have a large choice of USB-to-UART bridges, also Bluetooth adapters like HC-05 can be used. Highest standard Baudrate of 921k gives good throughput, runs with VCOM driver. If you want higher speed, SPI can be implemented with FT2232 and D2XX driver dll.
 

For low and medium speed PC interface, I'd prefer UART. You have a large choice of USB-to-UART bridges, also Bluetooth adapters like HC-05 can be used. Highest standard Baudrate of 921k gives good throughput, runs with VCOM driver. If you want higher speed, SPI can be implemented with FT2232 and D2XX driver dll.
I also prefer UART.
So I understand from the hardware side all I need is usb to uart bridge.
With the implementation on FPGA side I will be OK.
But my problem is the implementation on PC side.
Are there any generic software I can read and write data?
In the future I want to build my own GUI to read and write data from the FPGA, what methods are recomended for that?
 

Python has a USB library (pyusb). I haven’t used it, but it seems like it might be your solution. There’s also libusb which I think is a C library that you can use with python.
 

Let me answer this question, I am familiar with this type of technology and needs.
There are three technical solutions:

1. UART
Use the IO of the FPGA to directly send and receive UART signals, and use chips such as CH341 or FT232 to convert the UART to USB. GUI can be written by Python with PyQT, C++ with QT, MATLAB, C#, etc. They are all equipped with APIs for reading and writing UART, which are very easy to use.

2. Gigabit Ethernet
This technology requires a MAC chip on the FPGA board, and the advantage is that it can be directly connected to a PC without converter. The FPGA runs the MAC controller and the UDP protocol stack (you can find open source code on GitHub), the GUI can be written in Python, MATLAB, C++, C#, and they can easily access the network stack.

3. USB 3.0
This technology requires a Cypress FX3 chip on the FPGA board, which can be directly connected to a PC through USB3.0. The data throughput rate of this solution can reach 400MB/s, which is suitable for high-speed data transmission. The GUI can be written in C++ and C#, and the APIs provided by Cypress can be used to access the USB interface.
 

There is no single (or even 'best') answer the GUI question.
There are a number of libraries out there that you can use to construct the GUI that have a varying number of pre-built widgets. For example https://towardsdatascience.com/top-10-python-gui-frameworks-for-developers-adca32fbe6fc mentions 10 of them, and https://wiki.python.org/moin/GuiProgramming lists whole truck-load.
Do you want the PC to run the GUI, or just develop the GUI that will be used on another platform (I'ver used LVGL on a Raspberry Pi Pico and an touch screen that can also have a UART or SPI interface).
Is the PC running Windows, Linux (or even MacOS) - and again is the target platform the same as the development platform?
Susan
 

Hello,

you can write soft for PC in C# and free "Visual Studio Comunity Edition" . Choose type of project "Windows Forms" and you have many visual components for creating GUI. In C# there is "SerialPort" class which you can use for programing comunication using USB_Serial converter.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top