Quote Originally Posted by mark_s View Post
If you look in the manual under HPWM. You can see that pbp HPWM is only 8bits.
In your code you have the duty set at 254, which is nearly 100%. I think you would want to set
the duty to 50% or 127.
Wow! You are SO right - looks MUCH better now. Thanks!

Name:  IR3.JPG
Views: 1086
Size:  83.7 KB

Still has that slope on it though. I might try DT's Instant Interrupts and use a pin on and off to get it. Here's what the code is now:

Code:
HPWM 1, 127, 38000
MAIN:
        pauseus 1000
        trisc.2 = 1
        pauseus 1000
        trisc.2 = 0
	GOTO MAIN