Post Go back to editing

AD7671 step

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;

Parents
  • Hi ruskuw,

       Just a clarification, what was the result when the inputs were connected to ground? It should be all zeros when configured in twos compliment. What is your output coding, by the way, Straight binary or twos complement? Would You be able to try a full scale voltage in the analog input. and please share the data that you see.

    Regards,

    Jonathan

Reply
  • Hi ruskuw,

       Just a clarification, what was the result when the inputs were connected to ground? It should be all zeros when configured in twos compliment. What is your output coding, by the way, Straight binary or twos complement? Would You be able to try a full scale voltage in the analog input. and please share the data that you see.

    Regards,

    Jonathan

Children
No Data