AnsweredAssumed Answered

AD7671 step

Question asked by ruskuw on Jan 30, 2018
Latest reply on Feb 7, 2018 by jcolao

Hello 

 

I connected to input 0 V - code from AD7671 is 32463. It is fine. 

 

But when I repeat request the code is

32463 32591 32591 32463 32591  .... 

 

32591 - 32463  = 128  - Where is low signif. bits ?? 

 

I checked with serial and parallel data mode.

 

My parallel code is:

AD7671_CS_1;
AD7671_RD_1;


while(GPIO_ReadPin(28));//wait busy

AD7671_CS_0;
AD7671_RD_0;
AD7671_result = GpioDataRegs.GPBDAT.all;

AD7671_RD_1;
AD7671_CS_1;

 

//start conversion
AD7671_CNVST_1;
AD7671_CNVST_0;
AD7671_CNVST_1;

-------------------------------------

My serial code is 

AD7671_EXT_1;
AD7671_INVSCLK_0;
AD7671_RD_0;
AD7671_CS_1;
AD7671_SCLK_0;
AD7671_CNVST_1;

while(GPIO_ReadPin(28));//wait busy

AD7671_SCLK_0;
AD7671_SCLK_1;
AD7671_SCLK_0;

AD7671_CS_0;

 

 

d = 0;
for(j=0;j<16;j++)
{
AD7671_SCLK_1;

if(GpioDataRegs.GPBDAT.bit.GPIO56)//SDOUT
{
d |= (unsigned int)(1<<(15-j));

}
AD7671_SCLK_0;//D9

}

AD7671_result = d;

 

AD7671_CS_1;
//start conversion
AD7671_CNVST_0;
AD7671_CNVST_1;
AD7671_CNVST_0;

Outcomes