AnsweredAssumed Answered

Warning possible loss of data MC9S08GB60

Question asked by Luis Mendez on Jan 6, 2011
Latest reply on Jan 10, 2011 by Daniel Lundin

Hello forum, i'm new programming this devices. Well when i debug my program a warning appear.. Possible loss of data(see the bold text), could you indicate what is my error? and how can i fix? because i want to transmit data who is storage in a variable thanks

 

byte SCI1_Transmit(byte Chr){
  if(!SCI2S1_TDRE) {           // Is the transmitter empty?
    return -1;                 // If no then error
  }
  SCI2D = (byte)Chr;
  return 0;                    // OK
}


void main(void) {
  byte TransmitStatus;
 
  SOPT = initSOPT; 
  ICGC2 = initICGC2;
  ICGC1 = initICGC1;     //32kHz -> 18.874368MHz bus rate
  while(!ICGS1_LOCK);    //loop until FLL locks
  ICGC2_LOCRE = 1;       //enable reset if ref clock fails
 
  InitSCI1();
 
  EnableInterrupts; /* enable interrupts */
    count=0;
  /* include your code here */
  for(;:smileywink: {
    // __RESET_WATCHDOG(); /* feeds the dog */
    count++;
    TransmitStatus = SCI1_Transmit(count);
    delay();
    //TransmitStatus = SCI1_Transmit('A');
   // delay();
  } /* loop forever */
  /* please make sure that you never leave this function */
}

Outcomes