I had written Interrupt Routine so as (1) Interrupt (INT0-PIN2) should get activated on trailing edge of the repetitive pulse of frequency around 1 KHZ. (2) UPON interrupt pin4 changes it's state (3) Observed that Arduino Nano Missing some pulses.
What can be the solution for the same? please advice. For reference screenshot of oscilloscope had been attached herewith. Yellow Trace-Ch1-is Input signal at pin2 and other one -Ch2-is output signal at pin4.
Hey Robin!
upon occurrence of Interrupt after every defined time i.e. approximately 1 Milliseconds; need to measure Duty-Cycle of another Input waveform-code for which not yet included since I am still not able to detect every trailing edge of the signal fed to Pin 2 i.e. INT0
My guess is that the input is bouncing. Your picture does not show enough detail to tell but it does show some small negative-going spikes in the middle of some of the pulses.
If the input bounces the interrupt will occur twice in a few microseconds and the State will toggle twice, producing no net change of State.