Hi,
1. I am connecting a push button on one gpio pin. I am using high level component on Processor expert. I dont see there is an option that i can enable interrupt on.
->In case someone need the info: In order to add interrupt of GPIO, it has to be added as component of 'ExtInt'.
2. When i hold down switch really long time. The u Controller detect the states back and force (0,1,0,1...). How would i make sure this doesnt happen?
3. How do i set a threshold for a short key press?
So i still dont understand the logic of debounce below. My current thought would be capture the duration of interrupt, and compare it to a threshold time. However,
i am not confident about this idea.
Thanks,
Yaran
Message was edited by: Yaran Nan
Hi Yaran,
if you are not using the Kinetis SDK, then there is an open source component which does all the button press handling, with/without interrupts and configurable debouncing (short/long keypress). This project is using it: JoyStick Shield with the FRDM Board | MCU on Eclipse
Erich
Hello Erich,
I figured out how to disable and enable interrupt on KDS now. Thanks for the link above.
Thanks,
Yaran
Hi Erich,
Thanks for the attention. I am running on KDS. I didnt see some IRQ option on KDS though. The current biggest issue is that I don't
know how to enable and disable gpio interrupt by using PE template. Please let me know if there is more resources available.
Thanks,
Yaran
Hello Yaran,
Please provide the information bellow :
1) The version of your KDS;
2) Which chip;
3) Which gpio component of PE, please screenhort ,thank !
BR
Alice
Hi Alice,
1) KDS 2.0 haven't update yet
2) MK20DX256VLL10
3) I used BitIO (PTE4) and Init_GPIO component
Thank you.
Yaran