Hi , I want to make simple project , the project is two fire(smoke) detectors in two rooms where every smoke detector has a pic16f88 and the arduino is the controller , I wrote the code , the principle of code is the arduino send serial msgs where every pic has special msg(special number).Note :- (this step is even don't happen synchronization)when pic receives its special msg and the pin 3(input) is high (when the fire occur) ,send serial msg(number of room) to arduino then arduino specify the room by print in termial monitor.I simulate the code of pic in proteus and code of arduino in terminal monitor and work well.

First, I suggest that you do something about the format of your code. Put every { on a new line. Then use Tools + Auto Format.

With that format, it is hard to see what the code is supposed to be doing.

Second, give meaningful names to functions. You'll notice that the function to read a digital pin is called digitalRead(), not R93krg(). So, what the hell does r() do? There is NOTHING in the name that gives a clue.

Third, it is plain stupid to be doing SoftwareSerial on the hardware serial pins. Stop that.