Quote Originally Posted by mister_e View Post
You get the idea.

Look Melanie Dice example, or do it simple, plug your LED directly to the PIC and have a PWM running out of your PIC, use a MOSFET to drive the common GND or VDD of your LED (whatever floats your boat).

You now have a variable intensity, using a minimum of parts... BUT, the more the battery get flatten, the less intensity you'll also have (assuming you don't use anything to monitor it... and if so... you end up with more extra hardware than a simple LDO regulator)
This is exactly the setup I'm proposing....use a transistor to control the 'effective' voltage the LEDSs 'see'. But for monitoring, I'll use a spare ADC pin on the PIc to monitor the unregulated supply voltage....and then adjust the PWM to the LEDs accordingly.

The problem with using an LDO regulator, is they're very inefficient.