http://www.picbasic.co.uk/forum/show...57&postcount=6

Also, you have a free USART in your PIC, you should use it. HSEROUT, HSERIN instead. But you have to use the dedicated pins PORTB.2 and PORTB.5