Search found 16 matches

by coolj
Tue Aug 30, 2011 9:24 pm
Forum: General Remark and Questions
Topic: C function call variable input size
Replies: 0
Views: 1833

C function call variable input size

Hi Lubin! We have a need to pass a constant along with a vector (mux'd array of scalars) to a C function. Our prototype would be something like this: foo(unsigned int, unsigned char*); Is there a way to do this? In your C function call, all input ports have to have the same size. So, I can't see a w...
by coolj
Mon Jan 24, 2011 3:34 am
Forum: General Remark and Questions
Topic: Sample time C-function Call
Replies: 6
Views: 3532

Re: Sample time C-function Call

Here is some background for inline parameters needing to be enabled to prevent inf-time functions from being called every time step. http://www.kxcad.net/cae_MATLAB/toolbox/simulink/ug/f7-9753.html inf The meaning of this sample time depends on whether the active model configuration's inline paramet...
by coolj
Fri Jan 21, 2011 6:10 pm
Forum: General Remark and Questions
Topic: Sample time C-function Call
Replies: 6
Views: 3532

Re: Sample time C-function Call

Hi Lubin, I had a similar issue with version 3.4b of your blockset. My inf time functions that were supposed to run only once were being called every time step. Once I enabled Simulation -> Configuration -> Optimization -> Inline parameters, the inf-time initialization C functions were correctly cal...
by coolj
Fri Jan 21, 2011 6:25 am
Forum: General Remark and Questions
Topic: explorer16 demo still working?
Replies: 2
Views: 1943

Re: explorer16 demo still working?

Confirmed: the two filter outputs need to be set to uint16...then everything works!

-Justin
by coolj
Fri Jan 21, 2011 6:18 am
Forum: General Remark and Questions
Topic: explorer16 demo still working?
Replies: 2
Views: 1943

explorer16 demo still working?

Hi Lubin, I was having some troubles with my own model, so I decided to revert back to the dsPIC_33f_Explorer16.mdl that you provide to make sure everything on my explorer 16 board was still working well. The model compiled fine, but I got strange output when adjusting the potentiometer - it seems l...
by coolj
Thu Jan 20, 2011 8:16 am
Forum: Version compatibility issues
Topic: SLUGS - an open source autopilot
Replies: 24
Views: 8258

Re: SLUGS - an open source autopilot

Hi Lubin, Mariano, Were you able to compile the controlMCUSlugsMKII.mdl file w/ v3.4 of the blockset? I am using r2010b, v3.4b of the blockset, and the 13d8c62 version of Mariano's awesome AP project. I was able to successfully compile the sensorMCUSlugsMKII.mdl file after adding four missing variab...
by coolj
Wed Jan 12, 2011 1:02 am
Forum: General Remark and Questions
Topic: Link Error: Could not allocate data memory
Replies: 0
Views: 4531

Link Error: Could not allocate data memory

xxxxxx.o: Link Error: Could not allocate section .nbss, size = 64 bytes, attributes = bss near Link Error: Could not allocate data memory Link step failed. If you're trying to compile source files in MPLAB (for debugging purposes) that compile fine in Matlab, but run into the error above, try enabl...
by coolj
Wed Jan 12, 2011 12:41 am
Forum: MPLAB IDE tricks
Topic: debugging with MPLAB
Replies: 0
Views: 961

debugging with MPLAB

In order to debug code generated by RTW and Lubin's blockset in MPLAB v8.60 (where you can follow the execution of a program, set breakpoints, etc), I have found you need to do one of the following: 1) Manually create your own project, and manually add the .c and .h files to your project; compile an...
by coolj
Sun Jan 09, 2011 10:35 pm
Forum: General Remark and Questions
Topic: how to send data using rs232gui
Replies: 3
Views: 2183

Re: how to send data using rs232gui

One other question:

When compiling the FlexBoard_Blinking_Led.mdl, the upper right corner of blocks are an apparent time. Can you tell me what this time is and how to configure it?

Thanks!
Justin
Printscreen_089.gif
by coolj
Sun Jan 09, 2011 10:13 pm
Forum: General Remark and Questions
Topic: how to send data using rs232gui
Replies: 3
Views: 2183

Re: how to send data using rs232gui

Lubin, Thanks as always! The example worked great on the explorer 16 board after making a couple modifications (digital output pin, RS232 port). I attached the model that worked well on my explorer 16 for others. A note for others: make sure to select the script button in the rs232gui "dflt Sig...
by coolj
Fri Jan 07, 2011 7:54 am
Forum: General Remark and Questions
Topic: how to send data using rs232gui
Replies: 3
Views: 2183

how to send data using rs232gui

Hi Lubin!

Do you have any examples on how to send data from Matlab to the dspic using rs232gui? I believe it is possible since you have two "Send" buttons, but I don't know how to configure my model to accept the incoming data.

Can you help?

Much appreciated!
Justin
by coolj
Tue Nov 30, 2010 8:00 pm
Forum: Requirement, Installation & Configuration
Topic: How to configure PLL and maintain correct time
Replies: 8
Views: 2798

Re: How to configure PLL and maintain correct time

RESOLVED.

For some reason, a re-load of Matlab seemed to solve the problem...anyway, it's working great now!

Thanks for your help, Lubin!

Justin
by coolj
Tue Nov 30, 2010 7:14 pm
Forum: Requirement, Installation & Configuration
Topic: How to configure PLL and maintain correct time
Replies: 8
Views: 2798

Re: How to configure PLL and maintain correct time

Hi Lubin,

I believe I have the configuration bits set correctly in MPLAB to read from program code - I attached a screenshot for your verification.

I also attached the exact window showing the updated MIPS / PLL setting.

Justin
mplab_capture.png
Configuration Bits

PLL_settings.png
PLL_settings.png (23.63 KiB) Viewed 2789 times
by coolj
Tue Nov 30, 2010 7:12 am
Forum: Requirement, Installation & Configuration
Topic: How to configure PLL and maintain correct time
Replies: 8
Views: 2798

Re: How to configure PLL and maintain correct time

No bootloader being used. I'm programming it directly from ICD3.

I attached the model - it's exactly the same as the explorer 16 demo but with the PLL activated for 40 MIPS (based on the 8 MHz Explorer 16 xtal).
by coolj
Mon Nov 29, 2010 9:30 pm
Forum: Requirement, Installation & Configuration
Topic: How to configure PLL and maintain correct time
Replies: 8
Views: 2798

Re: How to configure PLL and maintain correct time

Thanks for the lightning-fast response, Lubin! Yes, I increased the speed using the master block "Activate PLL" with MIPS=40000000. In fact, this is the only thing that I changed from the default example model for the explorer 16 board. It appears that the time step followed that, as the L...
by coolj
Mon Nov 29, 2010 7:42 pm
Forum: Requirement, Installation & Configuration
Topic: How to configure PLL and maintain correct time
Replies: 8
Views: 2798

How to configure PLL and maintain correct time

Lubin - great blockset! I'm currently evaluating if this would work for my current application. I have the explorer 16 board with your example code up-and-running on it. However, I am trying to understand how to increase the MIPS of the dspic33fj256gp710 to the max 40 mips without affecting the base...

Go to advanced search