This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Displaying character.

I am a beginner to C language... I have alreaady initialized the LCD in my code...How do i display a message("HELLO" eg.) to LCD? I want to use it in function void but i do not know where to start...I want to make it simple if possible...There are samples that i found but the samples are complicated...

Parents
  • I am not sure what you want to do, or how lcddata() works changing 'c' to "c" may help.
    It appears that you want to call lcddata() until you get a null ('\0')
    Other wise you are getting the data from Code address 99d then writing until you find a zero in memory

    void lcdwrite(char *letter)
    {
      while(*letter)
      {
            lcddata(*letter);
            letter++;
      }
    }
    
    void main()
    {
      Init_Device();
      lcdinit();
      lcd_clear();
      lcdwrite("c"); // This maybe right
    }
    

Reply
  • I am not sure what you want to do, or how lcddata() works changing 'c' to "c" may help.
    It appears that you want to call lcddata() until you get a null ('\0')
    Other wise you are getting the data from Code address 99d then writing until you find a zero in memory

    void lcdwrite(char *letter)
    {
      while(*letter)
      {
            lcddata(*letter);
            letter++;
      }
    }
    
    void main()
    {
      Init_Device();
      lcdinit();
      lcd_clear();
      lcdwrite("c"); // This maybe right
    }
    

Children