Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

C language and 16F877

Status
Not open for further replies.

MARWEN007

Junior Member level 2
Joined
Apr 16, 2011
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,481
Good evening, I want to achieve a basis for a pic 16F877 device measures the electrical impedance of the three phase lines, my card contains the voltage sensor and current and a peak 16F877 AND an LCD 16 * 2. we know it need to adapt the input signals with the peak everything is fine until now, our pic 16F877 will receive two tesion U1, U2 freq = 50 Hz (current and tesion): Then I'll determine the phase shift between these two signals (detection at zero crossing)
my problem at the moment I can not determine the maximum of my signals to determine the rms voltage or signal received. unfortunately I'm still newbie in C programming with the 16F877. "
I have a good idea to determine the max value of the signal and I can not use it in C languge the idea and the next
Set _adc channel(0)
a=read_adc()
b=read_adc()
c=read_adc()
Then I'll put a while loop to test if it is true it will be equal tens_max ab for b> a and b> c (I'll take this value as max)
else a = b
b = c
set_adc_channel (0)
c=read_adc( )
ohh excuse me if there is something wrong or that I forget I want you to help me determine the maximum values ​​with a fairly accurate method
 

Be aware that measuring the peak value you´re not able to calculate the "real" rms value beacuse is needed to measure and integrate point-to-point of the wave.

+++
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top