Hello all...
I've finally solved the problem, thanks to everyone for the tips.
Nic : malloc.c not solve the bug in this case.
Arrch: sprintf() does not work very well, for example, sprintf( Result," %02u %02u %02 ",A,B,C) or
sprintf( Result," %d %d %d ",A,B,C) , does not work well.
PaulS: Was a good idea to move the lcd.print() to TiempoTotal().
Finally my function code was well :
int TiempoTotal (unsigned long Cantidad){
char Hs[10];
char Min[10];
char Seg[10];
char Respuesta[16];
unsigned long TT = Cantidad * Retardo;
unsigned long Remanente1 = (TT % 3600);
unsigned long H = (TT - Remanente1)/3600;
unsigned long S = Remanente1 % 60;
unsigned long M = ( Remanente1 - S) / 60;
sprintf(Hs," %02uHs. ",H);
sprintf(Min,"%02um. ",M);
sprintf(Seg,"%02us. ",S);
//sprintf(Respuesta,"%d:%d:%d ", H,M,S);
//lcd.setCursor(0, 2);
//lcd.print (Respuesta);
lcd.setCursor(0, 2);
lcd.print ( Hs );
lcd.setCursor(7, 2);
lcd.print ( Min );
lcd.setCursor(12, 2);
lcd.print ( Seg );
return 0;
}
Thanks again to all
Greeting Oso57 from Argentina,.