Y
Yodai
Hey guys...
I've looked up and down, tested and retested, and I've found out my program
is stoping in this function.... Do you guys see anything weird here? cause
it compiles all right... (Just so you know, the functions I am calling to be
written are copied below)
{
sprintf(NewKey, "%s/%s/%s %s:%s%03u", Get_dia1(),
Get_mes1(), Get_any1(), Get_hora1(), Get_min1(), Get_valor1());
memcpy(Key, NewKey, 30);
break;
}
/*here the functions that serve the data to the sprintf above: (they're
really simple and pretty much failsafe, only that (so far) they allways
output 0xFF, and I am starting to wonder if maybe unsigned char cannot hold
0xff?? */
unsigned char Get_tipus1(void)
{
volatile unsigned char r1tipus = *R1TIPUS;
return(r1tipus);
}
unsigned char Get_dia1(void)
{
volatile unsigned char r1dia=*R1DIA;
return(r1dia);
}
unsigned char Get_mes1(void)
{
volatile unsigned char r1mes = *R1MES;
return(r1mes);
}
unsigned char Get_any1(void)
{
volatile unsigned char r1any=*R1ANY;
return(r1any);
}
unsigned char Get_hora1(void)
{
volatile unsigned char r1hora=*R1HORA;
return(r1hora);
}
unsigned char Get_min1(void)
{
volatile unsigned char r1min=*R1MIN;
return(r1min);
}
unsigned int Get_valor1(void)
{
volatile unsigned int r1valor=*R1VALOR;
return(r1valor);
}
cheers!!!
Yodai
I've looked up and down, tested and retested, and I've found out my program
is stoping in this function.... Do you guys see anything weird here? cause
it compiles all right... (Just so you know, the functions I am calling to be
written are copied below)
{
sprintf(NewKey, "%s/%s/%s %s:%s%03u", Get_dia1(),
Get_mes1(), Get_any1(), Get_hora1(), Get_min1(), Get_valor1());
memcpy(Key, NewKey, 30);
break;
}
/*here the functions that serve the data to the sprintf above: (they're
really simple and pretty much failsafe, only that (so far) they allways
output 0xFF, and I am starting to wonder if maybe unsigned char cannot hold
0xff?? */
unsigned char Get_tipus1(void)
{
volatile unsigned char r1tipus = *R1TIPUS;
return(r1tipus);
}
unsigned char Get_dia1(void)
{
volatile unsigned char r1dia=*R1DIA;
return(r1dia);
}
unsigned char Get_mes1(void)
{
volatile unsigned char r1mes = *R1MES;
return(r1mes);
}
unsigned char Get_any1(void)
{
volatile unsigned char r1any=*R1ANY;
return(r1any);
}
unsigned char Get_hora1(void)
{
volatile unsigned char r1hora=*R1HORA;
return(r1hora);
}
unsigned char Get_min1(void)
{
volatile unsigned char r1min=*R1MIN;
return(r1min);
}
unsigned int Get_valor1(void)
{
volatile unsigned int r1valor=*R1VALOR;
return(r1valor);
}
cheers!!!
Yodai