LPC2138---interfacing keypad +lcd
Discussion in "ARM Development" started by vijay Sep 30, 2012.
Sun Sep 30 2012, 09:23 pm
i faced problem that without pressing any switch from keypad it shows '1'..at starting
and after that it don't show anything if i press keys..
i post my code+proteus simulation just see,...n help me fast
and after that it don't show anything if i press keys..
i post my code+proteus simulation just see,...n help me fast
Mon Oct 01 2012, 10:05 am
First thing, you need to check your key logic as it should not detect any key... secondly
This line will exit the main function so you wont be able to detect any key later on.. so have another while(1) loop outside the key_pressed checking loop.
[Topic moved to ARM Development Forum]
while(key_pressed())
This line will exit the main function so you wont be able to detect any key later on.. so have another while(1) loop outside the key_pressed checking loop.
[Topic moved to ARM Development Forum]
Mon Oct 01 2012, 06:04 pm
i add while loop even though same problem is going on...What u said about while(key_pressed()) ..i cant understood it..can u make change in my programm and attach it here..i shall be very thankful to you
Mon Oct 01 2012, 10:02 pm
thanx for help..........i changed my whole program and add some pull up register and i done it...thnx...
Tue Oct 02 2012, 01:12 am
good job congrats.. this was the modification I suggested.
while (1) { while(key_pressed()) { //rest of the program... } } //this is extra while loop preventing program to exit.
Powered by e107 Forum System