Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHello to everybody,
I try to implement 2 × 16 character display Lumex LCM-S01602DSR/C. I used Nios II system and added lcd component. Now i try to show some characters on lcd, here is my code. but unfortunatelly, all i can see is uncoorect characters, they don't show any digits. fopen works and it gives right pointer How do you think what are the problems? --- Quote Start --- #include <stdio.h># include <altera_avalon_lcd_16207_regs.h># include <altera_avalon_lcd_16207.h> //#include <altera_avalon_lcd_16207.c> int main() { FILE * lcd; lcd = fopen("/dev/lcd", "w"); if(lcd == NULL) { fprintf(stderr, "Failed to open LCD"); //exit(1); } //fprintf(stdout, "Hello on the LCD\n"); //fprintf(stdout, "1"); int i=0; for (i=0; i< 7; i++){ fprintf(stdout, "7700"); fprintf(stderr, "1133"); fprintf(stdin, "4499"); } fprintf(stdout, "\n"); fprintf(lcd, "[ 2 J"); // while (1){ // fprintf(lcd, "7700"); // } fclose(lcd); return 0; } --- Quote End ---