There are different types of registers in ADE7880 and here is a guide to help understand how to interpret values of some of the most commonly used regsiters:

**24-bit signed registers- Sign extended to 28-bits and zero-padded to 32 bits (ZPSE)**

The 24-bit signed value is sign-extended to 28-bits and zero padding is done at the end to extend it to 32-bits, as shown below.

Register value read back (in hex) | Register value (in decimal) |

FF9999A | -419430 |

28F5C | 167772 |

Note: Use 2’scomplement form to convert into decimal format, when sign bit is 1.

**24-bit signed registers- Sign extended to 32-bits (SE)**

Register value read back (in hex) | Register value (in decimal) |

7FFFFF | 8388607 |

FFF00000 | -1048576 |

Note: Use 2’scomplement form to convert into decimal format, when sign bit is 1.

**Gain registers**

24-bit signed value with MSB representing the sign. Sign-extended to 28 bits and zero padded to 32 bits.

Write to the IC | Read from the IC | ||||

Scale (in %) | Register (in decimal) | Register (in hex) | Register (in hex) | Register (in decimal) | Scale (in %) |

-5 | -419430 | FF9999A | FF9999A | -419430 | -4.999995232 |

25 | 2097152 | 200000 | 200000 | 2097152 | 25 |

Note: If -5% scaling is needed, then a decimal value of 2^{23} * (-5%) must be provided to the register. Similarly, while reading back from the register, divide the register value by 2^{23} to understand the scaling used.

Registers that come under this category:

Registers | Address locations |

xxGAIN | 0x4380-0x4386 |

xPGAIN | 0x4389,0x438B, 0x438D, 0x4398 |

**Power Factor **

a) 16-bit signed register

The MSB is the sign bit. Each LSB has weight of 2^{-15}. So, convert the register value into its decimal equivalent and multiply by 2^{-15}, to get the power factor result.

Register value read back (in hex) | Register value (in decimal) | Power Factor |

7500 | 29952 | 0.9140625 |

F136 | -3786 | -0.115539551 |

Registers that come under this category:

Registers | Address locations |

xPF | 0xE902-0xE904 |

b) 24-bit signed register

MSB is sign bit. Sign-extended to 28 bits and zero padded to 32 bits. Each LSB has weight of 2^{-15}. So, convert the register value into its decimal equivalent and multiply by 2^{-15}, to get the power factor result.

Register value read back (in hex) | Register value (in decimal) | Power Factor |

FD9999A | -2516582 | -0.299999952 |

5C28F6 | 6039798 | 0.720000029 |

Registers that come under this category:

Registers | Address locations |

FPF | 0xE885 |

HxPF | 0xE88D,0xE895, 0xE89D |

**Harmonic distortion**

These registers are in 3.21 signed format. The 3.21 signed format is a representation in which most significant three bits are assigned to the integer value of the decimal number. The less significant 21 bits constitute the fractional component. The most significant bit of the integer portion is the sign bit. Obtain the actual value of the register by dividing the register value by 2^{21}.

Register value read back (in hex) | Register value (in decimal) | Harmonic distortion |

7FFFFF | 8388607 | 3.999999523 |

6FDE | 28638 | 0.013655663 |

Registers that come under this category:

Registers | Address locations |

xTHD | 0xE886,0xE887 |

HxxHD | 0xE88E,0xE88F,0xE896,0xE897,0xE89E,0xE89F |

Hi hmani,

For Harmonic distortion, since bit 23 is the sign bit, if this bit is set to 1, do I need to do 2's complement to convert the whole 24 bit register value to its decimal value first?

Thanks.

Karen