What are your port settings, ie. Schmitt Trigger, pullups, TTL/CMOS, etc.? Rather than using setb and clrb, have you tried doing the setb and clrb to a temporary register, then simply writing the value to the port? With what information has been provided, I see no logical reason for the behaviour you are seeing. I have used the SX for 5 years, and this type of behaviour has not happened. Stephen -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Jinx Sent: Monday, February 17, 2003 2:00 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [SX]: Pin won't turn off properly After 2 frustrating weeks of trying to get to the bottom of the problem I'm no closer to solving it. And trust me, I've tried a lot of ideas. No answer from Scenix, and I may have to bug them until they do. Hate that Attached pic is typical of the SX behaviour - the port pins simply will not reliably turn off when told to or, in this case, one actually turns off prematurely. As noted before (see OP for setup) it is not related to speed or pin terminations. General code that doesn't involve pins is no problem at all, but unless anyone has a last flash of inspiration, it's got the point where I may have to drop the SX in this application (and cast a jaded eye on using them in the future) -- 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 -- 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