Agreed!  And if your inputs are not floating and your wire lengths/circuit traces are short, maybe some added distance between the relays and the chip will help.  Maybe add a capacitor from the input to ground (if you don't have one already).  You could also try putting the circuit (minus relays) in a Faraday cage [a metal box that is shorted to ground].  A bit extreme but helps.

P.S. to all:  Hi, just joined the list today.

Michael Hagberg wrote:

 what does you input circuit look like? if the input is left floating you may be getting false signals because any length of wire or circuit trace acts like an antennia. michael 
-----Original Message-----
From: Michal Steyn <michal@IAFRICA.COM>
To: PICLIST@MITVMA.MIT.EDU <PICLIST@MITVMA.MIT.EDU>
Date: Saturday, April 18, 1998 5:26 PM
Subject: Shielding a pic from interverenceHi I am building a project using a pic16c84. 6 of the outputs from the pic drives relays which switch 220v. It wotks perfectly fine, even if the 220v supply is connected to the relays, but as soon as there is current in the 220v surcuit, i.o.w. when the relay is switched on, the 220v starts to intervere with the pic and it gets inputs even if there wern't any. If any one knows what i can do or how I can correct the problem, please email me.Thanks allot.Michalmichal@iafrica.com