Anonymous
Not applicable
Mar 19, 2013
08:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 19, 2013
08:30 PM
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(" ");
}
Labels
- Labels:
-
PSoC 3
6 Replies