sahu
Member
I'm facing problem time delay during dual ADC i\p at same time.
Actually I want if (ch_0>800) mcu wait 6 min,
if (ch_0<800) during 6 min. it will go predefine return abc case.
im using CCS C .
Code:
int ProcessMains(void)
{
ch_0 = getchreading(0);
Process_ch_0(); // Do something with ch_0 o\p lod sence
if (ch_0>800) // lod 130 % Wait 6 min
Delay60000ms
return(OVER_LOD_SENCE);
ch_1 = getchreading(1);
Process_ch_1(); // Do something with ch_1 o\p volt
if (ch_1>1000)
return(HIGH_VOLTAGE);
if (ch_1<950)
return(NORMAL_VOLTAGE);
}
if (ch_0>800) yet 6 min, then return(OVER_LOD_SENCE)when ADC reach >800 delay start hear
if (ch_0<800) during 6 min. it will go predefine return abc case.
im using CCS C .