Page 1 of 1

Simulink interface dspic

Posted: Tue Jan 27, 2009 2:30 pm
by zheng
Hi Lubin,

Currently I am working on a microcontroller project. I need to transmit real time data from simulink to PIC with RS232. I downloaded "Embedded Target for Microchip dsPIC" toolbox, and added UART configuration, Tx Output, but I failed to send data to pic. I used matlab to send directly and it can work. Is there anything else I should do to get it work?
Really appresicated if you can help.

Regards
Zheng jun

Re: Simulink interface dspic

Posted: Thu Jan 29, 2009 12:21 pm
by LubinKerhuel
Hi Zheng,

This blockset aims to compile the simulink model for the PIC/dsPIC. i.e. execute the simulink model inside the microcontroller. Thus, the Tx block simulated on a PC platform will have no effect, but once compiled and upload on the microcontroller, it will output data stream on the dsPIC Tx pin.
Anyway, you could use the graphical interface RS232gui to send and receive data through rs232 port in your your matalab environment.

Or you may be interested by a blockset written by Leonardo Daga that can send/receive data from the simulink model : see http://www.mathworks.com/matlabcentral/ ... thors/8294
Unfortunatly, it has not been compiled with a recent matlab version...