Mr Goodwin,
I have just copied rs232 receive routine and its execllent. I know how to receive a byte using the serial interface.
Rcv_RS232 BTFSC PORTB, 7 ;wait for start bit
GOTO Rcv_RS232
CALL Start_Delay ;do half bit time delay
BTFSC PORTB, 7 ;check still in start bit
GOTO Rcv_RS232
MOVLW 0x08 ;set up to read 8 bits
MOVWF BITCNT
CLRF RCV_BYTE
Next_RcvBit CALL Bit_Delay
BTFSS PORTB, 7
BCF STATUS , C
BTFSC PORTB, 7
BSF STATUS , C
RRF RCV_BYTE , f
DECFSZ BITCNT , f ;test if all done
GOTO Next_RcvBit
CALL Bit_Delay
MOVF RCV_BYTE, W
RETURN
I have a string of bytes like 0x23, 0x54, 0xa5, 0x6a, 0x07, 0x15 stored somewhere in memory ( I don't know whether to put these values in tabular form), but I want to compare the received bytes with the above values sequentially and if exactly similar I branch to section of the code. I hope you can assist me in coming up with code to do the comparison.