CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

measurement of phase and magnitude of 2 analog signal

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
yoda
Guest







measurement of phase and magnitude of 2 analog signal
PostPosted: Tue Jan 22, 2008 1:43 am     Reply with quote

hai....i have project to calculate the magnitude of AC voltage input and the phase angle between the AC voltage input and the constant 1mA AC current. im using 50kHz frequency for both signal. my input current signal will be connected to PIN_A1 and my input voltage signal will be connected to PIN_A0.

for voltage signal, i have to use ADC to get the magnitude. for current signal, since it is constant, is it possible for me to just write current value as 1mA in a program and no need to detect it since it is constant value?

for phase angle, my general idea is to use CCP1 (current) and CCP2 (voltage) where the delta_time is different time between CCP1 and CCP2 and the period=new_CCP1-old_CCP1

phase=(delta_time/period)*360.0

in programming, is it the best way for the PIC to get the phase angle first or do the calculation to get the amplitude of the voltage?

please help me...i'm new in programming
yoda
Guest







problem with pin connection
PostPosted: Tue Jan 22, 2008 1:52 am     Reply with quote

i have another problem, to use ADC, i need to connect the input signal to the analog pin rite? but to get the phase of same input signal, by using CCP1 or CCP2, i need to connect the input signal to the CCP1 or CCP2 pin (pin no 16 and 17 PIC16F87A)

can u guy help me how to solve this kind of problem.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group