ADE7953 - converting register codes to meaningful values

Hello,

In my project I need to measure
 Measure Vrms, Irms, Power Factor, Watt/hour

Could you please give me a hint to how convert register codes values to a meaningful values? So far I’m stuck to voltage channel

Here is the register values I got in ADE7953

PGA_V = 0 (Gain: 1, full scale 0.5v)
AVGAIN(0x381) = 0x00400000 (default value)
BVGAIN(0x38D) = 0x00400000 (default value)
HPFEN(0x102) = 0x00008004 (HPF Enabled)

Assuming I have single side input on voltage side with resistive divider:
 R1 = 400K
 R2 = 1K,

Source voltage before divider:
 28.01V Peak (19.4Vrms) sin. (measured)

I’m receiving following codes from ADE7953:
 V_PEAK(0x0327) = 892104
 V_RMS(0x031C) = 1244824

Here is how I converting this codes to voltage:
 Assuming full range Voltage channel at 0.5v produce code 6,500,000

 Vin_PEAK =  V_PEAK_CODE * 0.5 / 6,500,000
 Vin_PEAK =  892104 * 0.5 / 6,500,000 = 0.0686234 V
 
Calculate value before resistive divider:

 V_PEAK = Vin_PEAK(R1+R2) / R2 = 27.517977  

 which is close but not exactly (measured 28.01)


V RMS

 RMS register gives value 9032007 at full scale, according to datasheet

 Vin_RMS = V_RMS_CODE * 0.5 /  9,032,007
 Vin_RMS = 1244824 * 0.5 /  9,032,007 = 0.0689118

correcting value according to resistive divider:
 V_RMS = Vin_RMS*(R1+R2) / R2 = 27.633638  
 
 Which is not even close to measured value - 19.431

I'm sure I'm doing something wrong...

Thanks in advance