Mike, not quite. In a priority encoder, whichever input has higher priority will always clobber the others. In this circuit, though, the button that's pressed first has priority as long as it's pressed. - Marcel On 3/6/07, Michael Rigby-Jones wrote: > > > >-----Original Message----- > >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] > >On Behalf Of Marcel Birthelmer > >Sent: 06 March 2007 10:07 > >To: Microcontroller discussion list - Public. > >Subject: [EE] My First Original Circuit! > > > > > >Hi all, > >I'm sure to most of you this will be boring, but this circuit > >represents the first time I've come up with a useful, > >non-trivial, functional analog(ish) circuit, so I'd like to > >share it with the group. Circuit is attached, or available at > >http://marcel.carrietech.com/switches.png > > > > There are three switches mapped to two outputs. SW1 = 01, SW2 > >= 10, SW3=11. The idea of this circuit was to prevent SW1 and > >SW2 being pressed at the same time to cause the output to look > >like SW3. (If SW3 is pressed along with either of the other > >two, the output will be 11.) > > > > In the idle state, both voltages are low. When one switch > >(assume it's SW1, without loss of generality) is closed, the > >transistor Q2 turns on, dropping its collector voltage (and > >thus Q3's base voltage) close to 0. Q3, in turn, is cut off, > >leaving no current to flow through SW2 if it is closed. The > >same takes place if SW2 is pressed first. When SW3 is closed, > >both outputs are forced high via the diodes. > > > >Any comments are welcome. > >Thanks, > >- Marcel > > I think you have just re-invented the priority encoder! A 74LS148 would do this job, and you could even exapnd it up to 8 inputs. > > Regards > > Mike > > ======================================================================= > This e-mail is intended for the person it is addressed to only. The > information contained in it may be confidential and/or protected by > law. If you are not the intended recipient of this message, you must > not make any use of this information, or copy or show it to any > person. Please contact us immediately to tell us that you have > received this e-mail, and return the original to us. Any use, > forwarding, printing or copying of this message is strictly prohibited. > No part of this message can be considered a request for goods or > services. > ======================================================================= > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist