int temp;
char temp1;
char temp2;
void main(void)
{
// t = 25.0625 C (0x0191 - ds18b20)
temp1 = 0x01;
temp2 = 0x91;
temp = temp1;
temp <<= 8;
temp |= (unsigned char)temp2;
printf("temp = %d.%01d C\n\r", temp >> 4, ((temp & 15) * 10) >> 4);
printf("temp = %d.%02d C\n\r", temp >> 4, ((temp & 15) * 100) >> 4);
printf("temp = %d.%03d C\n\r", temp >> 4, ((temp & 15) * 1000) >> 4);
printf("temp = %d.%04d C\n\r", temp >> 4, ((temp & 15) * 10000) >> 4);
return;
}