Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
I'm aware that it is very easy to generate a PWM signal in HALCoGen, but the issue with that is that HALCoGen has to be opened and modified each time I want to change the signal.
Say I have a variable "x" that, if the value is 6, the duty cycle is 50%, and if the value is 2.345, the duty cycle is 60%.
Is there an easy way to do this? Generating a PWM in CCS using delays and switching a pin on and off tends to fall error to delays in running the code, and is very difficult to calibrate it so that it is outputting the frequency that I want.