Thank you for clarifying that, Richard.

I'm using mark_s's suggestion and it's working well so far. I think the problem I had last time I experimented with pulse width modulation is that I thought hpwm was the same as pwm where I could assign the output to whichever pin I wanted. I wasn't aware that hpwm is like adcin - there are specific channels on specific pins.