Sending data from picgui block to dspic and filtering it
I used fdatool to generate a simple lowpass filter for simulink, and included it in my project...
The objective was to test the filter, as a didactical example, so i wanted to send the data through uart to the dsPIC, filter it, and show it in matlab...
I used the picgui bloc to plot the data and to send the signal i want to filter, but something is not working...
This is the script for the picgui:
idx = find(Rn > 65535 / 2);
What i wanted to do is to generate a sin signal, divide it's values in two bytes, and send it to the uart... my model would read from the uart the data, convert it to the corresponding number, apply the low pass filter, and send it to uart-matlab block...
However, the data that i convert from the bytes that arrive to the uart is not the data that i send from the picgui...
Could you help me a bit with this? I'll send you the model and a image of the picgui plot.