> From: "Fend, Matthias" <mf...@harris.com> hello, > > i'm a little bit confused in ADC10 issues... > > ind the example mspgcc/examples/slac013/fet120_adc10_05.c i found following > code snippet > > ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start while > ((ADC10CTL1 & ADC10BUSY) == 0); // ADC10BUSY? > > the conversion is started first and then we wait until ADC10BUSY becomes true > ? > > in the user guide i found this: > > ADC10BUSY This bit indicates an active sample or conversion operation: 0 No > operation is active. 1 A sequence, sample, or conversion is active. > > so imho first the conversion has to be started and then wait until ADC10BUSY > reset... -> while (ADC10CTL1 & ADC10BUSY); // ADC10BUSY? > > is my conclusion wrong ? > > thx matthias
You understand perfectly. I just started writing code for the adc10 module this week and I am using the while(ADC10CTL1 & ADC10BUSY) loop. It works fine. -- David W. Schultz http://home.earthlink.net/~david.schultz