wayu_ix
Newbie level 6
hi everybody after i pass first step
i test code for check input status
if input =1
delay 20 sec
and if input still =1
i want set out =1 and delay and stop out put again;
by code
main()
{
TRISA = 0x01;
while(1)
{
start:
while(PORTA.F0==1)
{
delay_ms(20000);
while(PORTA.F0==1)
{
PORTA.F1=1;
delay_ms(3000);
PORTA.F1=0;
while(PORTA.F0==1)
{
}
goto start;
}
}
{
}
}
}
i can sim by proteus it work .
but it can't work on real circuit. why this it?
what different between sim program and real pic.?
i hope you help me agian...thank you.
i test code for check input status
if input =1
delay 20 sec
and if input still =1
i want set out =1 and delay and stop out put again;
by code
main()
{
TRISA = 0x01;
while(1)
{
start:
while(PORTA.F0==1)
{
delay_ms(20000);
while(PORTA.F0==1)
{
PORTA.F1=1;
delay_ms(3000);
PORTA.F1=0;
while(PORTA.F0==1)
{
}
goto start;
}
}
{
}
}
}
i can sim by proteus it work .
but it can't work on real circuit. why this it?
what different between sim program and real pic.?
i hope you help me agian...thank you.