你(们)好。
我想知道您能否帮助我了解如何在 ADS124X 上使用多路复用功能。
下面是一些说明我当前所做操作的伪代码:
//Setup the first channel: Write registers (0x40) Write four registers (0x03) Set +ve input to AIN0, -ve input to AIN1 (0x01) Disable VBIAS (0x00) Set gain & rate (0x05) Delay 1ms for MUX write RDATA (0x12) loop while DRDY==HIGH Store byte 1 (0xFF) Store byte 2 (0xFF) Store byte 3 (0xFF) //Setup the second channel: Write registers (0x40) Write four registers (0x03) Set +ve input to AIN4, -ve input to AIN5 (0x25) Disable VBIAS (0x00) Set gain & rate (0x05) Delay 1ms for MUX write RDATA (0x12) loop while DRDY==HIGH Store byte 1 (0xFF) Store byte 2 (0xFF) Store byte 3 (0xFF)
我对此有2个问题。 首先、是否需要为每个通道发送 RDATA? 当 START 被拉至高电平时、ADC 会在当前选定的通道上还是在所有通道上同时执行转换?
其次、从数据表第10.1.8节中可以看出、我可以通过在读取数据时发送更改通道所需的命令来加快和简化这一过程、即
Store byte 1 (0x40) Store byte 2 (0x00) Store byte 3 (0x25)
但是、当我尝试这个时、我得到一个零值。 我是否误解了?
非常感谢、
Foz Hughes