I've got the following code to start the ADC. If I put in a
breakpoint somewhere after the code and run to the breakpoint it will
enter an endless loop. If I step manually past the while statement
and than run to the breakpoint it will work fine. If I put in a delay
before the while statement it also works but this seriously slows down
the ADC. I guess this has something to do with initialization but I'm
not sure. Does anyone have any ideas?
Thanks,
Dewayne
ADCR = (ADCR & 0xFFFFFF00) | (1 << 1) | (1 << 24);
//wait til done
while((ADDR & 0x80000000) == 0)
;
//get result
return (ADDR>>6) & 0x3FF;Message
ADC Problem
2006-05-11 by heedaf
Attachments
- No local attachments were found for this message.