It is very important topic that how Interfacing Proteus with Matlab is done? And it is obious that after interfacing Proteus with matlab lots of way is open for simulating microcontroller based project. We know that in Proteus there has lack of sensor soif we done Interfacing Proteus with Matlab then we can easily introduce all blocks of matlab as a input or output device for microcontroller.

Now question is how we shall do Interfacing Proteus with Matlab ?

For Interfacing Proteus with Matlab we need support additional software (Virtual serial Ports Emulator) for making virtual com port and making pairing between the ports which are used to Interfacing Proteus with Matlab. So it is now clear that we can connect matlab with Proteus by serial Port. In bellow block diagram shows how it possible. 

Interfacing Proteus with Matlab

Code for MiKro C Pro : To run the project we need the hex file. And here I used Mikro c pro for Pic to write the c program and making the hex file. In bellow see the C code for Interfacing Proteus with Matlab by UART port

Embedded C Code
// Name : Interfacing Proteus with Matlab
// Purpose : Serial communication between PC with Microcontroller.
// Author : Subham Dutta
// Date : 27-12-13
// Website :
unsigned int uart_rd;
sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit; // Initialize lcd
sbit LCD_D7 at RD7_bit;
sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
void main() {
int i;
ANSEL = 0; // Configure AN pins as digital
ANSELH = 0;UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilizewhile (1) { // Endless loop
if (UART1_Data_Ready()) { // If data is received,
uart_rd = UART1_Read();
UART1_Write(uart_rd); // read the received data,
if (uart_rd == ‘a’){



Code for Matlab: For sending data form Matlab via serial port we should define the com port and send the data through that.Here I give you the matlab code for sending data through serial port.

clear all
s = serial(‘COM1′,’BaudRate’,9600);
clear s

For Proteus circuit diagram and how the total simulation from the beginning step by step process must see the video given bellow.