Ritesh!! The port operations on RD 0...3 are not working correctly... I think there is a read-modify-write issue as this part
Switches on RD0 but then switches it off again when RD1 = 0; is called...
Also if I send ascii 101 to the system it reads it fine then it will sit waiting for one of the control codes..
You WILL need to make a better serial communication... The other thing is once you send a control code... Afer 2 mS you then turn it off again..
C:
if(ch=='a'){
RD0=1;
RD1=0;
__delay_ms(2);
}
Switches on RD0 but then switches it off again when RD1 = 0; is called...
Also if I send ascii 101 to the system it reads it fine then it will sit waiting for one of the control codes..
You WILL need to make a better serial communication... The other thing is once you send a control code... Afer 2 mS you then turn it off again..