> Hello guys: > I am now dealing a project that need two pics to communicate by using hand > shaking . Can somebody warmhearted give me some program or tips to do this. > I use porta bit 1 and 2 as hand shaking line. > thank you It sounds to me like you do not have to use 2 lines for handshaking. This may be a bit depending on how your communication works between the PICs. A nice way of doing it is to use only one line, and use it as active low in the same manner as I2C. i.e when the master is ready to send, it releases this line. If the slave is ready to receive, it will also release this line. When the master detects this line as high, it can begin transmission. When the master releases this line and the slave is not ready to receive, the slave will hold this line low until it is ready. If you haven't used I2C before : This kind of handshakind is made by connecting these lines directly to each other, and connecting a pull-up resistor to Vdd. The line is released by a controller by setting the appropriate pin as input, and the line is held low by setting the appropriate pin as output with the value zero. -Dag S