Here I am posting some very rudimentary code that shows one way to drive the LCD display in the DE2 (very rudimentary code ....)
# include <stdio.h># include <unistd.h># include "system.h"# include "DE2_pio_regs.h"# include "altera_up_avalon_character_lcd.h"
int main()
{
int in, out;
alt_up_character_lcd_dev * lcd;
int len;
len =15;
lcd = alt_up_character_lcd_open_dev(CHARACTER_LCD_0_NAME );
// i 've found CHARACTER_LCD_0_NAME in the system.h file
alt_up_character_lcd_set_cursor_pos(lcd, 0, 1);
alt_up_character_lcd_write(lcd, "SOO REALLY COOL", len);
alt_up_character_lcd_set_cursor_pos (lcd, 0, 2);
alt_up_character_lcd_write(lcd, "... TWICE SO ..", len);
[....]
}
Hope this helps others....
alfa
PS I am using Nios II IDE 8.0 and and Quartus/SoPC builder 8.0sp1.
As I was learning how to do this i figured out that the name of some include files has changed.
For instance:
altera_up_avalon_character_lcd.h
used to be:
alt_up_character_lcd.h
Has anyone else noticed?