This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPLD-ICS: Logic forum

Part Number: TPLD-ICS
Other Parts Discussed in Thread: TPLD1202

Tool/software:

We now have two PWM inputs, duty A (60%) and B (50%). Can we output a PWM wave with duty 2 * (A-B) through TPLD1202?

  • Hi m l,

    You can output a PWM with 20% duty cycle pretty easily. As far as tracking A-B duty cycle if those duty cycles are changing, that might be very difficult or impossible.

    Best,

    Malcolm

  • Hi,Malcolm Lyn

    Thank you very much for your reply. What I want to achieve now is a PWM wave with a 2 * (A-B) duty cycle that tracks the changes in the duty cycle of A and B. Is this possible? How can it be operated specifically?

    Thanks!

  • Hi,Malcolm Lym

    I have tried to implement it, but can only obtain PWM with (A-B) duty cycle. Is there any way to achieve PWM with 2 * (A-B) duty cycle?

    Thanks!

  • Hi,Malcolm Lym

    I want to try using the PULSE WIDTH MODULATOR device to complete this idea, because I see the existence of CNT devices. Can we use a 25MHz CLK to obtain the count of (A-B) duty cycle times (DATA), and then use the PULSE WIDTH MODULATOR device with a clock of 12.5MHz CLK to output a PWM of 2 * (A-B) duty cycle. May I ask if this is feasible?

    Thanks!

  • Hi m l,

    Yes, this is feasible. I have tried another design which can get close to 2x duty cycle. It depends on what level of precision you need. In my design, I count up on the counter when the (A-B) pulse is high, and then down to double the pulse. I have attached my design to this message, you can see a screenshot of my simulation result. Red signal is A-B, Purple is 2(A-B). 

    Right now I am using ~50kHz clock for the counter, you need to pick the clock carefully depending on frequency of A/B. It needs to have less than 255 cycles for the high pulse duration of (A-B), the faster the clock to the counter, the more precision you get on the output pulse.

    Red pulse width is 200us, purple pulse width is 430us.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/151/4073.pulsething.syscfg

    Best,

    Malcolm