At 05:23 PM 1/10/97 -0800, you wrote: >Help! > I cannot seem to use port GP2 of a PIC12C508/JW as an output. >Here's my test code to verify port output. > > DEVICE PIC12C508, IRC_OSC, WDT_ON, PROTECT_OFF, MCLR_ON > > reset start > org 0 > >start > mov !GPIO, 000000b ; set all of port GP as output > movlw 0 > movwf GPIO > CLRWDT > > movlw 111111b > movwf GPIO > > goto START > > > What I have left out is the delay routine so the LED can flash at a sane >rate. > Connecting the cathode of an LED to each I/O pin, the LED flashes except >when connected to port GP3 (since it is MCLR), but it also doesn't flash on >GP2 and it should! > > I am using Parallax SPASM V 4.7 and SPEP V 4.7 > >Any ideas? The errata sheets doesn't say anything about this! > >Thanks. >Dave > > Hi, I just had the same problem yesterday. I am at home so I don't remember the details of which I/O I was using. I was emulating and everything was working as planned and when I used the windowed part, the port bit was not outputting data. I contacted my super supportive FAE and he stated that I had to add two lines of code: movlw b'10000000' option He explained that this is not documented yet failure to do so causes the I/O to remain tri-stated. I added the lines and it took care of the problem. ( I am guessing at which bit it was but I believe 7). I also forgot to disable the pullups which caused me to have inputs go high when there were active pulldowns on them. Correcting both these issues got me up and running. Craig ******************************* * Craig R. Autio * * cautio@equinox.shaysnet.com * *******************************