I am a relative newcomer in terms of PICC. Right now I can't find a good way to test a bit in a variable such that it is assured to compile down to using the bit test instructions. I tried using code similar to those in the header files to reference the individual I/O ports. No other documentation I can find really addresses the issue, except for the lines that address setting and clearing, but no testing. All I could find that is close is this but it does not seem to return the bit's value. Is it returning an address? Do I need to dereference it in use? #define PORTBIT(adr, bit) ((unsigned)(&adr)*8+(bit)) Any help is appreciated. Jeff -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu