I'm doing a project and want to use a microcontroller to control an LED from 230Vac mains.
What I'm looking for is an LED driver that can be digitally controlled (i.e. PWM for dimming) but that operates with ac mains. Most of the drivers I can find seem to only achieve dimming using a triac rather than PWM.
Could anyone point me in the right direction or suggest an alternative?
Yes you are correct its purely DC which supports PWM. you can refer the PDF below to control triac using MCU.
Triac control system using the MSP430. Alternate power supply circuits are included. A listing of triac control software available is presented https://www.ti.com/lit/an/slaa043a/slaa043a.pdf