初始化ADS1256之后,
void ADS1256_Init(void)
{
/*Init data ready line */
ADS1256_Config_GPIO();
/*Init SPI2 for ADS1256 interface */
SPIx_Initialize(SPI2);
ADS1256_SetCommand(CMD_RESET);
ADS1256_DelayNumUs(100000); //wait for Vref is stable
/*it is strongly recommended to perform an additional self-calibration by issuing
the SELFCAL command after the power supplies and voltage reference have had time
to settle to their final values in pdf.27*/
while(ReadDrdyLine());
ADS1256_SetCommand(CMD_SELFCAL);
while(ReadDrdyLine());
/*Most Significant Bit First,Auto-Calibration Enabled,Buffer Enabled:11110111b */
ADS1256_WriteReg(REG_STATUS ,0xF7);
while(ReadDrdyLine());
/*PGA=1 */
ADS1256_WriteReg(REG_ADCON,0x00);
while(ReadDrdyLine());
/*select channle AIN2 as initial analog input*/
ADS1256_SetSingleChannel(2);
while(ReadDrdyLine());
/*set data rate as 10sps as initial rate*/
ADS1256_WriteReg(REG_DRATE,RATE_5SPS);
/*After changing the PGA, data rate, buffer status, writing to the OFC or FSC registers,
and enabling or disabling the sensor detect circuitry,perform a synchronization operation
to force DRDY high. It will stay high until valid data is ready*/
while(ReadDrdyLine());
ADS1256_SetCommand(CMD_SYNC);//synchronization command
ADS1256_SetCommand(CMD_WAKEUP);//wakeup command
while(ReadDrdyLine());
ADS1256_SetCommand(CMD_SELFCAL);
ADS1256_DelayNumUs(10);//it is important for this delay
/*When the voltage on VREFP or VREFN exceeds the buffer analog input range
(AVDD – 2.0V), the buffer must be turned off during self gain calibration.*/
}
配置ADS1256的STATUS状态寄存器的值为0xF7,然后去读这个状态寄存器的值,结果为0x30,这是为什么呢?(读其他的寄存器的值,却和配置的一样。)
求各位TI的老师指点一下。。。