Hex number to base 10

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

How do I convert the hex to a decimal base 0 to 9.

   

 

   

 

   

 

   

void Display_Result(void)
{
  
      LCD_Char_Position(0,6);
      LCD_Char_PrintInt8(HYT221_Read_Buff[0] & 0x3f);         //Mask HYT humidity the highest two status bits
      LCD_Char_PrintInt8(HYT221_Read_Buff[1]);
      LCD_Char_PrintNumber(unit8,HYT221_Read_Buff);  
      temp = astio(temp, HYT221_Read_Buff[1], 16);
      LCD_Char_PrintString("      ");    
      LCD_Char_Position(1,6);
      LCD_Char_PrintInt8(HYT221_Read_Buff[2]);
      LCD_Char_PrintInt8(HYT221_Read_Buff[3] & 0xfc);       //Mask HYT temperature the lowest two status bits
      LCD_Char_PrintString("      ");      
}

0 Likes
6 Replies