checking your stuff........ if you use interrupts (DT ints), for RX interrupts, you would not use PB hserin in the int routine. Rather get the characters in your routine and store them in the locations you designated and advance counter and check for some beginning or ending character....... with this I receive up to 1000 characters and store them in ram on 18f with 4k ram..... you would fix for your code. If successful receive, raised a flag telling basic to process the data for whatever your looking for
Code:'''-------------RCV INT ROUTINE----------------'''' RCint: RCX=RCREG '@ bcf RCSTA,4 '@ bsf RCSTA,4 '''@ CLRF CREN ;RESET RCV overrun '''@ SETF CREN IF RCX=8 THEN '''CHECK FOR BACK SPACE BS 8dec SELECT CASE RCVindx CASE 0 GOTO LEAVEOK1 CASE 1 RCVindx=RCVindx-1 :RCVOK=0 RCVdata[RCVindx]=0 GOTO LEAVEOK1 CASE IS >1 RCVindx=RCVindx-1 RCVdata[RCVindx]=0 GOTO LEAVEOK1 END SELECT ENDIF if RCX = "[" then RCVindx=0:RCVok=1:DATAready=0 goto leaveok endif if RCVok=0 then LEAVEOK1 if RCX = "]" then rcvok=0:dataready=1 endif leaveok: 'LEAVE AND STORE RCVD CHAR RCVdata[RCVindx]=RCX RCVindx=RCVindx+1 RCVdata[RCVindx]=0 'TACK A 0 AT END OF ARRAY IF RCVindx > 999 THEN RCVindx=999 ENDIF LEAVEOK1: 'LEAVE WITHOUT STORING RCVD CHAR RCFLAG=1




Bookmarks