Discussion in "ARM Development" started by    vijay    Sep 30, 2012.
Sun Sep 30 2012, 09:23 pm
#1
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
Attachment
Mon Oct 01 2012, 10:05 am
#2
First thing, you need to check your key logic as it should not detect any key... secondly
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
#3
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
#4
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
#5
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.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm
Charlestehed
Wed Apr 24 2024, 05:20 pm
Robertgurse
Wed Apr 24 2024, 02:43 pm