PDA

View Full Version : button input: what is necessary for a proofed behaviour



mischl
- 8th November 2007, 11:44
hello all

a bit a simple question at a first glance, but i have had some problems earlier with this....

if i have a button some centimeters or a few meters away from a pic, what would be the best method to connect this? try to avoid all environment influences..

perhaps to route out the ground to the button, and the input side with a pull up (10k?) to the pic? a capacitor (value, typ?) from the input line to ground? a 100 ohm resistor in serial to the input line near by the pic? (i have sawn this recommendation in a microchip app note in relation with a keyboard once, but i am not able to refind this document again....)

thanks for some hints or links to other threads

cheers

mister_e
- 8th November 2007, 15:45
mmm, well there's many different method from the opto coupler, to the funky MAX 232, to the current loop, to the simple 'just extend your wires - but do a software compensation method' and finally, use 2 i/o : one to send a query to the button, and the other to read it.

Which one is the best? i think this might be different from an environment to another. (HV or not)