Forum Discussion

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

Problem about lcd device???

sorry,my English is not good!

my program is:

# include "altera_avalon_lcd_16207.h"# include "altera_avalon_lcd_16207_regs.h"

...

# include "system.h"# include "sys/alt_sys_init.h"

...

int main (void)

{

alt_u8 num = 0x2;

ALTERA_AVALON_LCD_16207_INSTANCE( LCD1, lcd1 );

alt_sys_init();

lcd_write_data(lcd1,num);

return 0;

}

...

and please tell me how use about "ALTERA_AVALON_LCD_16207_INSTANCE( name, device )",what is "name" "device"??

please give me a right example about LCD. thank you

1 Reply

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

    --- Quote Start ---

    originally posted by shenqibin@Nov 8 2005, 12:58 PM

    altera_avalon_lcd_16207_instance( lcd1, lcd1 );

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=10842)

    --- quote end ---

    --- Quote End ---

    You should not call directly this function... it is called inside the sys_init.c file inside the system library.

    To use the LCD, just set the LCD component you pun in sopcbuilder as the stdout device in the system library properties. Then, use printf to print to the LCD...

    Paolo