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.

CCS/ADS1220: ads1220

Part Number: ADS1220

Tool/software: Code Composer Studio

HI , I've a  trouble with ads1220 ,it  receive clock and data even when   cs  pin is high . The converter work fine if  it is connected alone ,but with others  spi ic , i receive wrong data.

The microcontroller is TMC1294 , 

i've  connected also a 100K pull up resistor to the cs pin .

Just for test i've tried to read the converter with the cs high and it doesen't send any data.(mean that the cs work fine)

ads1220 setting  , continuos conversion mode. dataready is also monitored.

do you have any suggestion? 

thanks best regards.

 

  • Hi Davide,

    How have you concluded that the ADS1220 is the issue? What specifically are you doing when you see an error? What other devices are connected to the SPI? Can you send me your schematic? Do you have oscilloscope or logic analyzer shots of the communication? Do you have code you can share showing device setup and communication?

    Best regards,
    Bob B
  • hI BOB ,

    the board is the ads 1220 evm and the micro is the tiva 1294 lauchpad
    just sending this when the cs is High the ads1220 send back wrong datas when i read.

    SSIDataPut (SSI0_BASE, 0XFF);
    while(SSIBusy(SSI0_BASE)) {}




    My ads1220 setup





    spi settting
    SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
    SSIDisable(SSI0_BASE);
    SysCtlDelay(10000);
    GPIOPinConfigure(GPIO_PA2_SSI0CLK);
    GPIOPinConfigure(GPIO_PA3_SSI0FSS);
    GPIOPinConfigure(GPIO_PA4_SSI0XDAT0);
    GPIOPinConfigure(GPIO_PA5_SSI0XDAT1);
    SysCtlDelay(10000);
    GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_5 | GPIO_PIN_4 | GPIO_PIN_3 |GPIO_PIN_2);
    GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_1| GPIO_PIN_6);
    GPIOPinTypeGPIOInput(GPIO_PORTA_BASE, GPIO_PIN_0);
    // SSI_FRF_TI
    SSIConfigSetExpClk(SSI0_BASE, 120000000, SSI_FRF_MOTO_MODE_1,SSI_MODE_MASTER, 100000, 8); // set SSI clk to run at 1mill bits/sec
    SysCtlDelay(3);

    // Enable the SSI0 module.
    SSIIntEnable(SSI0_BASE, SSI_RXFF | SSI_RXTO | SSI_RXOR );
    SSIEnable(SSI0_BASE);

    // reset adc1220
    GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_1,0x0 );
    SysCtlDelay(3);

    SSIDataPut(SSI0_BASE, 0b00000110); // reset adc for setting
    while(SSIBusy(SSI0_BASE)) {}
    SysCtlDelay(3);

    GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_1, GPIO_PIN_1);
    // setting adc1220
    writeReg1220(0b01000100,0b00100100); // this is my function

    *******************************************************************************************************************************
    void writeReg1220 (uint8_t registro ,uint8_t valreg){
    GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_1,0x0 );
    SysCtlDelay(200);

    SSIDataPut(SSI0_BASE, registro);

    while(SSIBusy(SSI0_BASE)) {}
    SSIDataPut(SSI0_BASE, valreg);
    // SSIDataGet(SSI0_BASE, spiRead);
    //while(!SSIBusy(SSI0_BASE)) {}
    while(SSIBusy(SSI0_BASE)) {}
    SysCtlDelay(20);

    GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_1, GPIO_PIN_1);


    }
    **************************************************************************************************************************************



    // reading adc 1220


    // pin 0 port A is dataready , pin1 is the CS
    if (!GPIOPinRead(GPIO_PORTA_BASE, GPIO_PIN_0)){

    SysCtlDelay(30);
    GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_1,0x0 );

    // while(!GPIOPinRead(GPIO_PORTA_BASE, GPIO_PIN_0)) {}






    //****************** data2 high , data1 mid , data0 low

    SSIDataPut (SSI0_BASE, 0XFF);
    while(SSIBusy(SSI0_BASE)) {}

    SSIDataGet(SSI0_BASE, &buf1);
    while(SSIBusy(SSI0_BASE)) {} // while(SSIBusy(SSI0_BASE)) {}
    g_sCANMsgObject1.pui8MsgData[2] =buf1;

    // lettura byte 1
    SSIDataPut (SSI0_BASE, 0xFF);
    while(SSIBusy(SSI0_BASE)) {}
    SSIDataGet(SSI0_BASE, &buf2);
    while(SSIBusy(SSI0_BASE)) {}
    // while(SSIBusy(SSI0_BASE)) {}
    g_sCANMsgObject1.pui8MsgData[1] =buf2;// invertire 3 con 4 per ads12220

    // lettura byte 2
    SSIDataPut (SSI0_BASE, 0xFF);
    while(SSIBusy(SSI0_BASE)) {}
    SSIDataGet(SSI0_BASE, &buf3);
    while(SSIBusy(SSI0_BASE)) {}

    g_sCANMsgObject1.pui8MsgData[0]=buf3;





    SysCtlDelay(30);
    GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_1, GPIO_PIN_1);



    }



    thanks and best regards
  • Hi Davide,

    Did you just add the Launchpad connectors to the ADS1220EVM and plug directly to the 1294 Launchpad without modification? The pinout for the ADS1220EVM is an early configuration prior to the current Boosterpack standard which will require some changes. Also, you must make sure that the MSP430 on the EVM is not interfering with the communication. This requires adding a jumper at JP5 and JP6.

    I will further analyze your code snippet as soon as I'm able.

    Best regards,
    Bob B
  • Hi bob i 've soldered the wires from the lauchpad to the 1220 evm about 10 cm and jp5 is closed , jp6 is for enable or disable external clock reference and now is open but i don't think that it cause the problem . now I'm going to test my board with full isolated spi from micro to the ads1220 . I just want to know if when I pull high the CS , the converter doesn't receive anithing or there is some notice about this trouble with the ads1220 . thanks best regards.
  • Hi Davide,

    There is no issue with the ADS1220 with other devices on the same SPI as long as CS is high.

    Best regards,
    Bob B
  • Hi bob , thanks
    best regards.
  • Hi Davide,

    I don't see anything in the code that would be an issue. Make sure that you have a good ground connection between the boards, and check the signals (especially SCLK) with an oscilloscope to make sure that they are clean and not noisy. Also make sure that timing specifications regarding CS going low and the first rising edge of SCLK and last falling edge of SCLK to rising edge of CS are not violated.

    Best regards,
    Bob B