Long time ago some one in this list used to have this problem using 508 instead of 671. I spent lots of time on that and found this. when you use 12cxxx internal clock enabled Mplab doesn't recognize that it things that you are using external witch is not what you need. I do not know if it is bug or not what I think it should see it. **solution** in mplab open options / processor setup / hardware then change external to inter nal. if it did not work let me know . Andre Abelian Dave Mumert wrote: > Hi all > > Can someone explain why the following code does not change GP4 and GP5 in > the MPLAB SIM? > I think I may be losing my mind. > > list p=12c671 ; list directive to define processor > #include ; processor specific variable definition s > > __CONFIG _CP_OFF & _WDT_ON & _PWRTE_ON & _INTRC_OSC_NOCLKOUT & _MCLR E_OFF > > org 0 > main > bsf STATUS,RP0 ; set file register bank to 1 > clrf INTCON ; disable all interupts > clrf PIE1 ; disable peripheral interupts > movlw 04H ;was 04 > movwf ADCON1 ; set GP0,GP1 to analog inputs > movlw B'00001011' > movwf GPIO ; set bit 0, 1, 3 to inputs > movlw B'10001111' > movwf OPTION_REG ; set Option register > btfss PCON,1 ; have we just powered up > bcf STATUS,RP0 ; set file register bank to 0 > ; > Main1 > movlw 00H > movwf GPIO > movlw 034H > movwf GPIO > goto Main1 > > end > > Thanks > > Dave Mumert > dmumert@telusplanet.net