johnwasser:
With the pulse length being 100 mS there is almost no difference between using RISING and FALLING. Pick one.All the interrupt has to do is add 5 to a global volatile unsigned long that keeps track of kilowatt hours:
volatile unsigned long kWh = 0;
void ISR1()
{
kWh += 5; // Each pulse represents 5 kWh
}
Thank you John, I would I then proceed to calculating the instantaneous power in Watt?