Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
801 Views

Writing characters to LCD

Hello all DSP Builder users, 

 

I have been trying for a long time to solve a state machine problem. Long time ago I found this simulink program written by a Xilinx developer for Spartan platform(pls google for the name aditya Xilinx and LCD. files are LCD_HOLA) I tried many times to adapt it to my Altera DE2 115 board, somehow I failed. I have been trying to develop a ready library blockset using this kind of LCD program to include in Simulink projects(Like the ones for DE2 board: leds,switches, push buttons etc). I'd be very happy if someone helps me on this since I spent too much time and almost gave up.
0 Kudos
3 Replies
Highlighted
Honored Contributor I
16 Views

Hello Gariyak, 

 

Writing characters to the LCD goes far easier when you use the Nios II processor, because than you can communicate on a higher level. 

 

When using the Nios II/e and 32kB On-chip memory the HAL (Hardware Abstraction Layer) enables you to use the alt_printf() function in an C-program to send characters to the display. 

 

Through a PIO interface you can communicate between the state machine and the Nios II to determine when the next line of characters is being send to the LCD. 

 

Regards, 

Johan
0 Kudos
Highlighted
Honored Contributor I
16 Views

Thanks Johan for this solution but I want to include LCD blockset in Altera's DE2 Simulink library. If you examine the LCD HOLA code, it writes just the word HOLA but I want to able to write whatever I send to LCD. The person named aditya had explained the HDL code generation in detail in a word file for ex. removing floating variables and replacing them with integer values etc. But when it comes to implement the same thing with the Simulink MDL file, I fail to write to the screen. May be I'm doing wrong clocking or there is something missing for the pin input/outputs in the MDL file that I don't know. I'd be very happy if someone tries this in Simulink and reach a conclusion. Again I appreciate your effort to solve the problem.

0 Kudos
Highlighted
Honored Contributor I
16 Views

I've added the LCD files. I'd be very happy if an expert tries to include the LCD blockset into the Simulink DSP builder blockset.

0 Kudos