Are you talking about physically touching the port pin with your finger? If so, you might want to take precautions when a 4000 volt static discharge from your finger jumps to the pin. Rick PicDude wrote: > Thinking of using the case on a PIC-based project as a simple > touch switch. Can anyone comment on if this idea will work... > > I've seen a circuit similar to this using 2 port pins with > the top of the resistor going to the other port pin (instead > of +5V). However, I'm thinking I can do this with just one > port pin as follows... > > ^ +5V > -------- | > | R > P | | > I |----------C---. > C | | > | --- > -------- - > > To see if the switch is being touched, the pin would be at > LOW logic level. Then I would switch it to HIGH, flip the > pin to an input, then read-back the level. If HIGH, then > no finger is present, else if LOW, then a finger is present. > > The key to this is using as few components as possible, so I > may replace C with PCB pads, if I can calculate C to be small > enough. > > Cheers, > -Neil. > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu