KBI On Active High?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KBI On Active High?

2,780件の閲覧回数
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
ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,093件の閲覧回数
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 件の賞賛
返信

1,093件の閲覧回数
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 件の賞賛
返信

1,093件の閲覧回数
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 件の賞賛
返信