Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Using LCD on DE2

Hi. I know a lot of post are about lcd and de2 but i have some problems.

In fact, i use the 3 files in my project:

altera_avalon_lcd_16207.c

altera_avalon_lcd_16207.h

altera_avalon_lcd_16207_regs.h

(i have attached them in txt so you can check it).

The problem is: I'm not very good at c language and I was wondering if someone can write me a small code that uses functions of altera_avalon_lcd_16207.c to control the LCD.

Thanks

PS: I use a NIOSII and NIOS IDE

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi.

    In "DE2_demonstrations\DE2_NET\hello_led_0" look for LCD.C file. There you have an example.

    It's:

    --- Quote Start ---

    void LCD_Test()

    {

    char Text1[16] = "Altera DE2 Board";

    char Text2[16] = "Ethernet Testing";

    // Initial LCD

    LCD_Init();

    // Show Text to LCD

    LCD_Show_Text(Text1); //This show the above text 1st line

    // Change Line2

    LCD_Line2();

    // Show Text to LCD

    LCD_Show_Text(Text2); //This show the above text 2nd line

    }

    --- Quote End ---