lpcware

Query about ADC module LPC1317

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by aamir ali on Wed Jul 17 04:12:26 MST 2013
I have to scan AD1 channel continuously after 1 sec each. After starting conversion will hardware automatically clear the start bit or user have to explicitly clear it.

Like:


while(1)
{
   LPC_ADC->CR |= (1UL<<24);  /* strt conversion */

   while(! ( LPC_ADC->STAT & 0x02 ) );   /* while converting */

   LPC_ADC->CR &= ~(1UL<<24);   /* Will hardware clear this bit automatically or to be done by        user */

  wait(1);              /* wait 1 sec */
}

Outcomes