The following the touch sensitive switch is ----------- 500K | ----- \/\/\/\/------------| Pa | | | | | | ------------------------| Pb | | ------ | ------ | Finger separated by an insulator A port Pa puts out a step from 0 to Vcc through a 0.5M resistor (470K or 560K) 5 microseconds later the port art Pb samples the value on the touch plate (Which is insulated from the finger). A sampled 1 indicates nothing touching the plate. A sampled 0 indicates that the capacitor has not charged up to the switching threshold of Pb. The way it works is the number of free electrons in the finger acts like a virtual ground and the RC time constant of 0.5 M and the C establishes the 5 microsecond sample time. I have used these in a variety of ways usually etching the plate directly on a PC board and using a heat shrink plastic as an insulator In simple applications where you need only one or two switches then the following circuit will also work. | | / \ 500K ------ / | | | | | ------------------------| Pb | | ------ | ------ | Finger separated by an insulator This requires a single port bit that outputs a 0 and discharges the capacitive switch. The port data direction is changed and sampled 5 microseconds later. A 0 indicates the presence of a finger and a 1 the absence of a finger. Walter Banks www.bytecraft.com ---------- > From: John Haggins > To: PICLIST@MITVMA.MIT.EDU > Subject: Touch sensitive code > Date: Wednesday, July 15, 1998 1:17 PM > > Hi, > > Anyone got code to make a PIC input touch sensitive with no external > components? > > i.e. if you connect a wire to an input, the PIC "knows" when you touch the > wire. > > Thanks!