Maker Pro
Custom

Working With the Serial Port Model in Proteus

May 07, 2019 by Oliver Rieder
Share
banner

In this short tutorial,we illustrate how to use the Virtual Serial Port Driver to create Proteus.

Proteus is a widely used application favored by developers and engineers to simulate electrical circuits. It is often used when modeling and designing programmable devices such as microprocessors and microcontrollers.

In this tutorial, we show how you can create virtual serial interfaces in Proteus using Eltima’s Virtual Serial Port Driver software.

Our demonstration will involve testing a microcontroller application’s functionality. A “host program” will be used to send data to a microcontroller via the UART communication protocol. We have chosen to enact this communication with a MAX232 chip, which is a UART-COM converter, to connect the microcontroller to the computer.

Methods for Working With Proteus

Proteus is our tool of choice to verify the communication between the microcontroller and computer. We will add a serial port model that connects the RXD and TXD, ensuring that any data transmitted to the microcontroller is sent right back to the computer. This will confirm that Proteus is capable of establishing serial communication.

It would be nice if there was a native facility within Proteus that creates virtual serial ports with which we could simulate communication with physical ports. In that case, we could simply use Serial Port Terminal to serve as the host program and run a device simulation on Proteus to evaluate the connection. We will, however, need to employ additional software if we desire to create virtual serial ports in Proteus.

Proteus interacts with the COM port model using the resource known as COMPIM.

How-to-use-Virtual-Terminal-in-Proteus-ISIS2.jpg

What is COMPIM in Proteus?

COMPIM is used to model physical COM interfaces in Proteus. It works by capturing and buffering serial signals which it then presents to the electrical circuit. The computer’s serial ports will be used to conduct all serial data originating from the CPU or the UART model.

Virtual serial ports can also be created using USB or Bluetooth connectivity by using several technical workarounds. Baud rate conversion is possible when using the COMPIM model. Verification of the virtual and physical characteristics of the device can be implemented through the addition of optional hardware to software.

Two Ways to Work With Proteus

Testing the “host program” <-> “COM port” <-> “device model functionality in Proteus can be accomplished with either of these two methods.

Use two computers connected through their serial ports. One machine is used to run the host program while the other computer runs the device simulation.

Using a serial cable to connect to two physical ports, one of which is where the host program is running while the second is configured as a virtual port in Proteus.

There are other simulation tools available such as VMLAb and Atmel Studio, but Proteus has the advantage of allowing you to work with commercial drivers. It also performs faster when simulating physical serial interfaces.

When working with serial ports, an ever-present issue is the lack of these interfaces on the majority of modern computers and laptops.

Author

Avatar
Oliver Rieder

I am a computer enthusiast, programmer, and electronics tinkerer. I work with PHP, MySQL, HTML, JavaScript, jQuery, CSS as well as C, Arduino.

Related Content

Comments


You May Also Like