power factor measurement

Status
Not open for further replies.

dhanashpic

Newbie level 2
Joined
Mar 7, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…