-----Original Message-----
From: Jason Wolfson <jason@lipidex.com>
To: PICLIST@MITVMA.MIT.EDU <PICLIST@MITVMA.MIT.EDU>
Date: Monday, December 22, 1997 8:24 AM
Subject: 3 pushbuttons to 2 inputs?

Does anyone have any clever, low parts count
methods of multiplexing 3 pushbuttons onto
2 port pins?
 
Thanks
Jason Wolfson
Lipidex Corp
 
jason@lipidex.com
 
 
Hi Jason,
 
Simply have one pushbutton make one port go high, the other pushbutton make the other input go high, and add two diodes, one from pushbutton 3 to each input.  Your software logic levels will be 00 (no switch press), 01 (switch 2 press), 10 (switch 1 press), and 11 (switch 3 press).  Just make sure to check to see if both inputs are high before taking action.
 
Craig R. Autio