Amanda Lima264
Newbie

Hello, I'm trying to make a control code and I can't, the count works as expected without delay_ms (3000); but when I put it on, the count is much higher, would there be another way to pause without using this delay? I want a pause to turn on and a pause to turn off, without this disturbing the time count, I'm using the ccs c compiler. Thank you in advance.
Code:
while(TRUE)
{
if (conta >= 3600 )
{
conta = 0;
minuto++;
}
delay_ms (3000);
if(input(!PIN_A3))
{
output_low(pin_a0);
output_low(pin_a1);
conta = 0;
minuto=0;
}
delay_ms (3000);
if(( minuto <= 10 ) && (input(PIN_A3)))
{
output_high(pin_a0);
output_high(pin_a1);
}
if( minuto > 10)
{
output_low(pin_ao);
output_low(pin_a1);
conta = 0;
minuto=0;
}
}
}