What about building one opamp constant current source and then using current mirrors to drive the leds directly? You could then connect the cathode of the LED to the PIC pin and drive the pin low to turn the LED on. Also then you could change the brightness of all leds with an adjustment to one current source. Nick ----- Original Message ----- From: "Mike Harrison" To: Sent: Sunday, February 08, 2004 6:02 AM Subject: Re: [PICLIST] [EE:] Driving LEDs from Vbatt from 5v regulated circuit On Sat, 7 Feb 2004 22:12:52 -0800, you wrote: >I want to drive a PIC (and a 5v-only analog device) from a combination >voltage doubler/low dropout regulator (MAX660+667, modified version of >their appnote circuit). The output is a small subset (5-7) of about >30 Green/Yellow LEDs. I was thinking of driving the LEDs directly from >Vbatt (lower power consumption, and none of the DC/DC or regulator loss) >but over the useful battery life of 3.2 .. 2.6v (Lithium cell or 2 AA) >the voltage drop across the current limiting resistor varies from >(3.2-1.9) = 1.3V to (2.6-1.9) = 0.7V. A factor of 2. > >I plan to modulate the brightness with PWM, but I'd like to have the >full 25mA (PIC pin limited) drive current available at all times. Can >anyone think of a way to do this? As VBat is lower than the PIC supply, just connect the LEDs from Vbat to the PIC pin, and switch the pin low to turn on. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.