Discussion in "Project Help" started by    madhu_b63    Oct 3, 2007.
Wed Oct 03 2007, 06:39 pm
#1
Hello Ajay,
I am doing a project where i have to do multiple functions with limited keys(3 keys).I know that the polling method for keys is not best method but using interrupts how can i do that one.In simple way. Eg Key1 for set and key2 and key3 for + and -.
Wed Oct 03 2007, 09:27 pm
#2
as you want key1 for setting something.. then its like you are calling a routine on pressing that key..
so i suggest you to use key1 as interrupt and other two keys (key2 and Key3) as polling as after you enter into the setting routine, you have to wait for the keys to be pressed...
where as in case of key1, you never know when the key is going to be pressed..

you can take example from my clock projects there i had four keys.. one for setting time, and other for setting alarm.. two keys for + and -
Alarm set and Time set keys are used as interrupt keys, so when i enter the time setting routine.. i disable interrupts and poll the keys for pressing... as user has to go all the way in the time set routine. So it actually depends on your final application that decide what you want to do with your keys.. either interrupt or polling.

If you can tell brief functionality of your project and keys then i might suggest you proper usage...
 madhu_b63 like this.
Thu Oct 04 2007, 10:12 am
#3
Hello ajay,
Thanks for ur fast replay . First i will check the code of the digital clock then if i have any doubt i will contact u.
Thank U

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am