Hello Robert. After i look second time to your schematic i understood that you idea have the same misadvantage as John idea - the Sw_3 being pressed lock the other keys. It seems to be no way easily than John offer without disadvantages of John's idea. (impossibility to detect multi-key combinations) WBR Dmitry. > The schematic is correct, but I see now that I used a confusing convention > for diode polarity. Thanks for pointing that out. > > I meant the "+" sign to indicate the direction current would flow FROM the > diode when forward biased (instead of the more usual direction of current > flow INTO the diode). > > Your way is more logical, though, so here's how the original circuit would > look with the "+" representing the ANODE of the diode: > > Vcc > SW3 | > __I__ R1 > + | | > +---o o---o----D3----o--------o----------o-------| B0 > | | | | | > R3 | SW1 | o SW2 | o | > | | -| -| | > Gnd | | o | o | > | | | | > | Vcc | |+ | > | | D1 D2 | > | R2 |+ | | > | + | | | | > +----D4----o--------o----------o-------| B1 > | > > Again, the "+" indicates the direction current will flow INTO the diode > when it is forward biased. > > With programmable pullups on B0 & B1, R1 & R2 can be eliminated. If you > want to gamble that the code will never set either B0 & B1 as high outputs, > you could even eliminate R3, though I wouldn't.