Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

serial communication using matlab using only one computer

Status
Not open for further replies.

alok1255

New Member
hey people....i am new in matlab... i want to transfer data using serial link ....the problem is that i only want to simulate it on matlab and the actual data transfer using two comp is not needed...i ust want to see if my code is working....like if i am sending data the transmitter line (pin 2) should be high ....can i do that ???....how to get the status of the pins using matlab....or similar technique to demonstrate that my program will work if i connect 2 comp....
my code is the same old code used for serial communication......


s1=serial('COM2','BaudRate', 9600,'Parity', 'none','DataBits',
8,'StopBits', 1);
set(s1,'InputBufferSize',1024); % ini=512
fopen(s1)
fprintf(s1,'a')


pls help
thanks
 
Last edited:
hi,

hi, hey too have gotten into something you have mentioned here....
did u get a solution if so , can you pls share it with me.
im getting a kind of out put but not happy with that.

than you
 
hi Ian,
wohhh.... that is too much for me.... im just trying to simulate zigbee on matlab... tryin to communicate between two computers..(do i need any dsp board for it???...:eek:...). i did get the plots for the input voice command and its filtered output, but it is askin for a serial port for transmission.... what should i do ???...
 
When I test Xbee modules ( similar ) I have small breakout boards with ft232r chips they just plug in and act like a serial port. Or are we talking about inside matlab? I've never used it!

If you're trying to simulate pin activity inside matlab then there may be a stimulus file (similar to MPLAB), Sorry I can't be much help

Ian
 
When I test serial communication, I use com0com and run a small program in c# or VB to the virtual serial and the back into my application (usually ISIS )

Works for me!!

Cheers Ian

Ian can you share step by step details with me pls?

I'd like to get that system working, thx
 
First download and install com0com its free and I think the best virtual com (you can even do computer to computer via ethernet) get it here
Null-modem emulator | Download Null-modem emulator software for free at SourceForge.net

Set up a pair of serial ports rename to COM7, COM8 or whatever

Write a small program in VB or C'# and transmit out of com7. Then when running ISIS with the comport model (set up correctly to com8,,, by the way in ISIS there will only be com1 to com 4 all you need do is type in the new "com8" and it will work.)

Tada serial comunication via two apps.

Cheers Ian
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top