#include <system.h>
void main()
{
trisa = 00b;
trisb = 111b;
porta = 00b;
while(1){
switch(portb)
{
case 100b: porta = 10b;break;
case 110b: porta = 10b;break;
case 010b: porta = 11b;break;
case 011b: porta = 01b;break;
case 001b: porta = 01b;break;
case 000b: porta = 00b;break;
case 111b: porta = 00b;break;
}
}
}
this program will work for a line follower robot? or i should use intrerupts? i didn't build my programmer yet and i can't test it...