What is your code doing wrong or not doing?
Please add comments to every line so we know what you think the line of code should do.
i use port b = RB1 to RB3 for 3 set of IR sensor
port c = RC1 & RC2 for PWM
port a = RA to RA4
Put this info in the code as comments with info on what each port is used for.
I assume that RB1-3 are inputs so why are you testing all those ports?
if (RB2==0)if(RB3==1)if(RB4==1)if(RB5==1)if (RC3==1)if(RC4==1)
What are the other ports for? State what these inputs are and what combination is required for the action.
What are the config bits set for? See the HiTech manual (look at the file pic1687x.h in the HiTech install directory) and the Special Features section of the PIC data sheet.
You can also set these in the code or from MPLAB menu Configure\Configuration Bits.
Does the code compile?
?
It did not for me as there is an extra '}' and code line.
Did you run this code in the MPLAB simulator?
I do 98% of debugging in the simulator.