by sich » Mon Sep 20, 2010 2:13 pm
Yes, sample code from Cytron is fully tested. But for your case, since you're using MikroC and one of your microcontroller is PIC18F, you can't directly use the code provided by Cytron. Refer to the concept and algorithm is more appropriate. I guess you know that, right? Then for PIC16F & 18F, the compilers are different for both Microchip and Hitech. There're lotsa changes to be made. I'm not sure about MikroC. Did you successfully compile the code for both microcontroller?
The fastest way to test your components and modules is by using two PIC16F877A to do the transmit and receive tasks. You may use the sample code provided in this case with the same hardware connection and crystal value. 876A and 877A are identical in most of the specs. If this works, the problem lies only at the 18F microcontroller there, either programming or connection (assumed the chip is in good condition).