Pumpkin, Inc.

Pumpkin User Forums

Unknow prob

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

Unknow prob

Postby aek » Fri Mar 11, 2005 5:17 am

Hi Fred.

Your function uses floats quite heavily.

You may have run out of memory (because the compiler allocates some of the non-paged RAM for FP operations). Look carefully at your memory map listing.

Another possibility is that you've run out of stack space. Though this is somewhat unlikely, given that you don;t call the function.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Unknow prob

Postby Fred » Fri Mar 11, 2005 11:01 am

hello, I have a working salvo application.
When I add this function:
**************
void Calcul_Temp(void)
{
static float Rt,LogRatio;
static float VTherm;
static float Temperature;
VTherm=2.05;

Rt= (VTherm*4990)/(2.5-VTherm);
RatioRT_R25=Rt/10000;
LogRatio=log(RatioRT_R25);

Temperature= ConstA + ConstB*(LogRatio) + ConstC*(LogRatio*LogRatio) + ConstD*(LogRatio*LogRatio*LogRatio);
Temperature= (1/Temperature) -273.15;
}
*****************
My application stop working, I placed breakpoint on some Task and saw that they aren't called..

The function I addded is not even called from anywhere!

Any idea about what could cause that problem?

Fred

Fred
 
Posts: 7
Joined: Wed Feb 16, 2005 12:00 am
Location: Quebec, Canada

Re: Unknow prob

Postby Fred » Mon Mar 14, 2005 5:11 am

Hi aek,

I finally find out what was the problem.

This line of code seems to be too long for the C18 compiler since my problem disapear when I cut it in shorter line..

Temperature= ConstA + ConstB*(LogRatio) + ConstC*(LogRatio*LogRatio) + ConstD*(LogRatio*LogRatio*LogRatio);


I don't know what are the compiler limitation about that and can't found nothing in the documentation. So if anyone know about that, please tell me!

Regards

Fred

Fred
 
Posts: 7
Joined: Wed Feb 16, 2005 12:00 am
Location: Quebec, Canada


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 2 guests

cron