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

关于MSP430F427A的SD16的AD转换问题

MSP430F427A在实验中发现应用TI官网的例程(如下),采集同一组电池电压用此例程采集到一个电压AD值A,把例程中低功耗屏蔽则又财经到一个电压AD值B。B的值比A大100个AD左右。当设置为以下设置时(SD16INCTL2 |= SD16INTDLY_0+SD16GAIN_32)B比A大400左右。请问此问题原因?

 

#include <msp430.h>

unsigned int result;

int main(void) {  

 volatile unsigned int i;                  // Use volatile to prevent removal                                            

                                                     // by compiler optimization

  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT   FLL_CTL0 |= XCAP14PF;                    

                                                                          // Configure load caps  

 for (i = 0; i < 10000; i++);                                 // Delay for 32 kHz crystal to                                           

                                                                         // stabilize

  SD16CTL = SD16REFON+SD16SSEL0;            // 1.2V ref, SMCLK  

  SD16CCTL2 |= SD16SNGL+SD16IE ;             // Single conv, enable interrupt  

  SD16INCTL2 |= SD16INTDLY0;              

                                                                              // Interrupt on 3rd sample  

 for (i = 0; i < 0x3600; i++);                                  // Delay for 1.2V ref startup

  _EINT();                                                           // Enable general interrupts

  while (1)

  {    

    SD16CCTL2 |= SD16SC;                    // SET BREAKPOINT HERE                                            

                                                                // Set bit to start conversion    

    _BIS_SR(LPM0_bits);                         // Enter LPM0  

  }

 }

#pragma vector=SD16_VECTOR __interrupt void SD16ISR(void)

 {  

switch (SD16IV)

  {   case 2:                                   // SD16MEM Overflow    

 break;  

 case 4:                                   // SD16MEM0 IFG    

 break;  

case 6:                                   // SD16MEM1 IFG    

 break;  

case 8:                                   // SD16MEM2 IFG    

 result = SD16MEM2;                      // Save CH2 results (clears IFG)    

 break;  

}

  _BIC_SR_IRQ(LPM0_bits);                   // Exit LPM0

}

wszqq:

难道大家都没有遇到过?

wszqq:

难道大家都没有遇到过?

Hardy Hu:

你好:

问题就出在使用内部PGA,当放大倍数是32时,则需要注意:

1.输入范围是否超标,datasheet给spec的范围此时是±15mv;

2.32时SINAD此时是69db,为1时时85db,此时低了16db;

希望能够帮到你!

wszqq:

回复 Hardy Hu:

谢谢

赞(0)
未经允许不得转载:TI中文支持网 » 关于MSP430F427A的SD16的AD转换问题
分享到: 更多 (0)