Page 1 of 1

Oscillator mode & MIPS configuration

Posted: Thu Dec 18, 2008 12:55 pm
by gladiac
Hi Lubin,

My device is 30f6014A and demo board is dsPICDEM 1.1 of Microchip. The crystal of the board is 7.3728 MHz. So the typical configs are:
XT mode - 7.3728 MHz /1.8432 MIPS
XT w/ PLL 4x mode - 29.4912 MHz / 7.3728 MIPS
XT w/ PLL 8x mode - 58.9824 MHz /14.7456 MIPS
XT w/ PLL 16x mode - 117.9648 MHz / 29.4912 MIPS

In the following PWM model,
model.jpg
model.jpg (34.67 KiB) Viewed 11086 times
If I set the XT mode/1.8432 MIPS in 'master' block, building of HEX code is OK, but errors occured when HEX code import to MPLAB and also in programming process.
error.jpg
error.jpg (18.49 KiB) Viewed 11090 times
error1.jpg
error1.jpg (44.23 KiB) Viewed 11085 times
If I set the XT with PLL mode, building and programming are both OK, but actual output period is not equal to the value which set in the model.
So is there any problem in configuration?

Thanks,
Gladiac

Re: Oscillator mode & MIPS configuration

Posted: Thu Dec 18, 2008 1:55 pm
by LubinKerhuel
Hi Gladiac,

This look like a bug !
Could you :
- Upload the simulink model
- precise your matlab version
- Precise your C30 compiler version
- Precise the MPLAB version

I will have a look.
Lubin

Re: Oscillator mode & MIPS configuration

Posted: Thu Dec 18, 2008 2:41 pm
by gladiac
OK. This is model, and MATLAB is 2007b,C30 is 3.11B, MPLAB is 8.0.

Re: Oscillator mode & MIPS configuration

Posted: Thu Dec 18, 2008 3:34 pm
by LubinKerhuel
gladiac wrote:If I set the XT mode/1.8432 MIPS in 'master' block, building of HEX code is OK, but errors occured when HEX code import to MPLAB and also in programming process.
I do not get this error with MPLAB 8.10.
Could you upgrade to this mplab and try ?

You could have a look on the configurations bits once the .hex is loaded in MPLAB. (Configure ==> Configuration bits)

Lubin

Re: Oscillator mode & MIPS configuration

Posted: Thu Dec 18, 2008 6:56 pm
by gladiac
Hi Lubin,

I still get the same error. And I have checked the config bits, the oscillator is set incorrect, I set XT mode but it's ECIO w/PLL. I use 30f6014A device, MTALB 2007b, 0.99a toolbox, C 30 3.11b compiler and MPLAB V8.1.

Thanks.
gladiac

Re: Oscillator mode & MIPS configuration

Posted: Tue Jan 06, 2009 11:34 am
by gladiac
Hi Lubin,

I know the reason. Your toolbox support 30f6014 correctly, may be not for 30f6014A. I found that the setups of config bits are different for 30f6014 and 30f6014A in MPLAB. They are not compatible. So can you add the support of 30f6014A individually? I think this also might be the solution for my problem of the controller design which I mentioned before.Thanks very much.

Cheers,
Gladiac

Re: Oscillator mode & MIPS configuration

Posted: Wed Jan 07, 2009 10:21 am
by LubinKerhuel
The following chips were added : 30f6010 ; 30f6011A ; 30f6012A ; 30f6013A ; 30f6014A. Theses changes will be available in the next release version (0.99b)

It solved this problem.