Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

LCD on NIOSII

Altera_Forum
Honored Contributor II
1,258 Views

I have built my NIOS II system on DE2 board having DRAM, JTAG UART and 16207 LCD. This is my code in NIOS II IDE: 

 

---------------------------------------------# include <stdio.h># include "system.h" 

 

int main() 

 

FILE *fp=0; 

 

fp = fopen( "/dev/lcd_16207_0", "w"); 

 

if (fp==0) 

printf("lcd not ready...\n"); 

else 

{ printf("lcd ready...\n"); 

fprintf(fp, "hello lcd...\n");  

 

fclose(fp); 

 

return 0; 

---------------------------------------------- 

 

everything seems ok, but I dont know why LCD does not work. 

PLEASE HELP ME... 

 

Thanks alot 

Lili
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
538 Views

 

--- Quote Start ---  

originally posted by lili@Feb 11 2007, 07:41 PM 

i have built my nios ii system on de2 board having dram, jtag uart and 16207 lcd. this is my code in nios ii ide: 

 

---------------------------------------------# include <stdio.h># include "system.h" 

 

int main() 

 

  file *fp=0; 

   

  fp = fopen( "/dev/lcd_16207_0", "w"); 

 

  if (fp==0) 

      printf("lcd not ready...\n"); 

  else 

  {  printf("lcd ready...\n"); 

      fprintf(fp, "hello lcd...\n");   

  } 

   

  fclose(fp); 

 

return 0; 

---------------------------------------------- 

 

everything seems ok, but i dont know why lcd does not work. 

please help me... 

 

thanks alot 

lili 

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

--- quote end ---  

 

--- Quote End ---  

 

 

Take a look at the following link. He forgot to turn the LCD on inside his code. Hope that helps a little. 

 

http://forum.niosforum.com/forum/index.php...pic=5081&hl=lcd (http://forum.niosforum.com/forum/index.php?showtopic=5081&hl=lcd)
0 Kudos
Altera_Forum
Honored Contributor II
538 Views

I use lcd display like this and it works well 

FILE *lcd; 

lcd = fopen("/dev/lcd_display", "w"); 

/* Write some character to the LCD. */ 

if (lcd != NULL ) 

fprintf(lcd, "%c", ESC); 

fprintf(lcd,"[%c", y); 

fprintf(lcd, "%c", ESC); 

fprintf(lcd,"%cH", x); 

fclose( lcd ); 

Many regards Marcin.
0 Kudos
Altera_Forum
Honored Contributor II
538 Views

I hope Your lcd is going to work well

0 Kudos
Reply