43oh

# ahgan84

Members

68

• #### Last visited

• Rank
Level 1

From my method, each DMA_DST[0] to DMA_DST[255] is equals to a channel. But from your method, DMA_DST[0] is for channel 0, DMA_DST[1] is for channel 1, DMA_DST[2] is for channel 2, DMA_DST[3] is for channel 3, ....., DMA_DST[15] is for channel 15. Then DMA_DST[16] is for channel 0 again, DMA_DST[17] is for channel 1 again... and then repeat again. Am I right? Then is it that my ADC12MCTL0 = ADC12SREF_1+ADC12INCH_15? right_cal = 0; for (r=ADCRIGHT; r < MAXADC; r+=6) { right_cal += ADCdata[r]; } right_cal /= SAMPLES; For your above for loop, what is ADCRIGHT? Is i

for(i=0;i<256;i++) { RAWvalue += DMA_DST[i]; // Summing up 256 raw values } I found out that it is the above for loop which run 256 times to sum up the raw value for each channel that increase my time. Is there any other way that I can write to reduce the time?

Yup. I had downloaded it. I think that you just have change to ADC10MCTL0 = ADC10INCH_15 and then DMA0SZ = 0x0F to scan all 15 channels right? But now I want to collect 256 conversion from each channel and I want to do all channels and it's roughly in total 256x14=3586 (14 channels for my F5325) conversion each time. Below is my code in main(): void main(void) { unsigned int i; WDTCTL = WDTPW+WDTHOLD; // Hold WDT REFCTL0 &= ~REFMSTR; P1OUT &= ~BIT0; // P1.0 clear P1DIR |= BIT0; // P1.0 output P5SEL |= BI

I'm planning to ON all channels from channel 0 to 15 for my ADC12 for a user to use. Just that I thought of maybe a user won't know the sequence which one is channel 0 or which one is channel 15. Then if he put his device on channel 15, then he'll have to wait a long time only can get a result. I mean like, can't I get the ADC conversion from channel 0 to channel 15 all at the same time? Is there a configuration for this? Because of you add an extra step which is the DMA transfer in the code, I felt like the conversion time with using DMA is slower compare to without using DMA. Am I right

So it is mean that using the coding you showed, doesn't matter I use multiple channels like for example from channel 0 to 2 or channel 0 to 15, the conversion will always store in ADC10MEM0? I notice the coding will still use the ADC10CTL1 = ADC10CONSEQ_2 for repeat single channel instead of ADC10CTL1 = ADC10CONSEQ_3 for repeat sequence of channel? Why? I thought we are using multiple channels? So, the ADC conversion is in sequence from channel 0, 1, 2, 3, .... to finally channel 15. Then if my device input is at the last channel, which is channel 15, doesn't we have to wait a long tim

I've found the below circuit which can measure resistance using ADC12. But what I don't understand is what is the 1M resistor in the middle for? We must put it or can we omit it?

My voltage is a stable one. I measured already, I don't experience voltage drop. Yup. You are right. I've change the upper resistor to 30k Ohm and it give me a correct voltage value. But do you know why we should use a larger value for the upper resistor?

I see. I've also saw the word software control from the internet. What exactly it is? Could you explain to me how do we use software control to trigger the DMA? Is the time we set for CCR registers (long or short) effecting the ADC accuracy? I've read the MSP430x5xxx family datasheet on ADC12 and DMA already. But I still have a lot don't understand. That's why I posted my questions here hoping somebody to explain to me.

Anybody willing to help me with the above question?

Do you guys know why i face the above problem?