KBI On Active High?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KBI On Active High?

2,054 Views
AveryZ
Contributor I
Hi,
 
I am using a QProx 118H touch sensor in pulse mode (when touched, pulses high - at rest it is low) and I would like that high-pulse to raise an event on my HC908GR8. I am trying to use the KBI to accomplish this but am having difficulty because interupts are invoked by going low! Any ideas on how to do this?
 
Thanks,
Avery
Labels (1)
0 Kudos
3 Replies

367 Views
AveryZ
Contributor I
Hi Guys,
 
Thanks so much for your replies. The KBI was actually a replacement thought for polling, which i was already doing - but it had the occasional hiccup and would miss an event or two every now and then. I've switched to TIM input capture and it works like a dream - absolutey awesome!
 
Thanks again!
Avery
0 Kudos

367 Views
bigmac
Specialist III
Hello Avery,
 
I agree with Joerg that the interrogation of the QT118H output may not need the use of an interrupt.  However, here is a more general answer to your query -
 
For those MCUs where the KBI module does not provide polarity selection, another possible interrupt source that can be used is one of the timer input capture channels.  This can be set up to trigger on either, or both edges of the input.  In this case, the actual input capture value is not required, and can be ignored (apart from the flag clearing process).
 
Regards,
Mac
 
0 Kudos

367 Views
joerg
Contributor II
Hi Avery
Do you really need a interrupt? If you poll the input(s) lets say every 4ms i think that will work just perfect. I am doing so for my matrix keyboard (TAST4x4) with my OS EBS08.

Saluti Joerg
0 Kudos