嗯,
void main(void)
{
M8C_EnableGInt;
SAR8_SelectADCChannel(SAR8_P0_0);
SAR8_SetRunMode(SAR8_FreeRun);
SAR8_Start();
while(1)
{
while (0 == SAR8_fIsDataAvailable()); // wait for result
bResult = SAR8_bGetData();
delay(bResult);
LED_1_Invert();
}
// Insert your main routine code here.
}
这里我是不是在 SAR8_SelectADCChannel(SAR8_P0_0);
进行修改就好了, |