TLC3578工作模式为REPEAT SWEEP MODE, 用CS片选端驱动转换器,采样出来的结果为0,这是为什么?
代码如下:
void Inittlc3578(void) //初始化TLC3578
{
SPI_CS_H;
SPI_CS_L;
spi_delay(1);
spi_xmit(0xA000);
spi_delay(1);
spi_xmit(0xAA61);
spi_delay(1);
}
void starttlc3578(void) //启动3578
{
int i=0;
SPI_CS_L;
for(i=0;i<6;i++)
{
SPI_CS_H;
spi_delay(1);
SPI_CS_L;
spi_xmit(C[i]);
spi_delay(1);
}
}