--===============0917061918== Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by pch.mit.edu id l5CB3Bei017945 I have seen this exact same circuit on the net several times, just redraw= n. =20 In some versions it shows it connected to PortB. I suspect someone redre= w=20 it with PortA but didn't add a pullup. I have looked at this circuit ove= r=20 and over and just don't see a wiring flaw. Sometimes it is staring you i= n=20 the face though and you just can't see it. I'll have another look at it. Thanks to all, FJ From: Rolf I had considered this flaw in the schematic as well. My assumption is that there was an internal pull-up on A1. The only thing that could make sense. Rolf Russell McMahon wrote: > I'll copy this from below as its crucial > > *** The turnoff of A0 must wait until after the button is released *** > or the still-pressed button will retrigger the circuit. > > _______________________ > > There's a fundamental problem with the circuit diagram AND there's > almost certainly a problem with your circuit implementation. > Adding a pullup on A1 makes the circuit operation defined and this may > have been specified elsewhere. > > All Off > > PNP =3D Q1 > NPN =3D Q2 > Upper diode =3D D1 > Lower diode =3D D2 > > Button =3D ground diode junction on so PNP on so power on. > PIC pits A0 high so NPN on so PNP held on and all is well. > > Now, A1 cannot either affect or see anything useful. > It is behind two opposed diodes so it cannot drive Q2_c hi or low > > If A1 is input and Q2 is off then Q2_c is high but D2 blocks the Q2_C > high so A1 see's a floating switch. > Pressing button changes A1 from float in to gnd in but this is not > overly useful at this stage. > > With Q2 on =3D power on then Q2C ~~=3D 0 volt so D1 cathode and D2 cat= hode > are at float. > Again, closing button takes A1 from float to ground. > A pullup on A1 allows the button press to be seen and then the > processor can turn power off using A0. > *** The turnoff of A0 must wait until after the button is released *** > or the still-pressed button will retrigger the circuit. > > _____________ > > With button open and no PIC then A1 *MUST* float. If it has a 10k > pullup it must pullup. If it doesn't the cct is not as shown. > > A P channel FET will work well as long as gate drive voltage is not > too high or too low. > > > Russell > > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist _________________________________________________________________ PC Magazine=92s 2007 editors=92 choice for best Web mail=97award-winning = Windows=20 Live Hotmail.=20 http://imagine-windowslive.com/hotmail/?locale=3Den-us&ocid=3DTXT_TAGHM_m= igration_HM_mini_pcmag_0507 --===============0917061918== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 7bit -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --===============0917061918==--