Altera_Forum
Honored Contributor
9 years agoNIOS II on DE0, displaying on LCD
Hi everyone,
I am trying to get some message displayed on LCD using DE0 board. I had a look at the Pin Assignment tool and all pins are assigned correctly. All of the files included in .c file are within project directory. This is my main.c code:
#include <stdio.h>#include "system.h"#include "altera_avalon_pio_regs.h"#include "altera_avalon_lcd_16207_regs.h"#include "altera_avalon_lcd_16207.h"int main(){ char ch = '\0'; FILE *lcd_d = 0; lcd_d = fopen(LCD_DISPLAY_NAME, "w"); printf("LCD & Keypad Test!\n"); //altera_avalon_lcd_16207_init(LCD_DISPLAY_BASE); printf("Address of LCD: %s\n", LCD_DISPLAY_NAME); while(1){ ch = kbd_getc(); usleep(9); if(ch != 0){ printf("%c ", ch); fprintf(lcd_d, "Hello LCD"); } } return (0); } The code here is from another topic: http://alteraforum.com/forum/showthread.php?t=32164 When I try to rebuild the project I get errors: 'LCD_DISPLAY NAME' undeclared and warnings: implicit declaration of function 'kdb_getc' implicit declaration of function 'usleep' Could someone please offer some advice how do I go about this problem? Are there specific commands that need to be used for DE0 board? Many thanks