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 Matlb...

Status
Not open for further replies.

sprao

Member level 1
Joined
Dec 7, 2006
Messages
32
Helped
6
Reputation
12
Reaction score
2
Trophy points
1,288
Activity points
1,464
Hi, I want to transfer data in and out serially by using Matlab. Till now I had studied Matlab documentation for this and I have tried in loopback mode i.e shorting TD and RD pins of COM port.
1. Actually I want to send and receive Hexadecimal data which can be written in a file. How to send or receive Hex data through a file.
2. One more thing is whatever my received Hex data, I have to append 4 bytes of hex data and before writing in to a file I have to convert into integer. Any way if we can combine 4 bytes of Hex data then I can convert it by using hex2dec() function. For example if I am receiving one byte of Hex data eachtime as 12, AB, 9A and E2 then I have to combine it as 12AB9AE2, then I can convert it into integer.
3. I heard that Matlab is not good to use for real time applications. So, can I use it for serial communication? (My divece's baudrate is 115200).

Anybody plz help me to solve these problems.....
 

hi,

u've not mentioned about the version of matlab u're using

well' if its below version matlab 6.5, u could use "external interfaces",

use the mex file to add in some C codes that u use for communication using C, now u've got the serial communication done using matlab

matlab 7, doesn't support mex files, so i'll find out whats to be done for that

regards
mon

checkout the link

**broken link removed**

all the best
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top