Padu, I don't know what kind of drive capability your input device(s) has (have), but I would put a pullup or pulldown, whichever is appropriate, on the PIC inputs to keep them in the opposite state until driven by the input device. Also, make sure you have bypass caps ( both high and low capacitance values like .1 uF in parallel with .001 uF) on all IC's from Vcc to Gnd., especially the PIC. Maybe even use an optoisolator at the PIC input from the ring signal. Let us know what you do as a final fix. Regards, Jim -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Padu Sent: Wednesday, May 14, 2008 2:05 PM To: Microcontroller discussion list - Public. Subject: [PIC] Weird input behavior Hi all, I'm working on a simple project using a 16f616. Basically it monitors the signal from a telephone device and then asserts a few pins to drive some leds and another IC. I have two inputs: the ring signal (properly treated with a FET) and a reset line (that is typically high) that I use to detect when the call is over (on the falling edge). PART I: ----------- Everything works perfectly, except that a while after (about 5 seconds, it varies) the call is complete (reset line goes low), my program will enter the trigger condition, even if that line never goes high. Both TRISA and TRISC are set to output, except the two pins I'm using as input. The trigger line signal is coming from a FET, and the reset is coming from another IC, so I don't think they are floating, but I'm not sure. PART II: ------------ There are a few LEDs connected to my PIC, and even if the PIC is not powered, they will turn on because I have the "reset line" coming from the telephone IC powered up. Is this leakage normal? What do you guys do to avoid it? I put a current limiter resistor in series and it seemed to do the trick, but maybe it's not the right thing to do. Cheers and thanks for your time Padu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist