It is currently Fri Sep 10, 2010 8:37 pm

News News of http://www.kerhuel.eu » http://www.kerhuel.eu

Simulink Embedded Coder for dsPIC/PIC24 Target

http://www.kerhuel.eu - News - Digest - Source Source » http://www.kerhuel.eu - News - Digest

  • Post
     

Support for returning structs from C-Function Call block

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=5" title="Request for new functions / Peripheral / Chip support">Request for new functions / Peripheral / Chip support</a></h5>


<b>Support for returning structs from C-Function Call block</b>

I'm not certain if this is possible, but it would be awesome if you could specify a struct that the c-function call block was returning and then the block would output the data on a bus with the appropriately named signals. Right now it's inconvenient and computationally wasteful to pack a struct into a vector of uints for the c-function call block and to then unpack it in Matlab.

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=5&amp;t=321"><b>more ...</b></a>


<b>Statistics</b> : 2 Post || 8 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=524&amp;sid=64bf72f2957f7eca884f6ae54c166c45">bmairs</a>
Link : Support for returning structs from C-Function Call block
Support for returning structs from C-Function Call block - Source Source
on Sat Aug 28, 2010 5:59 pm
 

bad installation

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=4" title="Requirement, Installation &amp; Configuration">Requirement, Installation &amp; Configuration</a></h5>


<b>bad installation</b>

Hi
i have installed on my pc windows 7 and matlab 2010a.
when i run install_dsPIC_R2010a, to install the dsPIC blocksets the installation is OK but the procedure don't ask me where install it.
and when i close matlab and i restart it i must reinstall the package.
I'm very tired to do it. i don't know what i do to solve this problem.

Thank in advance.
jirobai

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=4&amp;t=320"><b>more ...</b></a>


<b>Statistics</b> : 2 Post || 17 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=596&amp;sid=64bf72f2957f7eca884f6ae54c166c45">jirobai</a>
Link : bad installation
bad installation - Source Source
on Fri Aug 13, 2010 8:54 pm
 

PIC32 Bootloader memory offset

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=1" title="General Remark and Questions">General Remark and Questions</a></h5>


<b>PIC32 Bootloader memory offset</b>

Hi There,
I was wanting to use the PIC32 Bootloader to upload code for en embedded application. Use of the bootloader requires that the start vector for the application sofware has a memory offset added to the code and uses a custom set of *.ld files and bootloader memory file. Is there a way to edit the blockset /dspic target in order to add this ofset into the build sequence? Also, how could the scripts be modified to pull in the other custom files required?

Thanks
Matthew Love

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=1&amp;t=319"><b>more ...</b></a>


<b>Statistics</b> : 2 Post || 22 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=117&amp;sid=64bf72f2957f7eca884f6ae54c166c45">mlove</a>
Link : PIC32 Bootloader memory offset
PIC32 Bootloader memory offset - Source Source
on Thu Aug 12, 2010 10:14 am
 

I2C on PIC32

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=1" title="General Remark and Questions">General Remark and Questions</a></h5>
<b>I2C on PIC32</b>

Hi again Lubin,

Looks like my last thread got hijacked so here it is again....

I'm having some problems building a model to communicate between a PIC32 (32MX360F256L) and a Bosch accelerometer (BMA180) using an I2C bus for a heli autopilot application. Looking through the posts on the forum I think this problem was found by another user earlier this year and seems to fall over at the following point during the build..

dsPIC_32MX360F256L_AccelI2C.c:1: warning: Compiler option ignored due to lite-mode limitations
dsPIC_32MX360F256L_AccelI2C.c: In function `dsPIC_32MX360F256L_AccelI2C_step':
dsPIC_32MX360F256L_AccelI2C.c:48: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:55: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:58: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:68: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:71: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:78: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:81: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:93: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:96: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:103: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:106: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:118: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:121: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:128: error: union has no member named ...

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=1&amp;t=318"><b>more ...</b></a>


<b>Statistics</b> : 1 Post || 36 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=585&amp;sid=64bf72f2957f7eca884f6ae54c166c45">edlaurence</a>
Link : I2C on PIC32
I2C on PIC32 - Source Source
on Mon Aug 02, 2010 12:34 pm
 

Speeding up the chip

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=1" title="General Remark and Questions">General Remark and Questions</a></h5>
<b>Speeding up the chip</b>

I have a question:

I am working on a program in Simulink that models a 30f4011 chip as a sort of wireless node transmitter/receiver. The basic premise is that after every fixed period of time, it sends a data packet and then looks for an acknowledgement. If it does not receive one, it will resend (up to 9 times). I have accomplished this by creating an embedded matlab function, and I use a limited counter to keep track of time. Ideally I want the aforementioned period of time to be 1 microsecond or even 1 nanosecond, however I can not get it to run nearly this fast. I am reading the send data in matlab via a serial connection from a dsPICDEM2 board. How can I go about fixing this? I have attached the model for reference.

Thank you

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=1&amp;t=317"><b>more ...</b></a>


<b>Statistics</b> : 1 Post || 13 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=590&amp;sid=64bf72f2957f7eca884f6ae54c166c45">Jodoku</a>
Link : Speeding up the chip
Speeding up the chip - Source Source
on Sat Jul 31, 2010 8:07 pm
 

Error for having multiple dsPIC Master blocks

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=8" title="bug reports">bug reports</a></h5>
<b>Error for having multiple dsPIC Master blocks</b>

I have a model that contains only one dsPIC Master block from your blockset and yet I get the error for having multiple master blocks (this error should also say &quot;found&quot; instead of &quot;find&quot;). I've attached the model here. From removing each block at a time and checking for errors, it seems like the code thinks that the ECAN1 TX block is another master block for whatever reason.

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=8&amp;t=316"><b>more ...</b></a>


<b>Statistics</b> : 1 Post || 15 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=524&amp;sid=64bf72f2957f7eca884f6ae54c166c45">bmairs</a>
Link : Error for having multiple dsPIC Master blocks
Error for having multiple dsPIC Master blocks - Source Source
on Fri Jul 30, 2010 11:23 pm
 

Error loading example

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=8" title="bug reports">bug reports</a></h5>


<b>Error loading example</b>

Using Embedded Target for MICROCHIP dsPIC V3.2b on a Windows XP3 machine and MATLAB R2006b:
the following is reported in the MATLAB command window:

Warning: Undefined function or method 'exist' for input arguments of type 'cell'.
&gt; In C:\MATLAB\R2006b\toolbox\rtw\rtw\stf2target.p&gt;stf2target at 61
In general\private\openmdl at 13
In open at 146
In uiopen at 196
Warning: In instantiating linked block 'FlexBoard_Blinking_Led/Master' : Invalid setting in Master block (mask) 'Master' for parameter 'MCLR'.
&gt; In C:\DSPIC_Lib\blocks\dsPIC_CalculusTimeStep_initMask.p&gt;dsPIC_CalculusTimeStep_initMask at 6
In C:\DSPIC_Lib\blocks\dsPIC_UART_TX_Labview_Matlab_callback.p&gt;dsPIC_UART_TX_Labview_Matlab_callback at 36
In general\private\openmdl at 13
In open at 146
In uiopen at 196
Warning: Error evaluating 'LoadFcn' callback of Master block (mask) 'Master'. Error using ==&gt; get_param
block_diagram does not have a parameter named 'GMAKE_PLACE'.
&gt; In C:\DSPIC_Lib\blocks\dsPIC_CalculusTimeStep_initMask.p&gt;dsPIC_CalculusTimeStep_initMask at 6
In C:\DSPIC_Lib\blocks\dsPIC_UART_TX_Labview_Matlab_callback.p&gt;dsPIC_UART_TX_Labview_Matlab_callback at 36
In general\private\openmdl at 13
In open at 146
In uiopen at 196

Please advise.

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=8&amp;t=315"><b>more ...</b></a>


<b>Statistics</b> : 6 Replies || 39 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=594&amp;sid=64bf72f2957f7eca884f6ae54c166c45">mickpowell</a>
Link : Error loading example
Error loading example - Source Source
on Wed Jul 21, 2010 2:31 pm
 

I2C on PIC32

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=1" title="General Remark and Questions">General Remark and Questions</a></h5>


<b>I2C on PIC32</b>

Hi Lubin,

I'm having some problems building a model to communicate between a PIC32 (32MX360F256L) and a Bosch accelerometer (BMA180) using an I2C bus for a heli autopilot application. Looking through the posts on the forum I think this problem was found by another user earlier this year and seems to fall over at the following point during the build..

dsPIC_32MX360F256L_AccelI2C.c:1: warning: Compiler option ignored due to lite-mode limitations
dsPIC_32MX360F256L_AccelI2C.c: In function `dsPIC_32MX360F256L_AccelI2C_step':
dsPIC_32MX360F256L_AccelI2C.c:48: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:55: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:58: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:68: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:71: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:78: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:81: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:93: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:96: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:103: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:106: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:118: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:121: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:128: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:131: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:142: error: union has ...

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=1&amp;t=314"><b>more ...</b></a>


<b>Statistics</b> : 7 Replies || 70 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=585&amp;sid=64bf72f2957f7eca884f6ae54c166c45">edlaurence</a>
Link : I2C on PIC32
I2C on PIC32 - Source Source
on Sun Jul 11, 2010 8:23 pm
 

Configuration error

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=4" title="Requirement, Installation &amp; Configuration">Requirement, Installation &amp; Configuration</a></h5>
<b>Configuration error</b>

hi there:
thank you for such helpful toolbox;
im an under graduate student working of a task for interfacing PC32 with matlab
having the mat lab 2010a, also have 2007b installed in PC
a new micro controller user using microchip Pic32 starter kit which includes PIC32MX360F512L

after placing the four blocks of (Configure Model for dsPIC,Generate Code ,Master,Configuration)
im having an error when clicking the configurations box which appears multiple error
about

<img src="http://www.freeimagehosting.net/uploads/919c76f6f3.jpg" alt="Image" />

here is the matlab error message

----------------------------------------------------
Warning: The following error occurred processing the System Target File '':

Undefined function or variable &quot;myData&quot;.

&gt; In stf2target at 61
In c:\program files\matlab\r2010a\blocks\dsPIC_ConfigureModelFordsPICTarget.p&gt;dsPIC_ConfigureModelFordsPICTarget at 42
Warning: The following error occurred processing the System Target File '':

Undefined function or variable &quot;myData&quot;.

&gt; In c:\program files\matlab\r2010a\blocks\dsPIC_ConfigureModelFordsPICTarget.p&gt;dsPIC_ConfigureModelFordsPICTarget at 42
&gt;&gt;
----------------------------------------------------------------------------------------------------
what is the solution for that?

regards
Ahmed

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=4&amp;t=313"><b>more ...</b></a>


<b>Statistics</b> : 1 Post || 31 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=593&amp;sid=64bf72f2957f7eca884f6ae54c166c45">The Man</a>
Link : Configuration error
Configuration error - Source Source
on Thu Jul 08, 2010 10:25 am
 

Using Output Compare

<h5><a href="http://www.kerhuel.eu/forum/viewforum.php?f=1" title="General Remark and Questions">General Remark and Questions</a></h5>


<b>Using Output Compare</b>

Hello Lubin,

I just wanted to confirm that I'm using the OC Output Compare block correctly...

First off, it seems like OC1max is a constant that is relevant to the chip. Is there a way I inherit it from the chip, because just making a constant block called does not work.

Additionally, if I wanted to set up a 50% wave at 2 KHz, then I would need Max / Channel to be set to 0.0005 and up would be (0.00025 / 0.0005 )* OC1max?

What do I set Period to, as it needs an integer input?

Thanks!

<a href="http://www.kerhuel.eu/forum/viewtopic.php?f=1&amp;t=312"><b>more ...</b></a>


<b>Statistics</b> : 2 Post || 70 Views
Post by <a href="./memberlist.php?mode=viewprofile&amp;u=564&amp;sid=64bf72f2957f7eca884f6ae54c166c45">jmednick</a>
Link : Using Output Compare
Using Output Compare - Source Source
on Tue Jun 29, 2010 9:59 pm
 
 

Login  •  Register


Statistics

Total posts 1158 • Total topics 253 • Total members 209

cron