Assuming that you don't want to write an interrupt-driven routine -
You can send data using HSEROUT and receive it with HSERIN.
As far as the receive is concerned, probably the easiest way is to watch PIR1.5 If that bit is set, it means that a character was received. You can then use HSERIN to retrieve the byte.
If you have lots of bytes to transfer between PICs, a good way is to use a line between the two as a "Clear To Send" line. You can easily do two-way communication that way. There are as many schemes as the number of users on this forum.
Bookmarks