Reply To: Display Float on LCD – MPLAB XC8

Home Forums Microcontrollers PIC Microcontroller Display Float on LCD – MPLAB XC8 Reply To: Display Float on LCD – MPLAB XC8

#10424

sahu
Participant

what wrong with me `

a = ADC_Read(0);
involts =a*5000/255;
delayMs(10);
{
  Lcd_Clear();
  Lcd_Set_Cursor(1,1);
  Lcd_Write_String("Mains");
  /*
    Lcd_Set_Cursor(1,10);
    Lcd_Write_Char(involts%10 + 48);
    involts = involts/10;
    Lcd_Set_Cursor(1,9);
    Lcd_Write_Char(involts%10 + 48);
    involts = involts/10;
    Lcd_Set_Cursor(1,8);
    Lcd_Write_Char(involts%10 + 48);
  */
  sprintf(s, "Float = %f", involts);
  Lcd_Set_Cursor(1, 10);
  Lcd_Write_String(s);
  Lcd_Set_Cursor(1,13);
  Lcd_Write_String("VOLT");

found error as

lib\doprnt.c; 837. bad call to typeSub()
`

string(7) "9898001"