I have this weird problem where I am using sprintf and it puts FF in front of the value I have.
(e.g.) I should get 01, but I am getting FF01
My code looks like this
while(1)
{
if(getkey()=='g')
{
sprintf(str_2, "%X", ~OWReadByte());
lcd_delay();
lcd_string(str_2);
}
}
I did some checking on the LEDs and on there i get the value i want, after using sprintf it just gets screwed up.