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.

ADS131M02: 现在正在使用这款芯片,按照ADS131M04参考源码更改了相关值,发现读取寄存器返回值没问题,读取ADC通道数值一直为0,代码如下

Part Number: ADS131M02
Other Parts Discussed in Thread: ADS131M03

bool ADS131_readData(adc_channel_data *DataStruct);

uint16_t sendCommand(uint16_t opcode);

以上两个函数未进行更改

void Ads131m3ADC_GetData(void)
{
adc_channel_data*ADS131M03;
uint8_t i=0;

if(u16ADS131_24Tick < 1000) return; //1S
PRINTF("*************************ADC131M************************\r\n");
// if(ads131m3_spi2_DRDY()==0x00)

uint16_t response = sendCommand(OPCODE_RREG|CH1_OCAL_MSB_ADDRESS<<7|0x00);;
response=sendCommand(OPCODE_RREG|CH1_OCAL_LSB_ADDRESS<<7|0x00); //101a aaaa annn nnnn
// readSingleRegister(CH1_OCAL_MSB_ADDRESS);
for(i=0;i<2;i++)
{
PRINTF("ADS131M03->OPCODE_RREG_CH1_GCAL_MSB: %2x ",OPCODE_RREG|CH1_OCAL_LSB_ADDRESS<<7|0x00);
ADS131_readData(ADS131M03);
// PRINTF("readadc_ads131m03 three channel data: \r\n");
PRINTF("ADS131M03->response: %2x ", ADS131M03->response);
PRINTF("ADS131M03->channel0: %2x ", ADS131M03->channel0);
PRINTF("ADS131M03->channel1: %2x ", ADS131M03->channel1);
PRINTF("ADS131M03->crc : %2x \r\n", ADS131M03->crc);
delay_us(1000);
ADS131_readData(ADS131M03);
// PRINTF("readadc_ads131m03 three channel data: \r\n");
PRINTF("ADS131M03->response: %2x ", ADS131M03->response);
PRINTF("ADS131M03->channel0: %2x ", ADS131M03->channel0);
PRINTF("ADS131M03->channel1: %2x ", ADS131M03->channel1);
PRINTF("ADS131M03->crc : %2x \r\n", ADS131M03->crc);
}
}

我看demo都外接了晶振,这款芯片必须要接时钟输入?