Project with 28X1
Currently using pwmout successfully but need another input so want to change the Pwmout to hpwm single mode on channel D to free up the input used by Pwmout.
Pwmout has the nifty pwmduty command which allows the duty to be changed without all the overhead of resetting the entire PWM device each time.
There are no code examples in the manual(2) for hpwm and the hpwm data sheet is not yet available.
Q1. Once hpwm is set up and running, does the entire command have to be used each time to change the Duty? Search has not found this discussed on Forum yet but then maybe I have not searched on the right topics.
Q2. What happens to the other 3 Hpwm ports each time the command is issued while these ports are doing other things?
i.e.
hpwmA is an input (push button for a mode selection)
hpwmB & C are driving leds (High/Low)
Current code snippet alternatives are;
original pwmout/pwmduty
hpwm
Thanks
Currently using pwmout successfully but need another input so want to change the Pwmout to hpwm single mode on channel D to free up the input used by Pwmout.
Pwmout has the nifty pwmduty command which allows the duty to be changed without all the overhead of resetting the entire PWM device each time.
There are no code examples in the manual(2) for hpwm and the hpwm data sheet is not yet available.
Q1. Once hpwm is set up and running, does the entire command have to be used each time to change the Duty? Search has not found this discussed on Forum yet but then maybe I have not searched on the right topics.
Q2. What happens to the other 3 Hpwm ports each time the command is issued while these ports are doing other things?
i.e.
hpwmA is an input (push button for a mode selection)
hpwmB & C are driving leds (High/Low)
Current code snippet alternatives are;
original pwmout/pwmduty
Code:
' initialisation
pwmout 2,249,512 ' establish pwm pin, Period(frequency), Duty.
.
.
.
' in main loop
pwmduty 2,w1
Code:
' initialisation
hpwm 0,0,%1000,249,512 ' mode(0=single),polarity(0=H),setting(%1000=D - Output4/Leg25), period(frequency), duty
.
.
.
' in main loop
hpwm 0,0,%1000,249,w1