已回答假定已回答

ADE7953读取电能参数

wenhua 在 2015-11-9 詢問的問題
最後回覆由Yiyi於2015-11-18提供

您好,我现在使用ADE7953做电能计量,有两个疑问:

1、我使用线周期累计模式读取电能值,修改不同的LINECYC寄存器的值,查询IRQSTATA寄存器CYCEND置1时读取AENERGYA电能值,读取出来的值是一样。

void ADE7953Cfg(void)

{

SPIWrite2Bytes(CONFIG,0x0004);

/**/

SPIWrite4Bytes(AIGAIN,0x400000);

SPIWrite4Bytes(AVGAIN,0x400000);

SPIWrite4Bytes(AWGAIN,0x400000);

SPIWrite4Bytes(AVARGAIN,0x400000);

SPIWrite4Bytes(AVAGAIN,0x400000);

SPIWrite4Bytes(AIRMSOS,0x000000);

SPIWrite4Bytes(AVRMSOS,0x000000);

SPIWrite4Bytes(AWATTOS,0x000000);

SPIWrite4Bytes(AVAROS,0x000000);

SPIWrite4Bytes(AVAOS,0x000000);

//SPIWrite4Bytes(BIGAIN,0x400000);

//SPIWrite4Bytes(BWGAIN,0x400000);

//SPIWrite4Bytes(BVARGAIN,0x400000);

//SPIWrite4Bytes(BVAGAIN,0x400000);

//SPIWrite4Bytes(BIRMSOS,0x000000);

//SPIWrite4Bytes(BWATTOS,0x000000);

//SPIWrite4Bytes(BVAROS,0x000000);

//SPIWrite4Bytes(BVAOS,0x000000);

 

SPIWrite2Bytes(CFMODE,0x0300);

SPIWrite2Bytes(CF1DEN,0x003F);

SPIWrite2Bytes(CF1DEN,0x003F);

SPIWrite2Bytes(CF1DEN,0x003F);

SPIWrite2Bytes(CF2DEN,0x003F);

   

SPIWrite4Bytes(OVLVL,0x4B0000);   //311mv at the input get pead read 0x3DB88C, times 1.2 get this

SPIWrite4Bytes(OILVL,0x4FFFFF);

SPIWrite1Byte(SAGCYC,0xFF);    //The SAGCYC register holds a maximum value of 255.

           //At 50 Hz, the maximum sag cycle time is 2.55 seconds

SPIWrite4Bytes(SAGLVL,0x200000);  //

SPIWrite2Bytes(ZXTOUT,0xFFFF);    //the maximum programmable timeout period is 4.58 seconds.

SPIWrite1Byte(LCYCMODE,0x47);

SPIWrite2Bytes(LINECYC,0x00C8);   //修改不同的值,读取电能都一样

SPIWrite4Bytes(IRQENA,0x140000);

}

这是我的初始化ADE7953的配置,是否因为配置不正确导致修改不同的LINECYC值时读取电能值都一致?

2、读取电流、电压、瞬时功率、功率因素和电能寄存器值后,如何校准对应我输入的电流、电压和电能等

結果