Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

serial communication using matlab

Status
Not open for further replies.

soinarose

Junior Member level 3
Joined
Oct 7, 2009
Messages
27
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
india
Activity points
1,462
sir,

i want to display a wave from function generator in matlab. i convert analog signal using adc. The microcontroller which im using is PIC 16F877A. my plan is to transmit it through serial port.. hw can i receive data through serial port...

Pls help me..
Sonia.
 

soinarose said:
sir,

i want to display a wave from function generator in matlab. i convert analog signal using adc. The microcontroller which im using is PIC 16F877A. my plan is to transmit it through serial port.. hw can i receive data through serial port...

Pls help me..
Sonia.

Hi,

Matlab examples available in the "Math Works web" you may browse their web for more information.

Create serial port object in matlab

**broken link removed**

Guide to Serial Port Interfacing

hope this helps

regards
bassa
 

    soinarose

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
Thank u for ur valuable information.. im getting values from PIC... but after some time its automatically closed... im getting an warning ..

Warning: The input buffer was filled before the Terminator was reached.


pls help me sir to solve this error....

Regards
Sonia..[/b]
 

soinarose said:
Thank u for ur valuable information.. im getting values from PIC... but after some time its automatically closed... im getting an warning ..

Warning: The input buffer was filled before the Terminator was reached.


pls help me sir to solve this error....

Regards
Sonia..[/b]

Hi,

I think before you read the data from matlab, try to read it using hyper terminal, if this test is fine then check your matlab code

check math works web for this error. here some links



Also check chapter 5 "Controlling Serial Port Instruments" of Instrument Control Toolbox here attached

good luck!

regards
bassa
 

sir, im getting datas in hyper terminal...
 

Hi, i want to use the serial port with matlab for i can read the sensors data. i'm using the next comand:

port=serial ('COM1', 'BaudRate',9600,'DataBits',8,'StopBits',1);
fprintf(port,'%c','%1');
[tline,count,msg}=fgetl(port);
fclose(port);
delete(port);
clear(port);

But "tline" parameter only show me one character and "count" only count one.

Why?

Thanks.
 

You need not go through any microcontroller.
Matlab can interface audio in .So just put your analog signal at your audio in and read the value at this port.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top