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.

TPL0501-100: SPI communication failed

Part Number: TPL0501-100


Tool/software:

If there is only one TPL0501 in the slave device, can the CS pin be directly connected to ground?I tried this and found that I could not communicate with the MCU.

The following is my SPI communication code.

void SPI_WT(unsigned char Data)
{
unsigned char n;
SPI_delay();
for(n=0;n<8;n++)
 {
  SPI_SCK=0;
  SPI_delay();
  if(Data&0x80)
      SPI_DIN=1;
  else
      SPI_DIN=0;
  SPI_SCK=1;
  WT_Data<<=1;
  SPI_delay();
 }
}