Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?
hi ,
As discussed sharing the standard circuit diagram of the datasheet.
Well i have connectes all the 3 phases only.
Reading AVRMS register.The image of sclk and dout interface on oscilloscope is shown as below .
I have pulled up the dout pin on ic with Vdd.
The input waveform of the Ac phase A is as shown below . Between Neutral and at pin VAP.
It is showing 267mv rms at the pin VAP wrt to Neutral after the attenuation resistor network.......
Regarding the coding :
//---------------------------------------------------------------------------------------------------------------------------------------------------------------
void main()
{
//initialization
/*
.......
.......
.......
*/
write8bits(OPMODE,0b00000100);delay_ms(1);
write16bits(AVRMSOS,0x0000);delay_ms(50);
while(1)
{
ss++;
value_read1 = read24bits(AVRMS);delay_ms(100);
if(ss >= 2)
{
ss=0;
Lcd_Out(1,1,"R:");
LongWordToStr(value_read1,txt);Lcd_Out(1,4,txt);
}
}
}
//---------------------------------------------------------------------------------------------------------------------------------------------------------------
- - - Updated - - -
Hi friends ,
I just tried to read the LCYCMODE REGISTER on power on. Not able to read properly .
Getting 0x7f instead of 0x78(default value) .Not able to read properly.....The dout pin is not driving out proper data ?