> this is what i did > > BankSel PORTA > clrf PORTA > movlw D'07' > movwf CMCON > > It the CMCON register that by default is set for comparator input. Check out my template PORT module, QQQ_PORT.ASPIC at http://www.embedinc.com/pic. This will automatically disable comparators and A/Ds if present. These are intended to be enabled later, if used, by the INIT routines of the specific modules that handle them. This PORT module makes it easier to move code between PICs. > I recently made the big move to 16F628 and this was one of the snags I had > problems with. > > The other I still am trying to come to terms with is to take advantage of > the extra ram (which is still not enough) I have to be very wary of bank > switching. It seems to create a large software overhead and a great cause > of possible bugs. Check out the rest of my PIC software development environment on the same web page. The STD.INS.ASPIC file defines a bunch of macros (DBANKIF and related) that are useful for managing multiple register banks. These mechanisms also make good use of the 16 common registers that are mapped to the end of each bank. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body