how can i make the PIC run with matlab simulation

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

how can i make the PIC run with matlab simulation

Postby YHSam » Wed Jul 15, 2009 1:27 am

how can i make the PIC run together with matlab simulation. i means my technique algorithm is program in PIC. and the PIC is connect to PC via DAQ card. my matlab will calculate the programmed technique algorithm in PIC.

question:
which PIC is suitable and what code can make the PIC run with PC
YHSam
Greenhorn
 
Posts: 3
Joined: Fri Jun 26, 2009 4:30 pm

Re: how can i make the PIC run with matlab simulation

Postby robosang » Wed Jul 15, 2009 9:30 am

Sam, I don really understand what you need to do. If your PIC is connected to DAQ card, what kind of interface it uses? UART? Parallel? SPI? Analog or other?

Normally, if your algorithm in PIC is going to be evaluated, your PIC should provide an output, analog or serial might be a choice. If this is the case, a lot of PIC can be your choice, you can use PIC16F877A, PIC16F887, PIC18F4520, PIC18F....... I can list more than 20 models that would support this development.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: how can i make the PIC run with matlab simulation

Postby YHSam » Wed Jul 15, 2009 11:56 am

My project uses MATLAB to develop a Band-stop filter, type Butterworth to be spesific for vibration control of a flexible manipulator. My other two friends have also developed an equation for input shaping technique to control the vibration of the flexible manipulator.


I'd like to ask whether there are any previous projects or any examples of programs that convert the Band-stop filter equations or input shaping technique's equations that are gained from MATLAB into PIC programming codes.


In other words, the band-stop filter equation (Laplace transform equations) from MATLAB has to be embedded into the PIC.
In another project(my friends' project), the input shaping technique equations have to be embedded into the PIC too.
YHSam
Greenhorn
 
Posts: 3
Joined: Fri Jun 26, 2009 4:30 pm

Re: how can i make the PIC run with matlab simulation

Postby ober » Wed Jul 15, 2009 5:44 pm

YHSam WROTE:I'd like to ask whether there are any previous projects or any examples of programs that convert the Band-stop filter equations or input shaping technique's equations that are gained from MATLAB into PIC programming codes.


As far as I know, you may try to search application notes from Microchip website: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1469. You might be able to get some notes and source code on FFT or other algorithm.

Anyway, embedding the filter equations will be possible as it is just mathematical functions. But controlling the vibration, this is the challenging part. Is not only the software, but the hardware. Anyway, good luck! Do update us if you have any findings.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 4 guests

cron