This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RE: ADS1220 - Communication

Other Parts Discussed in Thread: ADS1220, CC2640

Hi Bob,

Thanks for the code and files.

I am using ADS1220 with CC2640. But for sake of checking I am connecting ADS to microchip controllers.

My input is single ended on AN1. External ref is there.

I am trying to modify config registers , I am able to see activity on DSO.

But when I read same registers , Its not showing me proper value.

Plus ADS is showing perfect reading when power up and debug the system. But after that no ADS data is getting updated.

/****************************************** code ********************************************/

ADS1220AssertCS(1);

SPI_TxData(0x43);
Nop();
for(i=0 ; i<5 ; i++);
Nop();
SPI_TxData(0x91);
Nop();
for(i=0 ; i<5 ; i++);
Nop();
SPI_TxData(0xCC);
Nop();
for(i=0 ; i<5 ; i++);
Nop();
SPI_TxData(0x40);
Nop();
for(i=0 ; i<5 ; i++);
Nop();
SPI_TxData(0x22);
Nop();
for(i=0 ; i<5 ; i++);
Nop();

SPI_TxData(0x20);
Nop();
for(i=0 ; i<5 ; i++);
Nop();
D1 = SPI_RxData();

ADS1220AssertCS(0);

Nop();
Nop();

Nop();

Kindly guide me.

Regards,
Hiren Shah
  • Hi Hiren,

    I split your question from the previously closed post as it was slightly off topic.  If possible can you send me your schematic and any oscilloscope/logic analyzer shots of the communication?  Also, what was the register read response from the ADS1220?

    One thing I noticed is that you are making some unusual combinations for the register settings.  I would keep things very simple at the start to make sure you can write and read a single register before writing a combination.  Also, you set the device to continuous conversions but never issued the START command.  When power is initially applied the ADS1220 makes one conversion and powers down.  When starting conversions from the powered down state you should always issue a START command.

    Best regards,

    Bob B

  • Hi BOB,

    Thanks for putting thread in right place.

    We are using it for customized way that's why small unual interface.

    I am able to write registers and also read it. Its working finw.

    But I have one question , when i am giving VCC as input , I am not getting full scale value. Any special think required to setup ADS?

    I am using it in turbo mode with 2 KSPS sample rate.

    void ADS1220Config(void)
    {
    unsigned long Temp;
    unsigned char i;


    ADS1220SendResetCommand();
    for(i=0 ; i<10 ; i++);
    Nop();
    Nop();

    ADS1220AssertCS(1);
    Nop();

    ADS1220ReadRegister(ADS1220_0_REGISTER, 0x01, &Temp);

    Temp = 0x91;
    Nop();
    Nop();

    // write the register value containing the new value back to the ADS
    ADS1220WriteRegister(ADS1220_0_REGISTER, 0x01, &Temp);
    Nop();
    Nop();
    Nop();
    Nop();

    ADS1220ReadRegister(ADS1220_0_REGISTER, 0x01, &Temp);
    Nop();
    Nop();
    Nop();
    Nop();


    ADS1220ReadRegister(ADS1220_1_REGISTER, 0x01, &Temp);


    Temp = 0xD4;

    // write the register value containing the new value back to the ADS
    ADS1220WriteRegister(ADS1220_1_REGISTER, 0x01, &Temp);
    Nop();
    Nop();

    ADS1220ReadRegister(ADS1220_3_REGISTER, 0x01, &Temp);
    Nop();
    Nop();

    Temp = 0x40;
    // write the register value containing the new value back to the ADS
    ADS1220WriteRegister(ADS1220_2_REGISTER, 0x01, &Temp);
    Nop();
    Nop();

    Temp = 0x02;
    // write the register value containing the new value back to the ADS
    ADS1220WriteRegister(ADS1220_3_REGISTER, 0x01, &Temp);
    Nop();
    Nop();

    ADS1220ReadRegister(ADS1220_3_REGISTER, 0x01, &Temp);
    Nop();
    Nop();

    ADS1220SendStartCommand();

    Nop();
    Nop();

    ADS1220AssertCS(0);

    Nop();
    Nop();
    Nop();



    }

    Regards,
    Hiren Shah
  • Hi Hiren,

    Is VCC the same as your reference voltage input?  What value is being returned from the ADS1220?  Is it close to full-scale?  If it is very close to full-scale, there may be some offset or gain issue.  It would be helpful to see your schematic and the data being returned from the ADS1220.

    Best regards,

    Bob B