Hi, I think you forgot to turn off the A/D converter .... Remember that after reset all analog/digital multiplexed pins are set to analog mode. Regards, Fabio > I'm getting started with the 12F675, moving up from > the 16F84, and am having a little trouble. I don't > know if it's my code or MPLAB, but what I'm trying to > do is pretty simple and I spent a few hours on it with > little to show. > > Basically I'm trying to get comfortable with the F675 > and its I/O. I started with a 1 kHz square wave > generator I wrote for the F84 and ported that to the > F675. When that didn't work (in MPLAB), I pared it > all the way down to just setting one of the GPIO bits, > and couldn't even get that done. So, here's the code > I ended up with. I'm using MPLAB IDE version > 6.10.0.0. What is the problem? > ----- > LIST P=12F675, R=DEC > errorlevel 0,-305 > INCLUDE "\program files\mplab > ide\mchip_tools\P12F675.inc" > > ; Registers > > __CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _PWRTE_ON > > PAGE > ; Mainline > > org 0 > clrf GPIO ; Init GPIO > movlw B'00000111' ; Turn off CM > movwf CMCON ; > bsf STATUS, RP0 ; Goto Bank 1 to set > Port Direction > movlw B'00001100' ; Set GPIO<3:2> as > input and > movwf TRISIO ; GPIO<5:4,1:0> as > outputs > bcf STATUS, RP0 ; Go back to Bank 0 > movlw B'00000001' > movwf GPIO ; Set bit 0 of GPIO > > loop > goto loop > > end -- 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