Since you can transmit, your baudrate setting has to be right. i think it's more a library mistake...
Code:
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00000C 6E01 02333 movwf R0
00000E 500E 02334 movf R6 + 1, W
000010 6E02 02335 movwf R0 + 1
000012 6A03 02336 clrf R1 ; Start off inner loop counter at zero
000014 6A04 02337 clrf R1 + 1
02338 hserin2toloop CLRWDT?NOP ; 1 (8, 16) Keep Watchdog timer clear
M ifndef NO_CLRWDT
000016 0004 M clrwdt
M else
M nop
M endif
000018 BA9E 02339 btfsc PIR, RCIF ; 2 Check for char
00001A D00C 02340 bra HSERIN2X ; We're started
00001C 6AE8 02341 clrf WREG ; 1 For subtracts
00001E 0603 02342 decf R1, F ; 1
000020 5A04 02343 subwfb R1 + 1, F ; 1
000022 E2F9 02344 bc hserin2toloop ; 2 / 1 End of inner loop
000024 0601 02345 decf R0, F ; 1
000026 5A02 02346 subwfb R0 + 1, F ; 1
000028 E307 02347 bnc hserin2done ; 1 Timed out (C clear)
00002A 0E0C 02348 movlw low (HSERIN2TO_DELAY) ; 1 Reset inside loop counter
00002C 6E03 02349 movwf R1 ; 1
00002E 0E03 02350 movlw low ((HSERIN2TO_DELAY) >> 8) ; 1
000030 6E04 02351 movwf R1 + 1 ; 1
000032 D7F1 02352 bra hserin2toloop ; 2 End of outer loop
To me that line in red should be
How to change it... open PBPPIC18.lib file, go to line 2339
Code:
hserin2toloop CLRWDT?NOP ; 1 (8, 16) Keep Watchdog timer clear
btfsc PIR, RCIF ; 2 Check for char
bra HSERIN2X ; We're started
clrf WREG ; 1 For subtracts
and change this line to
Save the file and try again.. finger crossed... 
The problem (if it's the problem) also seems to be in PBPPI18L.lib @ line 2620
The way it was before, it checked for a character... but on USART1
Bookmarks