Other Parts Discussed in Thread:ADS1292
我使用芯片内部时钟,配置连续采用模式,采样率500HZ(附件具体电路,寄存器配置下面有贴出),通过示波器测得DRDY中断脚输出中断频率并非500HZ,有一定偏差,有的硬件偏大,有的硬件偏小。
通过主控MCU(NRF52832)采集心电点数看,60秒内有比理论值少30多个点的,也有多20多个点的。而且多次测试发现,偏大的始终偏大,偏小的始终偏小。这种情况是什么原因导致的呢?
//寄存器配置
const uint8_t ADS1x9xR_Default_Register_Settings[15] = {
//Device ID read Ony
0x00,
//CONFIG1
0x02,
//CONFIG2
0xE0, //2.4V ref
//LOFF
0xF0,
//CH1SET (PGA gain = 6)
0x00, //= 6
//CH2SET (PGA gain = 6)
0x00,
//RLD_SENS (default)
0x2C,
//LOFF_SENS (default)
0x0F,
//LOFF_STAT
0x00,
//RESP1
0x02, //resp closed
//0A RESP2
0x03, //32K
//GPIO
0x00
};
//初始化配置
uint8_t Ads1292_Open(void)
{
uint8_t i, buff[20];
//上电
ADS1292_PWR_ON;
nrf_delay_ms(20);
//复位
Ads1292_Reset();
//关闭转换
ADS1292_START_OFF;
//关闭连续读
Ads1292_WriteCmd(ADS1x9x_CMD_SDATAC);
nrf_delay_ms(1);
//读ID
Ads1292_ReadReg(ADS1x9x_REG_DEVID, buff, 1);
if (buff[0] != 0x73)
{
return 0;
}
//写配置并校验
Ads1292_WriteReg(ADS1x9x_REG_CONFIG1, (uint8_t *)&ADS1x9xR_Default_Register_Settings[1], 11);
Ads1292_ReadReg(ADS1x9x_REG_CONFIG1, buff, 11);
for (i = 0; i < 11; i++)
{
if ((buff[i] != ADS1x9xR_Default_Register_Settings[1 + i]) &&
(i != 7)) //reg8 read only
{
return 0;
}
}
//开启连续读
Ads1292_WriteCmd(ADS1x9x_CMD_RDATAC);
nrf_delay_ms(1);
//开始采样
ADS1292_START_ON;
//开启DRDY中断
Ads1292_IrqEnable(true);
return 1;
}
Amy Luo:
您好,
您使用的是什么时钟源,如果时钟源不稳定,可能会产生偏差