TI中文支持网
TI专业的中文技术问题搜集分享网站

ADS1256: ADS1256的输入通道,关闭buffer后,输入电压不为零,是正常的么?

Part Number:ADS1256Other Parts Discussed in Thread: ADS1255

我的ADS1256, 初始化时,关闭了buffer,但是输入通道不接入信号时仍然有0.7V的电压,(此时输入通道通过200K电阻接地), 请问,这是正常的么?

Amy Luo:

您好,

输入通道通过200K电阻接地,然后用示波器测量ADS1256输入管脚电压有0.7V吗?这不正常,您测试了几块板子是这种现象?具体您是怎样测量的?您可以附上电路图吗?

寄存器您只是关闭了buffer吗?其他寄存器比如 MUX 有没有配置?上述测量有0.7V电压的是哪个通道,对地测量的吗?

,

leo NI:

抱歉,我在邮件中回复,这里没有显示。我再回复一下。

电路图: 

一共配置了4个寄存器: 下面是配置代码

uint8_t   buf[4];    /* 暂存ADS1256 寄存器配置参数,之后连续写4个寄存器 */

/* 状态寄存器定义

Bits 7-4 ID3, ID2, ID1, ID0  Factory Programmed Identification Bits (Read Only)

Bit 3 ORDER: Data Output Bit Order

0 = Most Significant Bit First (default)

1 = Least Significant Bit First

Input data  is always shifted in most significant byte and bit first. Output data is always shifted out most significant

byte first. The ORDER bit only controls the bit order of the output data within the byte.

Bit 2 ACAL : Auto-Calibration

0 = Auto-Calibration Disabled (default)

1 = Auto-Calibration Enabled

When Auto-Calibration is enabled, self-calibration begins at the completion of the WREG command that changes

the PGA (bits 0-2 of ADCON register), DR (bits 7-0 in the DRATE register) or BUFEN (bit 1 in the STATUS register)

values.

Bit 1 BUFEN: Analog Input Buffer Enable

0 = Buffer Disabled (default)

1 = Buffer Enabled

Bit 0 DRDY :  Data Ready (Read Only)

This bit duplicates the state of the DRDY pin.

ACAL=1使能自校准功能。当 PGA,BUFEEN, DRATE改变时会启动自校准

*/

buf[0] = (0 << 3) | (1 << 2) | (0 << 1);     //此处(0 << 1)表示关闭BUFFER,改为(1 << 1)表示打开BUFFER
buf[1] = 0x08;          /* 高四位0表示AINP接 AIN0,  低四位8表示 AINN 固定接 AINCOM */

/* ADCON: A/D Control Register (Address 02h)

Bit 7 Reserved, always 0 (Read Only)

Bits 6-5 CLK1, CLK0 : D0/CLKOUT Clock Out Rate Setting

00 = Clock Out OFF

01 = Clock Out Frequency = fCLKIN (default)

10 = Clock Out Frequency = fCLKIN/2

11 = Clock Out Frequency = fCLKIN/4

When not using CLKOUT, it is recommended that it be turned off. These bits can only be reset using the RESET pin.

Bits 4-2 SDCS1, SCDS0: Sensor Detect Current Sources

00 = Sensor Detect OFF (default)

01 = Sensor Detect Current = 0.5 μ A

10 = Sensor Detect Current = 2 μ A

11 = Sensor Detect Current = 10μ A

The Sensor Detect Current Sources can be activated to verify  the integrity of an external sensor supplying a signal to the

ADS1255/6. A shorted sensor produces a very small signal while an open-circuit sensor produces a very large signal.

Bits 2-0 PGA2, PGA1, PGA0: Programmable Gain Amplifier Setting

000 = 1 (default)

001 = 2

010 = 4

011 = 8

100 = 16

101 = 32

110 = 64

111 = 64

*/

buf[2] = (0 << 5) | (0 << 3) | (_gain << 0);

//ADS1256_WriteReg(REG_ADCON, (0 << 5) | (0 << 2) | (GAIN_1 << 0)); /* 选择1;1增益, 输入正负5V ,关闭探测电流,关闭clock*/ 

buf[3] = s_tabDataRate[_drate];     /* 选择数据输出速率 */

CS_0();      /* SPI片选 = 0 */

ADS1256_Send8Bit(CMD_WREG | 0); /* 写寄存器的命令, 并发送寄存器地址 */

ADS1256_Send8Bit(0x03); /* 寄存器个数 – 1, 此处3表示写4个寄存器 */

ADS1256_Send8Bit(buf[0]); /* 设置状态寄存器 */

ADS1256_Send8Bit(buf[1]); /* 设置输入通道参数 */

ADS1256_Send8Bit(buf[2]); /* 设置ADCON控制寄存器,增益 */

ADS1256_Send8Bit(buf[3]); /* 设置输出数据速率 */

CS_1(); /* SPI片选 = 1 */

}

bsp_DelayUS(10);

ADS1256_WaitDRDY(); //

ADS1256_WriteCmd(0xF0);   //补偿和增益自校准 

bsp_DelayUS(10);

,

leo NI:

比如上面图中的AIN7, 下拉300K, 没有输入时,AIN7通道有大约0.7-0.9V的电压,  

,

leo NI:

//采集时,先切换通道

ADS1256_WriteReg(REG_MUX, (_ch << 4) | (1 << 3));   /* Bit3 = 1, AINN 固定接 AINCOM ,REG_MUX = 1, */  bsp_DelayUS(5); ADS1256_WriteCmd(CMD_SYNC);     /* CMD_SYNC    = 0xFC,  Synchronize the A/D Conversion 1111   1100 (FCh)  */ bsp_DelayUS(5); ADS1256_WriteCmd(CMD_WAKEUP);  /*CMD_WAKEUP  = 0x00, // Completes SYNC and Exits Standby Mode 0000  0000 (00h) */ bsp_DelayUS(5); ADS1256_WaitDRDY(); //读取采集结果 g_tADS1256.AdcNow[Ch] = ADS1256_ReadData(CMD_RDATA);    // CMD_RDATA   = 0x01, // Read Data 0000  0001 (01h)

,

Amy Luo:

您是使用的单端测量是吗?请注意单端输入时,AINCOM 不需要接地:

leo NI 说:一共配置了4个寄存器:

您可以直接写明配置的哪四个寄存器吗?分别配置的值是什么?是否通过读寄存器验证寄存器值已按期望值写入?

leo NI 说:比如上面图中的AIN7, 下拉300K, 没有输入时,AIN7通道有大约0.7-0.9V的电压,  

您是通过示波器测量的吗?建议用示波器测量看下是交流信号还是直流电压?

其他通道也有这个现象吗?

赞(0)
未经允许不得转载:TI中文支持网 » ADS1256: ADS1256的输入通道,关闭buffer后,输入电压不为零,是正常的么?
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1