Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

Back
Top