cool.man
Full Member level 6
Why it is so? I think i have defined every thing,I am doing nothing in the main loop,whenever an external interrupt comes it saves the last timer value and reset the timer and then display the value.your code wouldn't work because you didn't provide a way for it to work.
The code you have given me is absolutely right but code always stuck in a while loop for calculating/seenig the state of the pulse.
If i use a timer value and reset it when ext int come,i think this will be more efficient way.This is my opinion,you are experienced people you can tell the better way for solving this.
I have to preform other tasks also like count the number of pulses coming from ext interrupts and based on these pulses perform other calculations and also calculate the frequency.