Stefan: If you look at page 1 on your data sheet you will see that GP3 has arrow indicating for one side only that means it is input only you can not make it output. hope this helps Andre Abelian Stefan Rousseau wrote: > Hi, I am still trying this one (seems it was not posted): > > This is probably a newbie question. I am trying to get to know PICs by playin g with the 12C671 using the MPLAB simulator. I can successfully toggle PORTS 0, 1 and 2, but 4 and 5 still seem stuck (their bits in GPIO do not move). > This is my simple code: > > list p=12c671 ; list directive to define processor > #include ; processor specific variable definition s > errorlevel -302 ; suppress message 302 from list file > __CONFIG _CP_OFF & _WDT_OFF & _MCLRE_OFF & _PWRTE_OFF & INTRC_OSC_NO CLKOUT ; > ORG 0x000 ; processor reset vector > bsf STATUS,RP0 ; set file register bank to 1 > movlw b'11001000' ; Internal clk,prescaler to wdt > movwf OPTION_REG ; > movlw b'00000000' ; > movwf TRISIO ; all ports but 3 are outputs > movlw 7 ; > movwf ADCON1 ; All Ports digital > bcf STATUS,RP0 ; set file register bank to 0 > loop > bsf GPIO,4 ; > bcf GPIO,4 ; toggle gp4 > goto loop ; > end ; directive 'end of program' > > I cannot find anything in the datasheet to show up the problem. Does anybody know if this could be a MPLAB bug? > > Stefan Rousseau > stefanr@rrs.co.za > Technopark > Stellenbosch > South Africa -- ========================================== = http://www.compufire.com = = mailto:andre@compufire.com = = mailto:mcu-engineering@compufire.com = = Andre Abelian: Engine Electronics, Inc.= = Tel 909-589-5485 Fax 909-598-5695 = ==========================================