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
  • additionaly, I connected  DC generator (results via parallel interface)

    U DC

    Dec

    Bin

    0 mV

    31567

    31631

    111101101001111

    111101110001111

    50 mV

    31503

    31631

    111101100001111

    111101110001111

    100 mV

    31695

    31759

    111101111001111

    111110000001111

    150 mV

    31759

    31887

    111110000001111

    111110010001111

    LS bits from 0 to 5 is not working.... and always 001111

Reply
  • additionaly, I connected  DC generator (results via parallel interface)

    U DC

    Dec

    Bin

    0 mV

    31567

    31631

    111101101001111

    111101110001111

    50 mV

    31503

    31631

    111101100001111

    111101110001111

    100 mV

    31695

    31759

    111101111001111

    111110000001111

    150 mV

    31759

    31887

    111110000001111

    111110010001111

    LS bits from 0 to 5 is not working.... and always 001111

Children
No Data