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.

Matlab _micro serial connection

Status
Not open for further replies.

vvarlord

Member level 4
Joined
Mar 15, 2012
Messages
74
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,288
Activity points
1,756
i've written a c code for my atmega 8 which communicates with PC over serial com port
the connection is ok, i have check the data recieve and sent on both side
on PC side i use matlab to send and recieve data
now i just wanted to know that is it possible to save a pattern of recieved data?
for example 100 numbers which are recieved over serial port on matlabn then use it later
tnx in advance
 

yes if you are saving the received bytes in an vector say ( A )

for i =1:100
A(i) = fread(serialObject, 1);
end


,,, then you can save by using

save myData.mat A


,,, when you like to load it


load myData.mat
 

tnx for your reply
i've made a mistake
i do not use the matlab workspace
i use simulink
i want to save a vector of recieved data
and send it serially by order again
it's somehow like this,which i recieve data serially change some of it to parallel & then send all the parallel data by order ,serially
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top