Generating phase-angle control signals
Posted: Mon Aug 17, 2015 7:43 am
I'm developing a system which phase-angle controls the input to a transformer and was wondering if I could take advantage of the various PIC peripherals to take some (or all!) of the load off the processor in doing this.
Basically, I have a pulse input from a zero-cross detector and need to generate a short pulse a variable time later to turn a triac on.
I was planning to use the Compare module to generate the delay with a interrupt triggered by the zero-cross pulse starting the compare process.
I was wondering if I could somehow take advantage of the SR Latch to generate the pulse but I can't work out how to get the two modules to work together. The datasheet suggests the SR Latch can be used as a one-shot but I can't work out how to achieve this with a repeatable pulse length - it strikes me that the reset pulses just come at fixed intervals so depending when you trigger it you could get any length of pulse as a result. Or am I misunderstanding how this works?
Can anyone suggest anything to look at, or any other way in which I may be able to do this? I'm using the 18F26K22.
Basically, I have a pulse input from a zero-cross detector and need to generate a short pulse a variable time later to turn a triac on.
I was planning to use the Compare module to generate the delay with a interrupt triggered by the zero-cross pulse starting the compare process.
I was wondering if I could somehow take advantage of the SR Latch to generate the pulse but I can't work out how to get the two modules to work together. The datasheet suggests the SR Latch can be used as a one-shot but I can't work out how to achieve this with a repeatable pulse length - it strikes me that the reset pulses just come at fixed intervals so depending when you trigger it you could get any length of pulse as a result. Or am I misunderstanding how this works?
Can anyone suggest anything to look at, or any other way in which I may be able to do this? I'm using the 18F26K22.