Connect with us

working with LCD

Discussion in 'Microcontrollers, Programming and IoT' started by bravehamid, Dec 10, 2014.

Scroll to continue with content
  1. bravehamid

    bravehamid

    27
    0
    Dec 10, 2014
    I have a problem with mega32 & LCD16*2.
    i have a easy program for show a text but the text do not show
    while (1)
    {
    lcd_clear();
    lcd_gotoxy(5,0);
    _lcd_write_data(0x0F); //blink code
    lcd_putsf("Hello");
    delay_ms(150);

    lcd_clear();
    lcd_putsf("bahar jigar");
    delay_ms(300);

    }
    }
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    10,586
    2,360
    Nov 17, 2011
    A delay of 150ms or 300ms may be too fast.
    Try to get a stable display first, using code like:
    Code:
    lcd_clear();
    lcd_gotoxy(5,0);
    _lcd_write_data(0x0F); //blink code
    lcd_putsf("Hello");
    
    while (1)
    {
    /* do nothing */
    }
    This code should be easy to debug until you have a stable display. Once it works, change the working code back to reflect your original intent (displaying two texts in sequence).
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-