Sine Wave Absolute Value.

May 16, 2006 2 Replies

Hi Guys!! need your help on this.



Im measuring a sine wave from the ADE7756 Energy Metering IC from its registers, I get the Full Wave in Hex code, positive values and negative values, how can I calculate from the information on the ADE7756 registers the Absolute Value of the Wave?



Thanks in Advance Guys



Adonis



If the output is two's complement which it probably is, test the msb. If it is "0" the value is the same, positive side. If it is "1", negative side, complement it and add "1". For example: Say the output is positive 5, 0x5,

0101b then the output is 0101b and if the output is minus 5, 0xB, 1011b, complement it to 0100b and add "1" = 0101b. Bob

Turn the negative values positive? Maybe a 2s complement?

Good Luck! Rich

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required