Lubin,
Great Blockset and excelent support!!!
I've found some differences between the setted and measured freq of a blinking LED. It appears that the freq depends on the MIPS and the simulation time step ts.
Ive found:
if ts[s] x MIPS < 0.0053 -> LEDfrec[hz] = 340 x ts
if ts[s] x MIPS > 0.0053 -> LEDfrec[hz] = 1.8 /MIPS
each time i change ts, i also change the period samples to get 1 hz blinking freq. In the attached model, i measured 1.82 hz
weird? am i misconfigurating the model? im using matlab2010b, dsPIC30f4013, with internal oscillator
Thank you very much,
Leonardo
PS: another doubt: the dspic datasheet says "The user can tune the FRC oscillator within a range of +10.5% (840 kHz) and -12% (960 kHz) in steps of 1.50%"
-> FRC[MHZ]: 8(nom); 7.04(min); 8.84(max).
-> ips = fosc/4,
-> ips = 1.76 a 2.21 mips
how does the blockset manage to set out of range ips?
problem with simulation time step, mips & measured freq
problem with simulation time step, mips & measured freq
- Attachments
-
- dspic_pwm.mdl
- (33.79 KiB) Downloaded 1341 times
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: problem with simulation time step, mips & measured freq
Leonardo,
Thanks for your question.
I mostly used the chips with an external quartz. I think that the blockset suport for the internal oscillator is pretty weak and I would not provide any garanty...
I joined Microchip to build-up a new blockset. This new blockset will handle differents oscillators in a much better way than it has been done with my custom blockset.
Thus if you are to use my custom blockset, considere using an external quartz which have been working very well so far (I used them exclusively !).
Considere switching to the Microchip official blockset in the next comming releases...
Regarding the tuning of the FRC resonator, it is not handled in my custom blockset. This will be handled in the Microchip futur blockset in prep...
Lubin
Thanks for your question.
I mostly used the chips with an external quartz. I think that the blockset suport for the internal oscillator is pretty weak and I would not provide any garanty...
I joined Microchip to build-up a new blockset. This new blockset will handle differents oscillators in a much better way than it has been done with my custom blockset.
Thus if you are to use my custom blockset, considere using an external quartz which have been working very well so far (I used them exclusively !).
Considere switching to the Microchip official blockset in the next comming releases...
Regarding the tuning of the FRC resonator, it is not handled in my custom blockset. This will be handled in the Microchip futur blockset in prep...
Lubin
Who is online
Users browsing this forum: No registered users and 21 guests