|
|
View previous topic :: View next topic |
Author |
Message |
dongSORRY for reversal) Guest
|
LCD gets stuck(hd44780) |
Posted: Fri Mar 24, 2006 6:11 pm |
|
|
hello all, (sorry for reversal of name n topic)
(me posting it again.
sorry if i m troubling with many posts.)
this is dong again.one question.
The problem : According to code LCD should keep displaying
"Dong the king" till it gets 8 bit input.But it doesnot wait for the input for more than 2 seconds.If it gets input in 2 seconds it shows the points.
otherwise it keeps showing "dong the king"(it gets STUCK here)
what i do??
The same is problem from "hello" to input from PIN D0.if it gets input in 1-2 seconds, it moves forward ; otherwise gets stuck at "hello".
is there a way lcd keeps waiting for the inputs.??(and not get stuck)
Dong
--------------------------------My code--------------------------------------
while(1)
{
lcd_init();
delay_ms(1000);
printf(lcd_putc,"hello!!!");
delay_ms(1000);
while(input(pin_D0))
{
lcd_init();
delay_ms(1000);
lcd_init();
printf(lcd_putc,"dong the king");
delay_ms(1000);//new
dong= input_b();
while(dong != 255)//My lcd doesnot wait for this for long.it gets stuck.
{
if(points = dong & 0x7F;)
{
printf(lcd_putc,"%u",points);
delay_ms(1000);
}
} |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Mar 24, 2006 6:30 pm |
|
|
See section 2.2 in this webpage:
http://www.drpaulcarter.com/cs/common-c-errors.php
Ideally, you would learn this in the classroom. The purpose of
this forum is not to teach the C language. Most people do not
want to answer questions that are about beginner's coding errors.
----------
Also, you should not make multiple posts of the same question,
with each post done with a different "guest" name. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|