John Payson wrote: > > > Switch one connects to pin one. > > Switch two connects to pin two. > > > > Switch three connects to both pin one and two, each connection via an > > IN4148 diode. > > Slightly easier approach: > > [1] Switch one connects pin one to ground > [2] Switch two connects pin two to ground > [3] Switch three connects pin one to pin two > > To read switches one and two, set the port pins to input (with pullups > enabled). To read switch three, ground one port pin and read the other. To detect one key this method work fine. But this method don't allow to detect keys combinations. For example Sw_1+Sw_2 result to the same scan code as Sw_2+Sw_3 or Sw_1+Sw_3 (00_0). WBR Dmitry.