Discussion in "8051 Discussion Forum" started by    swat    Dec 17, 2007.
Mon Dec 17 2007, 08:02 am
#1
hai there,
i need help to interface 8051 with matlab. If anyone has ever tried or knows how to do it please help me. Thank you
Mon Dec 17 2007, 01:36 pm
#2
there's no way you can connect MATLAB with 8051....matlab doesn't have any integrations tools ......MATLAB can only be used to connect DSP processors and that too few........
Mon Dec 17 2007, 01:39 pm
#3
The only way to interface a simple 8051 with PC is UART.
In matlab there is no direct method to access serial ports.. so you need to make program in matlab so that it can access PC's Serial port.. take a look at this this tutorial will help you a little..
http://cnx.org/content/m12062/latest/

Also if you want to do some kind of data interpretation.. then you can make use of VB. Its simpler than that of Matlab in this respect.
Please tell us what you actually trying to do with Matlab.. i might give you suggestions or alternatives.
Mon Dec 17 2007, 02:52 pm
#4
i am doing image processing. Based on the type of image i have to rotate my dc motor etiher to left or right. I am doing the image processing in Matlab. After processing the image, i have to send a signal to my microcontroller which is my 8051 to rotate the dc motor. I have to do with only 8051 microcontroller or atmel 89s52 microcontroller. Only this 2 choices are given to me. This is my project about.
Mon Dec 17 2007, 03:07 pm
#5
nice.. will you share your project with us after completion?
Please check the tutorial link i posted in my last post.. It will give you information on how to program Matlab to use serial port. Once that is done.. its easy to do the communication part between matlab and 8051.
For dc motor you can take a look at the tutorial section.. visit the tutorial link at the top navigation
 swat like this.
Mon Dec 17 2007, 11:04 pm
#6
i tried the method to interface matlab and 8051 but it failed. Can i know how to identify what signal is being generated by the rs232 cable. For example if i send signal 2 in the cable, how can i identify wheter its signal 2 or something else is coming.
Mon Dec 17 2007, 11:22 pm
#7
Use a serial monitor software.. it will tell give you complete detail of data sent and received. Also it will tell you which software has opened serial port..
just try to send data using matlab.. once you succeed in sending data then you can move further.. check sent data of serial monitor software.. no need to interface anything..
Wed Dec 19 2007, 09:48 am
#8
hi ajay,
Its really intresting that we can access the serial port from matlab.How to write script to do that one because i am doing a project where i have to build a gui and access the serial port but i dont know the vb , in matlab its easy to build the gui .

Thank U
Wed Dec 19 2007, 11:18 am
#9
i have already given the link in my second post.. please check that tutorial.
http://cnx.org/content/m12062/latest/
 manuman like this.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm
Charlestehed
Wed Apr 24 2024, 05:20 pm
Robertgurse
Wed Apr 24 2024, 02:43 pm