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.

Trouble with sigma delta output of msp430fg479

Other Parts Discussed in Thread: MSP430FG479

Hello Sir,

Iam trying to use Sigma Delta ADC of  MSP430fg479 -I set the SD16 in Biploar mode,gain is 32 and my input range is 0.02mV DC to 6mv DC (using load cell

of 40Kg with 3volt supply and 2mv/v sensitivity)but SD16Result ultimatelely SD16MEM0 results are not consistent some times I get very good results and sometimes random like getting 65550 integer count (SD!^MEM0)although it is set in Bipolar mode.

#include <msp430fg479.h>

long SD16Temp; // Temp sum register 
long SD16Result;

#define Num_of_Results 256

/* Arrays to store SD16_A conversion results */
unsigned int results[Num_of_Results];

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

P6SEL |= BIT0+BIT1; // Config SD16 inputs 
for (i = 0; i < 10000; i++); // Delay for 32 kHz crystal to
// stabilize

SD16CTL = SD16REFON+SD16SSEL0; // 1.2V ref, SMCLK
SD16INCTL0 |= SD16INTDLY_0+SD16GAIN_32; // Interrupt on 4th sample

SD16CCTL0 |= SD16IE+SD16DF+SD16OSR_1024; // Enable interrupt
for (i = 0; i < 0x3600; i++); // Delay for 1.2V ref startup


SD16CCTL0 |= SD16SC; // Set bit to start conversion
__bis_SR_register(LPM0_bits+GIE); // Enter LPM0

}

#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=SD16A_VECTOR
__interrupt void SD16ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(SD16A_VECTOR))) SD16ISR (void)
#else
#error Compiler not supported!
#endif
{
static unsigned int index = 0;

switch (SD16IV)
{
case 2: // SD16MEM Overflow
break;
case 4: // SD16MEM0 IFG
results[index] = SD16MEM0; // Save CH0 results (clears IFG)

if (++index == Num_of_Results)
{SD16Temp=0;
SD16Result=0;
for(int i=0;i<Num_of_Results;i++)
{ SD16Temp += results[i];}
SD16Result = SD16Temp >> 8;
index = 0; // SET BREAKPOINT HERE
}
break;

}
}

Thank You,

Looking forward to your reply as it very urgent 

Ujwala

  • Ujwala Petigara said:
    Looking forward to your reply as it very urgent 

     Usually these word give you just: remember we are not payd by you nor we are pay'd by none else so if you seek consultancy hire someone from here or professional association but you need pay for so .. goodbye...

     is your board built with compliance in mind? Are you using some cell phone near devices? try move all devices away and also try ground yourself to avoid ESD (use special security ESD device not home made dangerous DIY lethal trap)...

     On the other way you are managing signals from 20uV to 6mV if board/wiring error are in place due you are not skilled enough to handle very low voltages measurement your device measure all noise around than signal.

     Are you a professional or just a lazy student wish his homework done by us?

**Attention** This is a public forum