Welcome to the forum.
I will suggest to get started use SERIN/SEROUT. These are bit banging routines that can be used on most any pin. When you ar comfortable with that look at SERIN2/SEROUT2, another bit of bit banging. Then try the hardware serial ports.
So...
Near the beginning of your code for both PICs add this line:
Code:
include "modedefs.bas"
Then for the sending PIC do something like this:
Code:
SEROUT PORTC.4,T2400,[9,3]
On the receiving PIC:
Code:
SERIN PORTC.4,T2400,[9],net
IF net = 3 THEN LED_ON 'GOTOs label to turn a LED on
The receiving PIC will wait for "9" and put the next character in the variable net.
Bookmarks