con = g_pADCReg->ADCCON; g_pADCReg->ADCCON = con & 0xFFFFFFFB; g_pADCReg->ADCCON |= 0x02; /* set start by read*/ tsc = g_pADCReg->ADCTSC; g_pADCReg->ADCTSC = 0x58; data = g_pADCReg->ADCDAT0; /*start AD convert*/
while(!(g_pADCReg->ADCCON & 0x8000)) RETAILMSG(1,(TEXT("AD Convertion in process\r\n")));
文章评论(0条评论)
登录后参与讨论