Forum Discussion
LCD interfacing problem
- 3 years ago
Hi,
Greetings and welcome to Intel's forum.
As I look into your code, the issue might lie in the integer ' i ' is limiting the characters in a string for display. You may try to increase the value and see whether it solves the issue.
Here is a link on how NIOS II driver controls the Character LCD for your reference: https://www.intel.com/content/www/us/en/support/programmable/articles/000078036.html
Hope to hear on your findings. Thank you.
Regards,
Kelly
I have found the issue.It was a mistake on my code part.I was sending the SendCommand(0x00C0) for each letter .As it was intiailized for each letter, it was getting overwritten.All I had to do was change the i<15 to i==0 and then make another condition for i<15 llike the following:
for(i=0;i<=strlen(Text);i++)
{
if(i==0)
{
SendCommand(0x00C0);
SendData(Text[i]);
}
else if(i<15)
{
SendData(Text[i]);
}
else if(i==15)
{
SendCommand(0x0080);
SendData(Text[i]);
}
else if(i>15 && i<=(strlen(Text)-1))
{
SendData(Text[i]);
}
}
}
Thanks Kelly for your help in the i part. I will select your answer as the accepted solution