Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 235849

Forum Post: TMS570LC4357: Using ePWM or N2HET to hold a specific duty cycle for a specific time

$
0
0
Part Number: TMS570LC4357 Tool/software: I have a LTC2644 DAC connected to shared ePWM/N2HET pin. I'd like to generate a low-frequency PWM output (50Hz) on that output with a duty cycle that can vary between 1-2ms for servo control. I'd like to avoid any HW changes (say, removing the LTC2644) on the board. The idea is that since the output frequency is low, we can achieve this with the LTC2644 remaining in place. The LTC2644 is controlled via PWM, and produces a voltage level depending on the duty cycle of the input signal. With an external voltage reference of 5V, a 1% input duty cycle produces 0.05V, and with 99% it would jump to 4.95V. Settling time is 8us in either direction. To produce a 50Hz PWM output with (say) 1ms duty cycle, I'd have to iterate the following: - Provide input PWM signal to LTC2644 with a duty cycle of 99% for 1ms - After 1ms, provide an input PWM signal with a duty cycle of 1%, and hold that for the remainder of the 20ms period -- 19ms . The servo control will expect stable 1-2ms duty cycles and adjust orientation accordingly. Since I have a choice to use either ePWM or NHET -- is one better suited over the other to run a program like the above with tight timing requirements in the 1-2ms range? Would you be able to share example code that could achieve this? Thanks!

Viewing all articles
Browse latest Browse all 235849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>