Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • sahu
    Participant

    you- Remove unnecessary statements

    me- i think here every statements is necessary

    you- Optimize the Lcd_Port() by using single statement, eg  : PORTC = a by making necessary changes in the circuit diagram.

    me – if i use single statement, eg  : PORTC ,then no need Lcd_Port()

    sahu
    Participant

    what’s the way reduce the code size ?

    in 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()
    `

    in reply to: Display Float on LCD – MPLAB XC8 #10321
    sahu
    Participant

    Thank you Sir

    in reply to: Display Float on LCD – MPLAB XC8 #10281
    sahu
    Participant

    Please give me a example of first method.

     

Viewing 5 posts - 1 through 5 (of 5 total)
>