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.

ADS1118在MSP430中能实现四通道连续转换么?

Other Parts Discussed in Thread: ADS1118, MSP430G2553

在用ADS1118写寄存器和读数值的时候,我是用的连续装换模式

void ADS_Read(int data[])
{
 unsigned int j, temp;
 temp = 0x44EA;

 P2OUT &= ~BIT0;

 WriteSPI(temp,1);
 delay();
 WriteSPI(temp,1);
 delay();
 data[0] = WriteSPI(temp,0);
 delay();
 data[0] = WriteSPI(temp,0);

 //data[0] = WriteSPI(temp,1);
 // Set CS high to end transaction
 //P2OUT |= BIT0;

 delay();  // May be needed depending on method

  temp = 0x54EA;

 delay();  // May be needed depending on method
 WriteSPI(temp,1);
  delay();
  WriteSPI(temp,1);
  delay();
  data[1] = WriteSPI(temp,0);
  delay();
  data[1] = WriteSPI(temp,0);
}

我希望能够读取两个通道连续装换的值,但是好像data【0】能够得到AIN0的数据,可是data【1】得到的数据在AIN0和AIN1两个,

1.看手册好像是不是要判断DOUT读取数据?但是我用的硬件SPI引脚是复用功能怎么读取呀?