When posting code here, try to minimize the line length. It minimizes the lines getting wrapped to oblivion. 16 spaces before the opcode is rediculous. So is the operand field starting on a randomly chosen 8 column boundary. Neatness counts, try it. > PROCESSOR p16f628 > INCLUDE p16f628.inc > __CONFIG _CP_OFF &_WDT_OFF &_BODEN_OFF &_PWRTE_ON > &_INTRC_OSC_NOCLKOUT ERRORLEVEL -302 ; > Don't care about the "bank bits" messages > > ;****Set up the port**** I'm surprised this assembled without a CODE directive (or even ORG, ugh). How do you know this code gets loaded at the reset vector? > bsf STATUS,5 ;Switch to Bank Groan! Not again. The majority of beginner problems are related to bank switching. First, this instruction only sets one of the two bank bits. Second, don't use hard coded constants for SFR bits. They all have names defined in the standard include file. The bank bits, for example, are called RP0 and RP1. Another problem with this is that you are manually deciding what the right bank is. I'm getting tired of explaining why that's a dumb idea. See archives. > movlw b'00000010' ;Port A1 input the rest > outputs movwf TRISA ;to output. > > movlw 07h ;set Port A1 > movwf CMCON ;to digital mode And the bank setting for CMCON is? OK, very briefly, here is how I do this: dbankif trisa movlw movwf trisa dbankif cmcon movlw movwf cmcon Further discussion of your code is pointless until you do proper bank setting (and better formatting wouldn't hurt). ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu