So I have 5 variables to store the data such as:
Code:
byte1
byte2
byte3
byte4
byte5
and 5 variables that hold the value to check
Code:
store1
store2
store3
store4
store5
The loop consists of:
Code:
Loop
call Recv_RS232
call Xmit_RS232
goto Loop
I have added the following:
Code:
Command1
addwf PCL, f
retlw 'h'
retlw 'e'
retlw 'l'
retlw 'l'
retlw 'o'
retlw 0x00
I have a variable called count like you and have used this:
Code:
clrf count ;set counter register to zero
Message movf count, w ;put counter value in W
call Command1 ;get a character from the text table
xorlw 0x00 ;is it a zero?
btfsc STATUS, Z
goto Correct
incf count, f
goto Message
Correct
bsf PORTD, 0
So if it compares correctly it will set RD0 to high.
But I'm a bit confused as to how to get more than one character from the UART before checking, and how to check multiple commands.