I need exact code to capture and compare input pulse of 1Hz.
Input: 1Hz pulse
Instruction: Detect pulse of 1 Hz present or not, Depending on which LED will switch on or off!. If Pulse is there of 1Hz the LED should glow else turn off the LED.
Possible Approach: The timer should capture or compare time between two consecutive rising edges, if the interval is less than 1.5 Hz then LED Glows else turn off LED.
Output: if the pulse is stuck at 0 or 1 then LED 2 should be off. else Led 2 should be on.
Thanks