KBI On Active High?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

KBI On Active High?

2,776 次查看
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,089 次查看
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,089 次查看
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,089 次查看
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 项奖励
回复