Search found 56 matches
- Sat Nov 27, 2010 6:57 pm
- Forum: Version compatibility issues
- Topic: SLUGS - an open source autopilot
- Replies: 24
- Views: 435490
Re: SLUGS - an open source autopilot
I forgot to add that the only thing I did to compile was to double click the configuration block, then adding the errata and large data model flags to the compiler options. After that it compiled with no issue
- Sat Nov 27, 2010 6:54 pm
- Forum: Version compatibility issues
- Topic: SLUGS - an open source autopilot
- Replies: 24
- Views: 435490
Re: SLUGS - an open source autopilot
Dan, I confirm the version you uploaded compiles without a problem in my setup. This really narrows it to either your setup (compiler/Matlab version/ dsPIC Blockset version) or OS version. I am really sorry you are going through this but neither Lubin nor I have been able to reproduce it and, as you...
- Fri Nov 26, 2010 5:22 pm
- Forum: Version compatibility issues
- Topic: SLUGS - an open source autopilot
- Replies: 24
- Views: 435490
Re: SLUGS - an open source autopilot
Hello, Sorry for the long silence. I was out of town. I agree completely with Lubin. lseek() and write () are NOT used at all neither by Simulink (on a 2007A Windows XP configuration) nor by the custom C code I wrote for the low-level drivers. I think this is something completely different. It could...
- Mon Jun 29, 2009 12:31 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: PIC32
- Replies: 2
- Views: 11041
Re: PIC32
I've looked at both and actually tested but of them and I have to say Lubin's is much better than Microchip's. For instance the C function call that they implement you can only pass scalars (i.e. no vectors) which is essentially useless. Also all of their blocks are polled-based instead of interrupt...
- Thu Feb 12, 2009 8:45 pm
- Forum: General Remark and Questions
- Topic: Problem about QEI and DisPIC33fj256mc710
- Replies: 4
- Views: 10256
Re: Problem about QEI and DisPIC33fj256mc710
Hello Magic, After reading the posts it is hard for me to see if the QEI is not working or if the serial is not sending the data. Can you confirm with a scope that when you are moving the motor you actually get a train of pulses from your encoder? Because since I had the code working and Ender modif...
- Wed Feb 11, 2009 8:11 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: Did anyone implement a controller in dsPIC by this toolbox?
- Replies: 15
- Views: 30138
Re: Did anyone implement a controller in dsPIC by this toolbox?
Hello Lubin,
This seems to be quite an interesting comparison, would you post your results if/when you have them to see which is more efficient?
Thanks
This seems to be quite an interesting comparison, would you post your results if/when you have them to see which is more efficient?
Thanks
- Wed Feb 11, 2009 8:09 pm
- Forum: General Remark and Questions
- Topic: Problem using ADC and SPI
- Replies: 15
- Views: 17878
Re: Problem using ADC and SPI
Hello All, From what I read seems that your SPI is an error mode. If you get an overwrite error, your dsPIC will continue working normally but your SPI engine will freeze until you aknowledge the error and clear the error flag. It is a good idea enable the SPI error interrupt and handle the interrup...
- Thu Jan 22, 2009 2:58 am
- Forum: Advanced Simulink & RTW Questions
- Topic: Block Orderring fails for Blocks with infinite sample time
- Replies: 2
- Views: 11610
Re: Block Orderring fails for Blocks with infinite sample time
Hello Lubin,
Thanks for such a quick response. This solution works like a charm.
Thanks!
Thanks for such a quick response. This solution works like a charm.
Thanks!
- Wed Jan 21, 2009 9:06 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: Block Orderring fails for Blocks with infinite sample time
- Replies: 2
- Views: 11610
Block Orderring fails for Blocks with infinite sample time
Hello Lubin I have several "init" C- function blocks that I need to execute at a specified order upon booting the dsPIC, if I use the Block ordering option only the last block in the sequence order gets included. Right now I guess I can work around this by doing just one C-block that calls all in th...
- Fri Jan 16, 2009 7:28 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: fuzzy logic
- Replies: 8
- Views: 21352
Re: fuzzy logic
Hello Salemimoh, I am not familiar with the Fuzzy logic toolbox (blockset?) in Matlab so I can not help you there. But I have previously encountered similar stack overflow problems, and as I mentioned in previous post, making the arrays and variables static (or persistent in matlab) did solve the pr...
- Thu Jan 15, 2009 8:45 pm
- Forum: General Remark and Questions
- Topic: C30 compiler problem
- Replies: 1
- Views: 4535
Re: C30 compiler problem
Sure,
Just post more details because this is quite vague. Post your model, or what you are trying to accomplish and which dsPIC you are using.
Mariano
Just post more details because this is quite vague. Post your model, or what you are trying to accomplish and which dsPIC you are using.
Mariano
- Thu Jan 15, 2009 2:00 am
- Forum: Advanced Simulink & RTW Questions
- Topic: fuzzy logic
- Replies: 8
- Views: 21352
Re: fuzzy logic
Can you post a bit more about what you are doing (application wise) and which dsPIC you are using? Not really sure what is wrong. Evidently PC is getting lost for some reason.
- Thu Jan 15, 2009 12:48 am
- Forum: General Remark and Questions
- Topic: ADC, QEI and PWM on dsPIC30f4012 problem
- Replies: 3
- Views: 6908
Re: ADC, QEI and PWM on dsPIC30f4012 problem
Thanks Lubin,
Yes, that is correct. Glad it worked
Cheers
Mariano
Yes, that is correct. Glad it worked
Cheers
Mariano
- Sun Jan 11, 2009 7:09 am
- Forum: Advanced Simulink & RTW Questions
- Topic: fuzzy logic
- Replies: 8
- Views: 21352
Re: fuzzy logic
If you are stepping through see in which instruction it fails. This might help us to help you. Also, try compiling the model with a "far" memory model. See the C30 Documentation. Also it might just be that the chip you are trying to use does not have enough RAM to perform whatever it is you are tryi...
- Sun Jan 11, 2009 6:58 am
- Forum: General Remark and Questions
- Topic: problem with master and ADC block
- Replies: 4
- Views: 9131
Re: problem with master and ADC block
Hello All, This problem, which really is not a problem but a compiler feature is related with near and far code (data and code) take a look at the C30 compiler documentation so you can set the flags accordingly in the compiler settings in matlab. I've been through this error before. Regarding the lo...
- Sun Jan 11, 2009 5:17 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Encoder interfacing with dsPIC33FJ256MC710
- Replies: 1
- Views: 10101
Re: Encoder interfacing with dsPIC33FJ256MC710
Hello Giulio, It seems like your problem is a bit more related to design rather than the blockset itself. If you need to read more than one QEI channel, than there is not much you can do with a dsPIC. You can try using the input capture, but be aware that you have to write your own logic to determin...
- Mon Nov 03, 2008 2:58 am
- Forum: Advanced Simulink & RTW Questions
- Topic: C-Function Call and Muxes - to solve
- Replies: 3
- Views: 12589
Re: C-Function Call and Muxes - to solve
Hello Lubin, Just wanted to follow up on the Muxes issue. I can positively confirm that Muxes do not work with the code translation. I don't know if it is the matlab version, the blockset version or some of the code simplification settings. But to work around this what I do is for every mux I use in...
- Mon Sep 01, 2008 3:37 am
- Forum: Advanced Simulink & RTW Questions
- Topic: C-Function Call and Muxes - to solve
- Replies: 3
- Views: 12589
C-Function Call and Muxes - to solve
Hello Lubin, This another bug that has been killing me all day and have not found a work-around. I have three separate signals that come from different sources and have different widths. They are joined by a mux and then passed on to a C-Function call. The problem is that the signal is overall 46 by...
- Mon Sep 01, 2008 3:30 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Support for CAN Module?
- Replies: 34
- Views: 69582
Re: Support for CAN Module?
Yes I second that. ECAN Please
!!
![Smile :-)](./images/smilies/icon_smile.gif)
- Sun Aug 31, 2008 6:45 pm
- Forum: bug reports
- Topic: ADC Input block - solved
- Replies: 4
- Views: 14610
Re: ADC Input block
Hello Lubin, I would also add to Bernard's post on the ADC the following bug: I have AN channels 0-16 except for AN2 which is SPI1 SSL in 33FJ256MC710. So in the AN dialog box I have: [0 1 3 4 5 6 7 8 9 10 11 12 13 15 16] Just for the sake of completeness I have a digital output block set with infin...
- Fri Aug 22, 2008 5:38 pm
- Forum: bug reports
- Topic: Matlab Variables do not Propagate to C-Function Call Block
- Replies: 2
- Views: 10365
Matlab Variables do not Propagate to C-Function Call Block
Hello Lubin, I am currently working on 0.98d so maybe you already fixed that in the latest version (which I hope you'll send it to me when you get back from vacations :-) ) But the issue is the following. I have a matlab script that initializes different variables most of it related to sizes and loc...
- Fri Aug 22, 2008 5:32 pm
- Forum: General Remark and Questions
- Topic: undefined reference to `sbrk'
- Replies: 1
- Views: 5921
Re: undefined reference to `sbrk'
I finally solved this issue. It turns out that malloc and memcpy use sbrk which for some reason it is not compiled into the coff. Anyways, I found in the periphereal library documentation that microchip provides the source for sbrk with the standard C30 instalation, so I just added the source to the...
- Thu Aug 21, 2008 10:21 pm
- Forum: General Remark and Questions
- Topic: undefined reference to `sbrk'
- Replies: 1
- Views: 5921
undefined reference to `sbrk'
Hello Lubin, I've spent much of the day today trying to debug this error with no luck: C:\PROGRA~1\MICROC~1\MPLABC~1\lib\libc-coff.a(xgetmem.o)(.libc+0x4):/home/guymc/build/3.10/build_20080424/src/standardc/sxl/xgetmem.c: undefined reference to `sbrk' C:\Program Files\Microchip\MPLAB C30\bin\bin/pic...
- Thu Aug 14, 2008 5:36 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: Rx Interrupt buffer size
- Replies: 12
- Views: 28868
Re: Rx Interrupt buffer size
Thanks Lubin! I will try this and report back. I am planning on writing the GPS reader/decoder in a C function. Once I have it ready I will post it as an example and see if I can get any feedback from you or anybody else in the forum.
Thanks!
Thanks!
- Tue Aug 12, 2008 9:26 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: Rx Interrupt buffer size
- Replies: 12
- Views: 28868
Re: Rx Interrupt buffer size
Hello Lubin, I hope you are enjoying your vacation :-). Thanks so much for your quick response. This example will help a lot thanks! And will solve another question I had. But going back to my original question (and feature request) which is reletad to the RX block and not the TX block as you showed...
- Mon Aug 11, 2008 6:57 am
- Forum: Advanced Simulink & RTW Questions
- Topic: Rx Interrupt buffer size
- Replies: 12
- Views: 28868
Rx Interrupt buffer size
Hello Lubin, I understand that the RX circular buffer size can be set from the UART configuration block, but is there a way to configure the UART Rx block to send out more than one byte? For instance, I don't know if it is possible but I would like to have a buffer of say 256 bytes and have the RX B...
- Thu May 29, 2008 1:12 am
- Forum: bug reports
- Topic: Possible Bug in ADC in 33FJ256MC710
- Replies: 1
- Views: 9806
Possible Bug in ADC in 33FJ256MC710
Hello Lubin, I am trying to use the 12-bit ADC block in the 33FJ256MC710, I drop the block and select channels 0-7 and I get the following error when I compile: SPIMasterNoDMA.c:167: error: 'ADC1BUF1' undeclared (first use in this function) SPIMasterNoDMA.c:167: error: (Each undeclared identifier is...
- Mon May 26, 2008 12:20 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Errata for dsPIC33FJXXXMCX06/X08/X10
- Replies: 3
- Views: 11297
Re: Errata for dsPIC33FJXXXMCX06/X08/X10
Hello Lubin, Thanks for your quick response. I will include that in my compiler. As for the conditions, I guess I can look at the generated source via simulink's HTML report. Just one question then: All the initialization of the periphereals (unless I explcitly say it changes, like the SPI option) h...
- Sun May 25, 2008 8:18 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Errata for dsPIC33FJXXXMCX06/X08/X10
- Replies: 3
- Views: 11297
Errata for dsPIC33FJXXXMCX06/X08/X10
Hello Lubin, First of all As you have probably guessed by now I am currently working with the 33FJ256MC710 and they recently (April 18) came out with an errata plagued with problems in the ADC, UART, SPI, PWM, OC and DMA. Too late for me to change the chip :evil: . Now,almost all of those peripheral...
- Sat May 17, 2008 2:32 am
- Forum: Website
- Topic: Set up a Wiki ?
- Replies: 5
- Views: 14452
Re: Set up a Wiki ?
Hey Lubin,
I think it would be a good idea to provide a way to include examples and user-made tutorials. Never worked myself in a wiki before, but if you decide that a wiki is the way to go, then I will be happy to include examples of what I made and maybe some quick tutorials![Smile :-)](./images/smilies/icon_smile.gif)
I think it would be a good idea to provide a way to include examples and user-made tutorials. Never worked myself in a wiki before, but if you decide that a wiki is the way to go, then I will be happy to include examples of what I made and maybe some quick tutorials
![Smile :-)](./images/smilies/icon_smile.gif)
- Sat May 17, 2008 12:20 am
- Forum: bug reports
- Topic: Passing a Vector to the C-Function Call block
- Replies: 5
- Views: 15375
Re: Passing a Vector to the C-Function Call block
Yes, that took care of it. I confirm the work around solves the problem.
Thanks for excellent support!
Mariano
Thanks for excellent support!
Mariano
- Sat May 17, 2008 12:14 am
- Forum: bug reports
- Topic: Passing a Vector to the C-Function Call block
- Replies: 5
- Views: 15375
Re: Passing a Vector to the C-Function Call block
Thanks for a very quick response. I will try what you suggest and report back.
If it does not work I will wait for the next version.
DMA SPI si comming along, hope to give positive reports soon![Smile :-)](./images/smilies/icon_smile.gif)
Thanks!
If it does not work I will wait for the next version.
DMA SPI si comming along, hope to give positive reports soon
![Smile :-)](./images/smilies/icon_smile.gif)
Thanks!
- Fri May 16, 2008 10:18 pm
- Forum: bug reports
- Topic: Passing a Vector to the C-Function Call block
- Replies: 5
- Views: 15375
Passing a Vector to the C-Function Call block
Hello Lubin, I am trying to pass a vector to the C-Function Call block but apparently it is only getting the first element in that vector: You can see in the image shown below I assemble a vector using a Mux, and then pass it to the C function call, but the call to the function call is this: * S-Fun...
- Thu May 15, 2008 6:25 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: How much RAM area can a program use?
- Replies: 12
- Views: 28364
Re: How much RAM area can a program use?
Masaki, The only thing that I noticed from your code is that WriteHistory is called every three seconds, which seems kind a long considering your main sample rate is 0.001, but this by no means implies it is wrong. Also, you did not post the H-files, but in your function declarations (i.e. you C fil...
- Wed May 14, 2008 7:55 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Configuration Option Missing in Master Block
- Replies: 5
- Views: 14109
Re: Configuration Option Missing in Master Block
Hey Lubin, You had me worried for a while, 'cause my board had already been sent to manufacture and I had only PGC2/PGD2 wired :shock: . Anyways, I found in the dsPIC33F family reference manual Section 24.2.1 that you can use any pin pair to program the device (you can not mix and match i.e. PGC1/PG...
- Wed May 14, 2008 7:51 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: How much RAM area can a program use?
- Replies: 12
- Views: 28364
Re: How much RAM area can a program use?
Hello Masaki, It's kind of hard to help you without seeing the overall model and the C-source. I understand if you can not post your model, so I will do my best to help you out from what I see. First, if you are using the C-function call block in your model, then your functions should have the follo...
- Tue May 13, 2008 5:12 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: How much RAM area can a program use?
- Replies: 12
- Views: 28364
Re: How much RAM area can a program use?
Thanks for posting that information Masaki. I am sure many will find it useful. I could not make in-line C program work correctly from some unknow reason. When you say that you were not able to get the in-line C program to work, do you mean the C function call inside the Simulink Model. If so, I wou...
- Tue May 13, 2008 1:18 am
- Forum: bug reports
- Topic: CAN module with dspic33fj256gp710 or pic24fj128ga010
- Replies: 3
- Views: 12714
Re: CAN module with dspic33fj256gp710 or pic24fj128ga010
Hello Martin, In case you've gotten ECAN to work using C function calls would you mind posting about your results and maybe your model/code? In that way we can all take advantage of what is being done while Lubin catches up :-). You can read about the QEI (http://www.kerhuel.eu/forum/viewtopic.php?f...
- Tue May 13, 2008 1:13 am
- Forum: Advanced Simulink & RTW Questions
- Topic: How much RAM area can a program use?
- Replies: 12
- Views: 28364
Re: How much RAM area can a program use?
Hello All, So your general advise is to use inline parameters always? or just for this application? Also, I noticed that Masaki's model was not posted, could we at least know what dsPIC is being used and at what sampling frequency and Fcy, just to have an upper bound in case someone else is using th...
- Tue May 13, 2008 1:07 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Request Support for DSPIC33FJ64(128)MC802
- Replies: 9
- Views: 20099
Re: Request Support for DSPIC33FJ64(128)MC802
Hello Lubin, That sounds great! I have two dsPICs in a UAV autopilot, one is the sensor MCU and the other is the control, both will exchange information between them using SPI clocked as fast as I can get it to work. One is the master and the other is the slave (obviously :-) ). I am planning on usi...
- Tue May 13, 2008 12:56 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Configuration Option Missing in Master Block
- Replies: 5
- Views: 14109
Re: Configuration Option Missing in Master Block
Ok Lubin,
I will do that. One question... do you know if it will program regardless of which PGC/PGD I connect to?
Thanks for the response![Smile :-)](./images/smilies/icon_smile.gif)
I will do that. One question... do you know if it will program regardless of which PGC/PGD I connect to?
Thanks for the response
![Smile :-)](./images/smilies/icon_smile.gif)
- Mon May 12, 2008 9:38 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Configuration Option Missing in Master Block
- Replies: 5
- Views: 14109
Configuration Option Missing in Master Block
Hello Lubin, I have the following request: Many of the high-end dsPics have more than one PGC/PGD ports and these are used to program and debug. The selection of which to use is set using configuration register FICD (like crystal, PBOR, etc...) but your Master block does not have that option. I woul...
- Mon May 12, 2008 9:26 pm
- Forum: General Remark and Questions
- Topic: tutorial
- Replies: 1
- Views: 3838
Re: tutorial
Hello Laura, If you read the tutorials at http://www.kerhuel.eu/RTWdsPIC/examples/index.html that should get you started. Regarding the manual, every block is documented and you can read it off the website or in Matlab's Help once you install the blockset
Hope this Helps
Mariano
Hope this Helps
Mariano
- Wed May 07, 2008 9:15 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: Sintax Error in Microchip Header File? - .c and .s ext files
- Replies: 3
- Views: 13921
Re: Sintax Error in Microchip Header File?
It turns out I found the problem. Actually there were 2 problems. I hope Lubin has a clear explanation for the first one: 1.- H File: The H file SHOULD NOT go in the Simulation->Config Parameters dialog. You just need to include it in your C file. No clue why. 2.- DEE.C and DEE.S both created a DEE....
- Wed May 07, 2008 8:46 pm
- Forum: Advanced Simulink & RTW Questions
- Topic: Sintax Error in Microchip Header File? - .c and .s ext files
- Replies: 3
- Views: 13921
Sintax Error in Microchip Header File? - .c and .s ext files
Hello Lubin, I am trying to implement the software emulation EEPROM as described in Microchip's App Note AN1095 http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en530593 . This is what I am doing: I downloaded the code and renamed the C, S and H files to DEE.c, DEE...
- Sat Apr 26, 2008 5:37 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Request Support for DSPIC33FJ64(128)MC802
- Replies: 9
- Views: 20099
Re: Request Support for DSPIC33FJ64(128)MC802
Thanks Lubin for pointing that out. If I use this small chip (the 28-pin one) most likely I will not be needing ECAN (or CAN) but rather just serial, SPI, ADC, etc... So at least on my side I have no particular hurry for ECAN device support. For the 710 (the big one) CAN(ECAN) willl be a feature tha...
- Fri Apr 25, 2008 3:16 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Request Support for DSPIC33FJ64(128)MC802
- Replies: 9
- Views: 20099
Re: Request Support for DSPIC33FJ64(128)MC802
Hello Lubin, I will not be using them immediately. Right now I am using the 33F256MC710 which is on the opposite side of the scale (their biggest chip) and is fully supported by your blockset, but certainly as soon as you support these new parts I will start using them for a side project I am workin...
- Thu Apr 24, 2008 6:22 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Request Support for DSPIC33FJ64(128)MC802
- Replies: 9
- Views: 20099
Request Support for DSPIC33FJ64(128)MC802
Hello Lubin, Microchip has recently started sampling the DSPIC33FJ64MC802 and the DSPIC33FJ128MC802, to become their smallest chips with DMA available (28 pins) and they are conveniently available in PDIP package which makes them easy to prototype. Would you be so kind to have those chips available ...
- Fri Mar 21, 2008 3:56 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Implementing the C Function Call
- Replies: 5
- Views: 21548
Re: Implementing the C Function Call
Great Example Lubin. Thanks for the tip on the ct_turns variable. I find that more elegant than declaring a "ghost" variable from the code since in my example directly from the Simulink Model you can't really see that there is a global variable. Anyways, between the two examples it should be now mor...
- Fri Mar 21, 2008 12:39 am
- Forum: General Remark and Questions
- Topic: Dspic and ICD2 problem
- Replies: 2
- Views: 6250
Re: Dspic and ICD2 problem
go to MPLAB Menu Configure->Select Device and make sure you have the correct device. That should take care of it.
Hope this helps
Mariano
Hope this helps
Mariano