# power factor measurement

Status
Not open for further replies.

#### dhanashpic

##### Newbie level 2
Code:
hi..i want to measure the power factor...my project is to make power factor meter,
my approach is to find out the zero crossing of both Current and Voltage,
find out the time difference and then calculate the angle...My timer (TMR0) start from 0x3c.The problem is that variable r didnt read the value of TMR0...my coding is as follows..

while(RD1==1);
TMR0=0x3C;
while(RD1==1);
r=TMR0;

thanks

Status
Not open for further replies.