Jamie Jensen wrote : > To set for the correct SFR page, by habit ive always used > bsf/bcf on status, rp0 and rp1 Probably the most error prone method, IMHO. > But i came across some example code using banksel, but it > still had some intermixed useage of setting the bits in the status register. Well, there are *other* bits in the STATUS reg then the RPx bits... > Seems that banksel is the much preferred method to do this? > Any reason not to use it? Could be that it *always* inserts bcf/bsf instruction even when not strickly needed (your are already n the correct bank). I see 4 basic methods, in order from worst to best : 1. hardcoded bcf/bsf instructions. Error prone. 2. Macros (setbank0. setbank1, and so on) that does the same as (1.), but less error prone. 3. BANKSEL. Does the same as 1 and 2, but you don't have to keep track of *where* each FSR is. BANKSEL selects the correct bank for you, but still inserts bcf/bsf even then not needed. 4. Macros that inserts bcf/bsf *only when needed*. Gives the most compact/fast code. Like Olin's DBANKIF macros. Then there are variations of these, of course. Regards Jan-Erik. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.