Showing results for 
Search instead for 
Did you mean: 
Honored Contributor I

DE2-70 LCD Control sequences do not work

Hi everybody, this is my first post! :)  


I am working on a demonstration system over a DE2-70 board from Terasic which uses the LCD 2x16 display provided on it. The fact is that if I use the hardware abstraction layer (HAL) to control the display (using the "printf()" function or the Altera's "alt_up..." functions) it shows any character I send to it but control sequences are not understood by the LCD and they appear as normal characters instead ('\n' is shown as a weird symbol). 


Obviously the problem is that I cannot go to second line nor clear the display, for instance. I know I can use a PIO port to connect the LCD and create a control code for it, but I would like to use the HAL method to make the system technology independent. 


As possible solutions I have tried to: 


  • Use both SOPC modules, the Altera's SOPC one and the University Program one, but no one has fixed the problem (in fact, the University Program module gives me a syntethis error...). 

  • I have also tried to slow down the clock speed of the LCD module to 50MHz (my whole system works at 100MHz). 

  • I have checked if all the HAL files are correctly installed. 

  • I have even tried to copy the HAL files into my project and make the "include"s to them. 



but with the same wrong result..Does anybody know how to make the LCD work right, please? 


Thank you very much for your help! :D
0 Kudos
2 Replies
Honored Contributor I

Hi again, 


I did not put this in the other post, but I tried the same programming philosophy on a normal DE2 board and it worked fine. Has anyone been able to make the LCD work on a DE2-70 board through the HAL method? I would appreciate some help so much, because I will probably have similar problems with other parts of the board (UART for instance) which also make use of the HAL library. 


Thank you very much.
Honored Contributor I



I have finally managed to fix the LCD problem, but I am quite disappointed with Altera's IP modules provided in Quartus SOPC. The problem was caused by the LCD module included in the University Program, but I have not found the reason yet. To fix it, I tried the normal module from Altera included in SOPC, not the UP one, but as I said in previous posts, it sent me some synthesis errors. 


To solve the problem I have had to overwrite the "lcd.v" generated by the SOPC with one included in a demo project from the documentation CD in order to fix some nouns incompatibilities. And well, the question is, is it normal to have syntax incompatibilities in auto generated code? 


Thank you anyway.