Got any pictures of the setup? Do you have any test equipment to verify if the PIC is actually sending anything? You might use "real" chars to send and receive such as '2', which is not the same as 2. Binary data will only add to the confusion should you decide to try and print the input to the Arduino.
Which Arduino do you have? The mega doesn't do pin change interrupts on all the pins like an Uno, so that could be it. Maybe a dumb question, but have you verified that the LED is working and is connected properly?
This will send bytes one after another with no delay, unless you jag it and start reading on a byte boundary the poor Arduino will never get in sync with the PIC.
If you'd just make your numbers have single quotes like '2', then you'd be able to examine the data with the serial monitor. As you have it, you are sending a binary 2, not the ASCII character 2. Or at least add the Serial.print to dump the received data in hex like this:
void loop() {
char c= mySerial.read();
// if a character comes in, print it in hex
if(c != 255) {
Serial.print(c, HEX);
}
if (c ==2) {
digitalWrite(13,HIGH);
}
}
i connect arduino without any connection , just plug in to computer , serial monitor print
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
Because you are printing the return value of mySerialRead() without checking to see if there's anything to read.
As you have nothing connected there are no characters so the read() func returns -1 (IIRC) which is 0xFF, hence that's what you are seeing on the monitor.