The micro controller is able to determine the temperature of the LED, dimming the LED and even to determine the type of LED with a view pulses before turning the LED to full brightness. The PIC16F1765 is able to generate a PWM and combine it in a logic cell with the signal from the comparator op amp section, which is sensing the shunt. Such a combination of digital with analogue features is ideal to change drive current and PWM to drive all kinds of LEDs with the same hardware.
This is an automotive headlight LED schematic design example using SPI bus controlled NXP ASL4500SHN and ASL3416SHNY LED buck driver chips. The hysteretic buck DC-to-DC topology of the buck regulator grants LED drive currents with low ripple noise and high accuracy of the current itself. The main software development work was done on NXP demo board and can be made available on request. The next coming design step will be use automotive Kinetis NXP ARM devices. In combination with NXP LED drivers this means an outstanding technology advantage for automotive applications.