Although PIC16F series are excellent general purpose microcontrollers, certain limitations have emerged, such as, they have limited program and data memory, their stack size is small, and all the interrupt sources have to share a single interrupt vector. Their limited instruction set also doesn’t provide direct support for more advanced peripherals interfaces like USB and CAN. The basis of the PIC18F Series is to address the issues that limit the PIC16F series.
---------- Post added at 19:44 ---------- Previous post was at 19:38 ----------
You may find the group to be more useful if you show some initiative first... try checking the datasheets!!! Just to show we're not all bad, if you're using a 18f2585/2680/4585/4680 and have the datasheet you may wish to consult pages 286 for tx'ing and 293 for rx'ing.
Else you might want to get the Applications Maestro from the microchip website and run that. That will generate code for you but unless you know what you're doing (which i am guessing is not the case since you're asking for the code in the first place) it would make more sense to write your own after consulting the datasheets.