Wow, must have overlooked the BANKSEL macro (or forgot after seeing it), that is much better, thanks. Olin Lathrop wrote: >>; Set TRISA for analog input. >> bsf STATUS, RP0 ; switch to bank1 > > > Or bank 3. You really need to get away from this archaic means of bank > switching. I'm not going to go thu all the code below and check that > you've selected the right bank for each register. You should let the > assembler figure this out. See the BANKSEL directive, or my DBANKIF and > related macros in STD.INS.ASPIC at http://www.embedinc.com/pic for a more > elegant approach. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics