+1 (& certainly the way I'd approach it)
One other option (if you've sufficient free PIC pins) ....a basic DAC - whilst I'm no expert on DACS, apparently some have buffers integrated, so could likely drive an led.
Also, to get more granularity if going the digipot route, rather than fully supply/ground at either end of the pot wiper, arrange it so the top pot connection has just above the max forward voltage of the LED (so for a blue led with a fwd voltage of 3.2V, arrange it so 3.4V is present at the top of the pot) - the extra bit of voltage is for the Vdrop across your inline series resistor, like wise rather than ground at the bottom of the pot, arrange is to have the voltage where the LED just extinguishes (so for a blue led, probably around 2.8V)....this will give you much, much finer control over the led brightness.





Bookmarks