imranahmed
Advanced Member level 3
- Joined
- Dec 4, 2011
- Messages
- 817
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 1,298
- Location
- Karachi,Pakistan
- Activity points
- 6,492
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
The first thing that comes to mind by viewing your code is that you are missing a main loop. Both while(1) statements are satisfied under circumstances. Embedded software must never return from main().imranahmed said:problem is that the display shows only 1st and 3rd line but not show on 2nd line and 4th line
void lcd()
{
lcdcmd(0x0F);
lcdcmd(0x01);
lcdcmd(0x06);
lcdcmd(0x80); //This means that cursor will go to first line, first column.
}
while (1)
{
lcdcmd(0x80); //cursor at line 1
for(x=0;x<4;x++)
lcddata(LCD[x]);
lcdcmd(0x94); //cursor at line 2
for(x=0;x<4;x++)
lcddata(LCD1[x]);
lcdcmd(0xC0); //cursor at line 3
for(x=0;x<4;x++)
lcddata(LCD[x]);
lcdcmd(0xD4); //cursor at line 4
for(x=0;x<4;x++)
lcddata(LCD1[x]);
}