MikroC dsPIC pro messes up project settings(?)

Beta Testing discussion on mikroC PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
womai
Posts: 239
Joined: 16 Apr 2008 07:45

MikroC dsPIC pro messes up project settings(?)

#1 Post by womai » 22 Dec 2009 21:21

I tried to use the automatic conversion feature to convert a very simply program (just blinking LATB and LATE) for the dsPIC30F2020 from MikroC for dsPIC to MikroC for dsPIC Pro.

The converted program compiles fine, and most (not all) project settings like clock modes etc. show up correctly when I choose "Edit Project".

However, when I burn the resulting HEX file into the chip the program does not work - nothing is blinking (while it is blinking fine, at a frequency of 2 Hz, when the old, unconverted program is compiled with the old compiler).

I am using an external crystal (16 MHz, I know, slightly above spec but it works perfectly fine) with x8 PLL enabled, so the actual clock speed is 128 MHz.

Closer inspection shows that while dsPIC Pro reports correct settings, the dsPICflash (V4.02) program has almost everything messed up, including the oscillator and PLL setup. No wonder it does not work!

So I manually corrected all the settings in dsPICflash and downloaded again. Result: the LEDs are now blinking, but only half as fast as they are supposed to. I checked and both MikroC and MikroC Pro claim the clock speed is defined as (correct) 128 MHz, but I suspect the Pro compiler is using a factor that is off by 2?

I will zip up the two projects and send them to customer support as well so you can have a look yourself.

Wolfgang

Here is the C code:

Code: Select all

void main ()
{
	TRISB = 0x00;
	TRISE = 0x00;
	
	while (1)
	{
		LATB = 0xff;
		LATE = 0xff;
		
		Delay_ms (250);
		
		LATB = 0x00;
		LATE = 0x00;

		Delay_ms (250);
	}
}
[/code]

User avatar
anikolic
mikroElektronika team
Posts: 1775
Joined: 17 Aug 2009 16:51
Location: Belgrade
Contact:

#2 Post by anikolic » 23 Dec 2009 11:39

Hi,
I have already answered you to the ticket, but for the sake of others:
Import Project Wizard will not load custom configuration at all, because it wasn't supposed to. It is explained in Migration Document that will come with the final release.
As for other issues, I have been able to recreate this problem with configuration loading, and informed our developers, and they will be working on correcting this.

Thank you for your support.

Best regards,
Aleksandar
Web Department Manager

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 Beta Testing”