Nigel brings up a very good point about the power supply rise time- it's something we forget about often because on the scale WE see it on, it's instantaneous, but to the PIC it usually isn't even linear, much less instantaneous. I lost a number of PICs during one project to an "unexpected" 24-volt input. A solution (although I'm not certain how good it is; feedback DEFINITELY appreciated before I try it myself) would be to stick a FET in there to switch the current through the LED. You have the advantage of minimizing the current flow into the PIC, which also gives you a nice spot of isolation from that 14-V source. With the current design, if that LED goes and the voltage suddenly drops, you'll see a significant voltage/current spike, even with the 50k resistor in place. With the FET, it'll smoke, but the PIC will (probably) be protected. Comments? >From: Nigel Orr >Reply-To: pic microcontroller discussion list >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC]: Driving high voltage LED from a PIC >Date: Wed, 23 Apr 2003 13:11:39 +0100 > >pic microcontroller discussion list <> wrote on Wednesday, April 23, 2003 >12:09 PM: > > >> I have used this approach for years. I have never become aware of a > >> failure. It is a very reliable circuit, providing the parameters are > >> properly determined. > > > > I assume you mean his two resistor circuit. > > But, unless I am missing some fundamental principle completely, it > > doesn't work in the example he gave! > > At 14 volts, either - > > > > - The LED gets minimal current and doesn't light in a worthwhile > > manner or > > - The LED always receives enough current to turn on enough to glimmer > > or worse or > > - The PIC pin sees more than Vdd when turned off. > >And can I add: > - if the +14V comes up before the PIC power supply, bad things might >happen (latchup etc). > >That is a problem if the PIC supply is derived from the +14 (is that an >automotive +14?), and in lots of other circumstances too. Like Russell, >I'm puzzling as to any advantages of this circuit, even if it can be >tweaked to work for a particular LED. > >Nigel >-- >Nigel Orr, Design Engineer nigel@axoninstruments.co.uk >Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT > Tel:+44 1467 622332 Fax:+44 1467 625235 > http://www.axoninstruments.co.uk > >-- >http://www.piclist.com hint: The list server can filter out subtopics >(like ads or off topics) for you. See http://www.piclist.com/#topics _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics