yep its that simple, the LSB is always 1 when its odd and 0 when its even
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111
Code:
Its been awhile but its probably something like this
MOVF SOMEREGISTER,W
BTFSS W,0
GOTO EVEN
//add odd code here
GOTO END
EVEN:
//add even code here
END:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.