I'm planning to measure the duty-cycle of a square wave with interrupts: RB0INT for the signal and TIMER0 for timing. Considering one period, the PIC starts counting after the rising edge; then I fave to change the INTEDG bit; the PIC stops counting after the falling edge; this is Ton. After getting Toff in a similar way, the duty cicle will be calculated and displayed on an LCD.
Is this a valid method? Any alternatives?
Thanks
Is this a valid method? Any alternatives?
Thanks