Hi,
In LTspice, I have a voltage. I want to convert it to a PWM. This is only for LTspice - it doesn't have to be a something that can be realised.
Tperiod is 10ms.
So if the measured voltage is 2.3V, and my reference is 3.3V, then I want a PWM to have a duty of 69% (2.3V/3.3V). So Ton 6.9ms.
The start of the PWM must be on 0, 10ms, 20ms, 30ms, 40ms etc. The reason I say this is, I used a Sawtooth and a comparator to do it, but the PWM doesn't align to those times and I need it to.
In LTspice, I have a voltage. I want to convert it to a PWM. This is only for LTspice - it doesn't have to be a something that can be realised.
Tperiod is 10ms.
So if the measured voltage is 2.3V, and my reference is 3.3V, then I want a PWM to have a duty of 69% (2.3V/3.3V). So Ton 6.9ms.
The start of the PWM must be on 0, 10ms, 20ms, 30ms, 40ms etc. The reason I say this is, I used a Sawtooth and a comparator to do it, but the PWM doesn't align to those times and I need it to.