SLVA720A July 2015 – October 2020 CD14538B , CD14538B-MIL , CD4047B , CD4047B-MIL , CD4098B , CD4098B-MIL , CD54HC123 , CD54HC221 , CD54HC4538 , CD54HCT123 , CD54HCT4538 , CD74HC123 , CD74HC221 , CD74HC423 , CD74HC4538 , CD74HC4538-Q1 , CD74HCT123 , CD74HCT221 , CD74HCT423 , CD74HCT4538 , SN54121 , SN54123 , SN54221 , SN54AHC123A , SN54AHCT123A , SN54LS123 , SN54LS123-SP , SN54LS221 , SN74121 , SN74221 , SN74AHC123A , SN74AHC123A-EP , SN74AHCT123A , SN74LS122 , SN74LS123 , SN74LS221 , SN74LS423 , SN74LV123A , SN74LV123A-EP , SN74LV123A-Q1 , SN74LV221A , SN74LV221A-Q1 , SN74LVC1G123
It is sometimes preferable to have a short pulse when an edge is detected rather than sending the original waveform to a microcontroller. This application shows how to output a pulse on one output when a leading edge is detected, and a second pulse on a different output when a falling edge is detected. The leading and falling edge detector circuits are identical in design and only have different input configurations. These two circuits use the same input in this example, but they could be used individually.
One example of when this might be useful is when a switch is toggled relatively rarely. A microcontroller would have to poll an input regularly in order to know the state of that switch. By adding a leading/trailing edge detector circuit, the microcontroller can just have an interrupt for each event and action would only be taken when the switch is actually toggled.