On Wed, 12 Oct 2005 markp@cannontech.com wrote: > My question is about bank selection using the STATUS RPO/RP1 bits vs. the > BANKSEL command. When I need to transition between banks, I simply change > the RP0/RP1 bits accordingly before and after the transition. However, I > see many examples of code in the archives that use the BANKSEL command. I > do not see this command in the spec sheet, well for the 16C773 & 16C715 I > use anyway. Is it applicable to all PICs or just certain ones? What are > the advantages of its use over the RP0/RP1 select method? banksel is a feature of the assembler IIRC so it doesn't appear in the spec sheet of the PIC. The advantage of banksel is you don't need to know which bank the register is in for the particular PIC you are assembling for, the assembler knows it and adds code as appropriate. The disadvantage is that it adds code everytime, even if you had the correct bank already selected (its hard for the assembler to know that you would have a particular bank selected at any point once you take into account gotos, intterupts et al so it always inserts the code). Of course some humans have that disadvantage and probably always set the appropriate RP bits :-) Andrew -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist