Testing byte?

Status
Not open for further replies.

Thorpydo

New Member
Is there a more elegant way to test a byte than using the BTFSC or BTFSS on all 8 bits for a 12F629?
 
Thorpydo said:
Is there a more elegant way to test a byte than using the BTFSC or BTFSS on all 8 bits for a 12F629?

Yes, using normal byte sized logic, you can do an XOR or a SUBLW, and check the STATUS bits. If you look onj the PICList theres a good size section about comparing values.

If you check my tutorials I do this in various ones, try checking the codelock in the keypad tutorial, where I check fior the correct keys.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…