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.

CCS/MSP430FR6972: msp430fr6972

Part Number: MSP430FR6972

Tool/software: Code Composer Studio

Hi,

I am using MSP430FR6972.

I have made the ADC Program(ADC_12).

I want to calculate the dB.

Can any one tell me,

How to calculate the dB value.

For reference  ADC Program :

  ADC INITIALIZE==============================     

void adc(void)
{
P9SEL1 |= BIT7;
P9SEL0 |= BIT7;

// Configure ADC12
// Configure ADC12
ADC12CTL0 = ADC12ON | ADC12SHT0_2; // Turn on ADC12, set sampling time..16 clock cycle
ADC12CTL1 = ADC12SHP | ADC12SSEL1; // Use sampling timer,ACL SELECT
ADC12MCTL0 = ADC12VRSEL_0 | ADC12INCH_15; // Vr+ = VeREF+ (ext) and Vr-=AVss
ADC12CTL0 |= ADC12ENC;

}

Display the ADC value on LCD================================

void adctest(void)
{
ADC12CTL0 |= ADC12SC; // Start conversion-software trigger
while (!(ADC12IFGR0 & BIT0));
ADCvar = ADC12MEM0; // Read conversion result
LCD[2] = lcd_num[(ADCvar /1000)];
LCD[3] = lcd_num[((ADCvar%1000)/100)];
LCD[4] = lcd_num[((ADCvar %100)/10)];
LCD[5] = lcd_num[(ADCvar %10)];

}

Checking it in main Function.

My ADC have no problem.

I want to check the dB value.

How to do that?

regards,

Srijit.

**Attention** This is a public forum