# ahgan84

Members

68

## Everything posted by ahgan84

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?

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, or I'm just imagining? If I am right, is there any way to reduce the conversion time?

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 time only get the conversion result? Cause it need to convert all other channels first before getting to channel 15. Then, it will be like my ADC response time is very slow. Is there any solutions to this?

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?

I know but with 2.08V, the resistance I should get after my calculation is 4.95k ohm. But when i measure the thermistor using my multimeter, I still get 10k resistance. Besides, 4.95k ohm of temperature is around 40 degree C. That's impossible... I'm in a 25 degree C room.

I have set up a NTC thermistor to interface with my ADC12 for measurement. I'm using a voltage divider settings. But I have encounter some problem. I've uploaded a picture for my settings. Sorry I just want to be quick so instead of using schematic software, I just use hand drawing. The top one is a voltage divider using a resistance box. As you can see, the voltage values that I measure using multimeter for 1k resistor and the 10k resistance box is the same with when I use calculation using voltage divider formula. So, the values are correct. But as for the bottom settings which I use a Thermistor the values started to get weird. The resistance for the Thermistor is also 10k like the resistance box but the voltage I get is 2.08V instead of 2.28V. I get 0.42V for the 1k resistor instead of 0.22V. Why is it this happening? Is there a problem with my thermistor?

4. May I know how does the coding flows? Is it from main() straightaway stay in the ADC12ISR in a forever loop? Or it occasionally got return to main() for a short while then back to ADC12ISR again?

Hi guys, I'm using the MSP430F5325 and I'm just wondering how do you make the ADC reference voltage of 2.5V to be available at external pin? From the datasheet the pin is +Vref at A8. I've been studying the datasheet awhile and I've set the below configuration: REFCTL0 &= ~REFMSTR; ADC12CTL2 = ADC12REFOUT; Is this two setting enough to make the reference voltage available on external pin?