Ah, induction! My guess is that your PIC is picking up the collapsing magnetic field which exists around the TV. The wires to the switches are little antennae, and the large change in the magnetic flux as the field collapses is inducing a current in the wires which your PIC is seeing as a keypress. The _easiest_ way to get around this is to debounce in software the key closures. What that means is that the key must appear in a new state for some period of time before the keypress is reported to the application software. Andy Francois Robbertze on 09/27/2000 09:22:07 AM Please respond to pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: (bcc: Andrew Kunz/TDI_NOTES) Subject: [PIC]: Input activated by TV? Dear All I have a PIC(16F84) close to my TV and video recorder that monitors micro switches and record video when certain things happen. I have connected RA1 to +5V through a 1K resister to pull it logic high and RA1 through a microswitch to GND to pull it logic low when the microswitch closes. My problem: Every time when I switch the TV off the PIC acts if the microswitch was activated...but it is not. I have disconnect the TV from everything else exept the mains power and the problem still remain. Strangely enough is that all the other functions of the PIC seems to be normal. It don't seems like the PIC resets or anything because after a 20 second delay subroutine the PIC must stop the recording and it does so.... Thanks Kindest Regards Francois Robbertze lllllllllll \\ ~ ~ // ( @ @ ) o------oOOo-(_)-oOOo-----o | | | Francois Robbertze | | fr10@mweb.co.za | | | o--------.oooO-Oooo.-------o -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?bodySET%20PICList%20DIGEST -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST