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, GPIO模拟SPI通讯无反应?



如题,贴下代码, 

void spi_write(uint8 value)
{
uint8 i, temp;
CS = 1;
delay();
SCLK = 0;
delay();
CS = 0;
delay();
for(i = 0; i < 8; i++)
{
temp = ((value >> (7 - i)) & 0x01);
SCLK = 0;

DIN = temp;
delay();
SCLK = 1;
delay();
}
//delay();
SCLK = 0;
delay();
//SCLK = 1;
CS = 1;
delay();
SCLK = 1;
}

用示波器看了下波形,感觉没有啥问题,但是电路两端的电阻就是不对啊,始终是50kOhm。