Remember that a 1 in a TRIS setting will make the pin an INPUT (remember 1=I=Input), and a zero will make it an Output (remember 0=O=Output).
So, TRISE=$FF is the same as TRISE=%11111111 (all input)
and TRISE=$00 is the same as TRISE=%00000000 (all output)
so to make bits 0 thru 3 INPUT and bits 4 thru 7 OUTPUT you can write...
TRISE=$0F or TRISE=%00001111
and to make all even bits INPUT and all odd bits OUTPUT...
TRISE=$55 or TRISE=%01010101
and to make pin E.2 and E.7 INPUT, and all the rest OUTPUT...
TRISE=$84 or TRISE=%10000100
etc etc.
Bookmarks