I'm trying to transfer a working program from a 16f887 to a 18f85j11.
I'm working with PBP 2.60.

The program works well on the 16f887, but i'm having a problem with the serial communication on the 18f85j11.

The program seems to hang, or get really slow when I insert the HSerin command into the program. Even when the program NEVER jumps to the RS232 Label the program is really slow. When I comment out the Hserin (and still don't jump to the rs232 label) , the program works nicely.

What can the problem be?

Thanks in advance.



Code:
RS232:
                DIRECTION = 0        ' send or receive bit	
	HSerin 1,GO,[WAIT("$"),BUFF]
	IF BUFF = ADRESS Then
		OK = 1
		For I = 1 TO AANTAL
		  HSerin [DATI]
		  BUFFER(I) = DATI 
		Next
	EndIF