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();
}
}
