Altera_Forum
Honored Contributor
15 years agoAnother character LCD question
I am using the Cyclone Edition dev kit and I've built a basic Nios II system, and loaded the "count_binary" example program using the Eclipse for Nios II software.
If I set stdout to the LCD then it displays the countdown, but I didn't think that this was necessary. Without this setting the LCD just stays blank. In count_binary.h there is this section that defines LCD-PRINTF:#ifndef LCD_DISPLAY_NAME
/* Some hardware is not present because of system or because of simulation */# define LCD_CLOSE(x) /* Do Nothing */# define LCD_OPEN() NULL# define LCD_PRINTF(lcd, args...) fprintf(lcd, args)
# else
/* With hardware devices present, use these definitions */# define LCD_CLOSE(x) fclose((x))# define LCD_OPEN() fopen("/dev/lcd_display", "w")# define LCD_PRINTF fprintf
# endifIn SOPC builder my LCD device is named "lcd", so I'm not sure what the problem is here.