Exporting data from MCU to GUI, which method should be used???

Thread Starter


Joined Aug 20, 2012
I am at the final stages of a project (designing a relay board, DC motors) and need to have data exported through the board to monitors for data logging, graphing, cycle counting, temp sensor, flagging, etc.

I need to set up a fairly detailed user interface for this process. If need be, I could store all data onto a sd card and then transfer this data onto computers, but my company would prefer direct connection.

What options do I have for GUI? The user also should be able to communicate with my MCU to control settings.

I have USB set up as a virtual com port for controlling relay board settings via hyperterminal. (forward time, reverse time, brake time, etc)
The GUI will be a sort of life test/cycle test evaluater.

I HAVE NEVER SET UP EXTERNAL COMMUNICATIONS. I have no idea if I should use ethernet, somehow use visual basic or what options I have for that matter.

Any advice?

Any suggestions as to what would be simplest?


Joined Oct 2, 2009
If you already have a USB connection working then you're almost there.
Next you have to choose your programming platform.
Visual Basic, Labview or MATLAB should work.
What is your baud rate?

Thread Starter


Joined Aug 20, 2012
I can use USB even if I am using it as a rs-232 connection??? Buad rate can be easily changed. Currently it is 115200. I am using a virtual com port, so I am implementing the exact same situation/protocol as rs-232 but with usb hardware. This is what the boss wanted.

Is is still possible to use the programs above when considering this?

Thread Starter


Joined Aug 20, 2012
Ok, can you point me in the right direction? What programming platform? I am only familiar with RIDE7 programming STM32F1 and using IAR Embedded workbench occasionally. What do I download or purchase to start learning how to do this? I would prefer to use Visual Basic as I have played around with it a bit. I am not used to going into projects feelings kind of blind, anything else you would recommend for me to do or read before starting forward with this??? Thanks for the help!


Joined Apr 28, 2012
Use a USB capable PIC. You can add it to your board!
For instance there are small controllers: 18f13k50 and 18f14k50.

There is USB stack C code available from the Microchip website.
It is not so much difficult to make it working, even for a plain controller that you mounted on a board. Even if the code is normally designed for their evalution PCBs.

Look at the attachment, this is a small USB gizmo I have cobbled together. It works! All it needs is a 12 MHz crystal (I use a canned oscillator here).

The source code for the Windows application is supplied (C++). I can toggle the LED using the Windows program, or read the pushbutton. Originally the PIC firmware is intend for some kind of demo board which has 4 LEDs, and 2 pushbuttons.



Joined Oct 18, 2012
I would recommend using windows forms from the .NET framework. Wpf is good, but can be pretty confusing at first. In windows forms, you can drag a serial port module into your project, this will allow you to grab data from your virtual com port.

You could tag your data with an identifier, sending 2 bytes, the first describing the data, the second being the data.

I prefer C# personally, I feel the .net framework is a little more tedious with VB.