GUI

Figure 1: Graphical User Interface (GUI) for Microcontrollers

A graphical user interface (GUI) is one of the ways to interface between your microcontroller and a personal computer (PC) operated by a human with a mouse or a keyboard.

It is always easy and require less skills to operate a device from a visual representations of the workspace (GUI) by simply clicking a mouse or using a keyboard rather than a command line.  
GUI can also be used to interface with other external devices located in different places. 

There are many different types of software that can be used to design a GUI platform, the choice will usually depend on personnel preferences, software capabilities and the operating systems (Windows, Linux, Mac…).  
Among the popular ones we have Microsoft Visual Basic, Microsoft C#, Labview, Matlab etc. 

A microcontroller device can communicate with a PC in various ways, the simplest and among the oldest method being the RS232 protocol commonly known as Serial communication, RS485 usually for long distances communication (up to about 1km), the new USB (tending to replace the RS232), Ethernet ect.

Figure 2 below shows some few communication cables, a Male to Female RS232 cable which could be used for example to connect a Personal Computer to a PIC Microcontroller. There is a CAT5e cable as well for Ethernet Communication and a now common USB cable.

Some Communication Cables

Figure 2: Some Communication Cables

In our next tutorials, we are going to learn different microcontroller communications protocols such as RS232, RS485, USB and Ethernet.

1 Creating a new project in Microsoft C#

There are many different types of software that can be used to design a GUI platform, the choice will usually depend on personnel preferences, software capabilities and the operating systems (Windows, Linux, Mac…).  
Among the popular ones we have Microsoft Visual Basic, Microsoft C#, Labview, Matlab etc. 

Microsoft provides Visual Studio Express editions and Community edition which are free editions for individual developers, open source projects, academic research, education, and small professional teams.

In this article you will learn more how to start a new C# project:

Creating a new Project in C#

2. Controlling a PIC Microcontroller from a PC Graphical User Interface (GUI)

Figure 3: Controlling a PIC Microcontroller from a PC Graphical User Interface diagram

In this article we are going to design a Graphical User Interface using Microsoft Visual C#. This software could be installed in any computer running windows operating systems. The computer will connect to the microcontroller using an RS232 serial cable or a USB to serial cable. The PIC microcontroller will receive commands from the computer to control devices connected to it such as motors, LEDs etc.

Figure 4 below shows the PC GUI interface. C# Serial port component is used to send data to serial port of the computer.

Figure 4: PC GUI Software Interface

Read the full article:

Controlling a PIC Microcontroller from a PC Graphical User Interface

3. PIC Communication with RS232 using XC8
4. PIC Communication with RS232 using mikroC
5. USB Communication with PIC Microcontroller with USB HID Class
6. Ethernet Communication with PIC Microcontroller