David Duffy (AVD) wrote: > BANKSEL PORTB > CLRF PORTB > BANKSEL LATB > CLRF LATB > BANKSEL ANSELB > CLRF ANSELB > BANKSEL TRISB > CLRF TRISB I thought PORTB, LATB, TRISB, and ANSELB are always in the access bank. Perhaps BANKSEL detects this and emits no code in that case. However, if i= n doubt using BANKSEL is a good idea unless you need the cycles or space. > Why bother clearing TRISB when you would be only writing to LATB > anyway? Huh? You need to clear TRIS *because* you want to write to the pin. Writing to LATB is one method of setting the pin's value from the firmware. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .