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.

doubt the code example ADS1x9xECG-FE DK



Hello,

I don´t understand why in the function ADS1x9x_SPI_Command_Data (ADS1x9x.c), of the code example of ADS1x9xECG-FE Demonstration Kit, the CS pin is to zero when finish this function. This situation also occurs in the ADS1x9x_Reg_Write function .

/**********************************************************************************************************
* ADS1x9x_SPI_Command_Data                                                                                               *
**********************************************************************************************************/
void ADS1x9x_SPI_Command_Data(unsigned char Data)
{
    unsigned char delayVar;
    Set_ADS1x9x_Chip_Enable();                              //CS=0
    for (delayVar = 0; delayVar < 50; delayVar++);
    Clear_ADS1x9x_Chip_Enable();                         // CS=1
    Set_ADS1x9x_Chip_Enable();                            // CS=0
    UCB0TXBUF = Data;                 // Send the data sitting at the pointer DATA to the TX Buffer
     while ( (UCB0STAT & UCBUSY) );
    delayVar = UCB0RXBUF;

    for (delayVar = 0; delayVar < 150; delayVar++);
}

Thanks

Javi