NEC ELECTRONICS GLOBAL
nec electronics global
HOME
APPLICATIONS
PRODUCTS
TECHNOLOGY
SUPPORT
BUY ONLINE
NEWS & EVENTS
ABOUT US
header
GO
AdvancedParametric
SITE MAP CONTACT US

Key Interrupt and Chattering Countermeasures (78K0/Kx2)

Contents

    
FAQ-ID = keyc-nnnn
0001: Key interrupt and chattering countermeasures (78K0/Kx2)
keyc
-0001
Key interrupt and chattering countermeasures (78K0/Kx2)
Q1
I am trying to perform switch input using the key interrupt function. Does key interrupt cope with chattering in terms of hardware?
A1
No, no chattering prevention function is provided internally as hardware.
Noise elimination done internally in the microcontroller may be on the order of several tens of ns (using analog delay) to several µs (noise elimination by sampling) at most. Normally, mechanical vibrations such as chattering last several ms, which is an extremely long time as seen from the operation of the microcontroller. No filter capable of eliminating noise over such long durations is provided internally.
Therefore, if a chattering countermeasure is required, set up a waiting period outlasting the chattering through a software-implemented timer at the start of key interrupt processing, and then perform key verification.
For more information on key input and key interrupts, refer to "Key Switch Input into Microcontroller".

Caution
Since the CPU goes into an interrupt prohibit state when a key interrupt is acknowledged and the operation branches to an interrupt vector, multiple key interrupts cannot be acknowledged simultaneously. However, the interrupt request flag is set by chattering. Thus the interrupt request flag must be cleared prior to return from a key interrupt.
Moreover, caution is required about the fact that chattering also occurs when a key is released, as shown in the following figure. This can be handled through the elimination of chattering via a software-implemented timer.
Is this information useful for you ?
back to top  
(2008/01)









































 LEGAL  RSS Feeds       © 1995-2008  NEC Electronics Corporation