AnsweredAssumed Answered

RAM values changes unexpectedly

Question asked by Jonathan Perilla on Apr 16, 2009
Latest reply on Apr 16, 2009 by Jonathan Perilla

Hi,

 

First of all excuse my low english level.  Something extrange happend to me....When I run the follow code (I'm using an AP16)

 

void CONVERT_DATA(void)
{
  TEMPORAL1=MSGRECEIVED[17];
  TEMPORAL1=TEMPORAL1-48;
  LATITUDE=TEMPORAL1*10;
  TEMPORAL1=MSGRECEIVED[18];
  TEMPORAL1=TEMPORAL1-48;
  LATITUDE=LATITUDE+TEMPORAL1;
 
  TEMPORAL1=MSGRECEIVED[19];
  TEMPORAL1=TEMPORAL1-48;
  MIN=TEMPORAL1*100000;
  TEMPORAL1=MSGRECEIVED[20];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1*10000;
 
 
  TEMPORAL1=MSGRECEIVED[22];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1*1000;
  TEMPORAL1=MSGRECEIVED[23];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1*100;
  TEMPORAL1=MSGRECEIVED[24];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1*10;
  TEMPORAL1=MSGRECEIVED[25];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1;
 
  MIN=MIN/600000;
  LATITUDE=LATITUDE+MIN;  
 
  TEMPORAL1=MSGRECEIVED[29];
  TEMPORAL1=TEMPORAL1-48;
  LONGITUDE=TEMPORAL1*100;
  TEMPORAL1=MSGRECEIVED[30];
  TEMPORAL1=TEMPORAL1-48;
  LONGITUDE=LONGITUDE+TEMPORAL1*10;
  TEMPORAL1=MSGRECEIVED[31];
  TEMPORAL1=TEMPORAL1-48;
  LONGITUDE=LONGITUDE+TEMPORAL1;
 
  TEMPORAL1=MSGRECEIVED[32];
  TEMPORAL1=TEMPORAL1-48;
  MIN=TEMPORAL1*100000;
  TEMPORAL1=MSGRECEIVED[33];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1*10000;
 
 
  TEMPORAL1=MSGRECEIVED[35];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1*1000;
  TEMPORAL1=MSGRECEIVED[36];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1*100;
  TEMPORAL1=MSGRECEIVED[37];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1*10;
  TEMPORAL1=MSGRECEIVED[38];
  TEMPORAL1=TEMPORAL1-48;
  MIN=MIN+TEMPORAL1;
 
  MIN=MIN/600000;
  LONGITUDE=LONGITUDE+MIN;  
 
 
  TEMPORAL1=MSGRECEIVED[44];
  TEMPORAL1=TEMPORAL1-48;
  SATELITES=TEMPORAL1*10;
  TEMPORAL1=MSGRECEIVED[45];
  TEMPORAL1=TEMPORAL1-48;
  SATELITES=SATELITES+TEMPORAL1;                 
}

 

The values of MSGRECEIVED changes and I don't understand why it happen if I don't assing this array in this funtion I only read it. If you can help me I'll really apreciate it. 

 

Regards,

Jonathan

Message Edited by Jonathanp on 2009-04-16 04:44 AM

Outcomes