On Monday 01 September 2003 09:27, Michael Rigby-Jones scribbled: > If you check the schematic you will see that RB0 and RB1 are driving MO= SFET > gates. I suspect the original intent is that pressing the switches dos= en't > affect this gate drive. Correct. > It should be fairly obvious why the circuit dosen't work as you expect: > With 5 volts applied to the base of the transistor, a current will be > flowing out of the emitter irrespective of the voltage on the collector= =2E Yes, but I expect that that should be quite small. Roughly (5 - 0.7)/1k = =3D=20 4.3mA. And with the extra diode in place, there would still be this curr= ent. Also, with the transistor switched on and the pushbutton pressed, when RB= 1=20 goes High (~5V), the 1N4148 gets forward-biased and the essentially=20 reverse-biases the B-E junction of the transistor, eliminating that curre= nt=20 =2E.. right? > A > further potential problem is that with RB0 driven low, the BC junction = will > be forward biased. Hmmm..... if this happens, then there should be some side-effect to the 7= -seg=20 displays (the columns of which are driven by the mosfets). But there are= no=20 side-effects ... at least no noticeable ones. > This application either wants a mosfet or a PNP bipolar > configured as a common emitter circuit rather than an emitter follower > (which then inverts the switch polarity). By putting an extra diode at > point (D), you are reducing the voltage by 0.6 volts which is obviously > enough to fall below the logic threshold of the PIC. You could also ju= st > lower the value of R2 to acheive the same effect. Lowering R2 from 10k to 1k doesn't help, but raising R1 from 1k to 10k do= es. =20 What's interesting is that in the other (first) circuit, I have a 1k base= =20 resistor as well, and it works. I even swapped transistors, with no=20 resulting difference in operation of both circuits. Odd. > Mike Thanks, -Neil. --- [This E-mail scanned for viruses] -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.