At 01:00 PM 1/18/02 +1100, Sean Alcorn - Avion Sydney wrote: >Hi all, > >So, given the above configuration, when I want the LED to be ON, I need the >drive GP5 Low and when I want the relay ON, I need to drive GP4 High. When >this application starts up, I need both the relay and the LED to be OFF > >The beginning of my code (after initial equates etc.) is; > >MOVLW B'00001111' >TRIS GPIO >MOVLW B'00100000' >MOVF GPIO >GOTO CONFIG > >This is as soon as I can set GP5 high, but I still get a very obvious 'blip' >of the LED. This application uses existing hardware, but I was considering >to invert the logic of the LED. 2 things. 1) even given the code above, you should NOT be able to see the LED blip! Its only on for a couple of usec - no way is your eye going to see it. 2) the easy way to fix the problem is to set the desired state of the port pins while they are still inputs, then use TRIS to set the DDR. No glitch! I'd take a few minutes and try to see why you can see the glitch, then apply the above fix. dwayne Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 18 years of Engineering Innovation (1984 - 2002) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- 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