wouter van ooijen wrote: >> Wouter, do you have a link for nc-busbutton info? Googling >> didn't help to find out valid info on this approach. >> > > Its very simple: put a number of resistors in series. The top resistor > is connected to +5, and is in the device. The bottom one is connected to > ground. The PIC reads the voltage on the lower pin of the top resistor. > All resistors except the top one are in the user interface, with a > normall-closed pushbutton over the resistor. > > No HID connector or broken cable: A/D reads 5V. HID connected but no > button pressed: 0V. One button pressed: inbetween. Arrange the resistors > to get 'evenly spaced' readings. > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu > > > > Yes, this works extremely well. I have 3 different commercial applications that use 6 to 7 buttons. The advantages of using the A/D setup are: 1. Only ONE PIC pin used. 2. Easy to stop static discharge problems... Only ONE suppressor diode is needed! 3. Can handle higher resistance switch contacts, which happens when rubber membrane conductive rubber contacts age. No problems later. If anyone wants to see actual schematic and code snippets, email me offline. --Bob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist