Is there any way of comparing 2 bite variable without converting them to strings first then comparing them ??
Brian
Moderator: Benj
So, you want to compare 011 or 012 etc. out of 0011/0012 in the slave boards to confirm this request for output 11/12 in board 2?I send a string from the main board 0011 which the first 3 bits 001 is the address of the first output of board now what must happen when i get to n 011, 012, 013, 014 .... 020 it must know that it is on board 2 (RB1 on) which is outputs 11 to 20.
Enamul wrote:Hi,So, you want to compare 011 or 012 etc. out of 0011 in the slave boards to confirm this request for output 11/12 in board 2?I send a string from the main board 0011 which the first 3 bits 001 is the address of the first output of board now what must happen when i get to n 011, 012, 013, 014 .... 020 it must know that it is on board 2 (RB1 on) which is outputs 11 to 20.
Is that what you are looking for?
Enamul
Code: Select all
result = (byte0 == byte1)Code: Select all
received_byte & 1 // Check for RB0Code: Select all
received_byte & 2 // Check for RB1