I know this is probably a stupid question but I can't for the life of me figure it out.
I'm running on an 8051 core, Ti CC2430.
I'm trying to wait until bit ADCCON1.ST (bit 7) has been cleared so I can collect my results. What would be the proper logic to check this bit.
/*Start a conversion by setting ADCCON1.ST=1*/
ADCCON1 |= 0x40;
/* Wait for the conversion to be done indicated by ADCCON1.ST=0 */
while ((ADCCON1 & 0x40));
/*Disable ADC channels since the EM uses them for other things*/
ADCCFG &= ~0xFF;
return(location);
Thanks,
Ian
I'm running on an 8051 core, Ti CC2430.
I'm trying to wait until bit ADCCON1.ST (bit 7) has been cleared so I can collect my results. What would be the proper logic to check this bit.
/*Start a conversion by setting ADCCON1.ST=1*/
ADCCON1 |= 0x40;
/* Wait for the conversion to be done indicated by ADCCON1.ST=0 */
while ((ADCCON1 & 0x40));
/*Disable ADC channels since the EM uses them for other things*/
ADCCFG &= ~0xFF;
return(location);
Thanks,
Ian