In addition to Louie's correction you need to set the oscillator register and Port register. Add the following Lines of code:
CMCOM = 7 ' comparator off
OSCCON = %01100010 ' oscillator @ 4 MHz
TrisB =%00000010 'for Tx device ' pin B.1 is an input all other outputs
TrisB =%00000001 'for Rx device ' pin B.0 is an input all other outputs
Cheers
Al.
Bookmarks