I am trying to implement a phase control circuit for driving a TRIAC/SCR. I plan to use an xmegaA4U series microcontroller.
I already know that I can route the AC signal through a voltage divider and into the analog comparator, and route the output of the DAC to the other input of the analog comparator. From there I can select rising edge or falling edge triggering and that will allow me to control firing angle by programming the DAC (and the trigger edge).
The last bit of the puzzle is the firing pulse to the gate of the TRIAC/SCR. I figure I can route the output of the analog comparator to a timer channel via the event system, however, I am not sure that I can configure the timer to operate as a one-shot that can elicit a change on an output pin. Does anyone know if this is possible?
P.S. I know this could very easily be done in software with interrupt handlers, however I am trying to "kick the tires" on the xmega and event system, so I want to have minimal CPU intervention besides setting the pulse width once, and the DAC output when the firing angle needs to change. Beyond that, the hardware should take care of it.