hello, i have been trying to get the ADC to read..
i am using some ADC code from a 355 demo... and
i find that it is looping in the while loop below:
void MT_ADStartConv(void)
{
while (a_dcomp == NOTHING); // Wait for 1st
conversion to clear
a_dcomp = CONVERT ; // Tell the next
routine that conversion is ongoing
ADCSR |= BIT(ADSC) ; // start A/D
conversion
}
the interrupt that changes the value of a_dcomp isn't
being called.
is that because the start A/D conversion bit isn't set
until line #3??
anyone know what this "1st conversion to clear" refers
to?
also, does anyone know what the value of AG_A2D_ADCSR
is in the following?
void AG_Setup_ADC(void)
{
ADCSR = BIT(ADSC) | AG_A2D_ADCSR;
ADMUX = CLEAR ; // connects to
first pin by clearing A/D's MUX
a_dcomp = NOTHING ; // clears out
interrupt first
}
thanks,
ken
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list