I like to build a laser pointer driver circuit that I can drive from an 8 bit uC. However, I like to get light output fairly constant. This requires for me to look at the photo detector (these lasers come with 3 pins, gnd, laser cathode, pd cathode) current and adjust laser input current to stabilize light output.
Ideally, I need to drive this from a GPIO of 8bit uC so that I can make it oscillate at different frequencies at different times. (100-300Khz range nothing very fast) I looked around and the analog circuits that are available are for DC, I couldn't come up with a way to drive them from GPIO.
I want to ask masters here, is there a way to do this with a few transistors etc. if not, what type of ICs I can use for this purpose. (A simple current driver with some feedback perhaps?)