Forum Discussion
Altera_Forum
Honored Contributor
22 years agoWhat's wrong with my programm?
I have write a programme to initialize the lcd16207,but it couldn't work correctly. The code is:# include <unistd.h># include <stdlib.h># include <stdio.h> //#include "lcd_16207.h" /* Comman...
Altera_Forum
Honored Contributor
22 years agoWhy are you bothering with initialization?
With Nios II (and the HAL), you should be able to open the device and use fprintf to print to it, like so: char *your_msg = "All work and No play..."; /* Get a file handle */ /* NOTE: Your name will match the name you chose from SOPC Builder... the example, below, matches the name in the standard and full_featured designs*/ FILE *lcd = fopen( "/dev/lcd_display", "w"); /* Using the lcd file handle, "print" to the LCD Device */ fprintf(lcd, "%s\n", your_msg); The syntax may not be *exactly* like this, but this is what I recall from several of the software "templates". For some reason Count Binary comes to mind.... Cheers, - slacker