Search found 167 matches

by braus
25 Jul 2007 23:12
Forum: mikroC General
Topic: IO problem.
Replies: 10
Views: 3901

excuse me, I realized that something is missing to my code, here is the correct code

void main(void){

TRISB.F0=0;

do{
if(PORTA.F0){
PORTB.FX=1;
Delay_ms(300);
PORTB.Fx=0;
}
else continue;
}while(1);

}


regards, braus.
by braus
25 Jul 2007 23:02
Forum: mikroC General
Topic: IO problem.
Replies: 10
Views: 3901

Re: IO problem.

Hi there, look al55, what you are trying to do is very simple and you have not to use a separated function, here is an example void main(void){ TRISB.F0=0; do{ if(PORTA.F0) PORTB.FX=1; Delay_ms(300); }while(1); } this code should work, regards. braus.

Go to advanced search