Byte Comparison in PIC

Status
Not open for further replies.

blitzalpha

New Member
Could somebody please tell me how to compare two bytes in PIC and determine which is a larger value? Thanks in advance.
 
blitzalpha said:
Could somebody please tell me how to compare two bytes in PIC and determine which is a larger value? Thanks in advance.

You can use subtraction to do it, then check the flags, there's an entire section on the PICList about this at I suggest you have a look there.
 
I believe that some of the 18F series have a byte test function.
Don't rember is it is only =, or if it has <> to.
Look at a instructions section of the data sheet.

Kent
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…