I too, must admit I never use the HPWM command. I write to the registers directly just as Charles suggested. Most (if not all) of the PICs that have hardware PWM have an easy to follow 4 step procedure for setting the registers correctly. (e.g., for the 16F628A, see section 9.3.3). In addition to Charles' example check out MElabs example here

http://www.melabs.com/resources/samples/pbp/hardpwm.bas

(Yes, the calcs are a tad confusing at first, but once you get it you will never go back.)

Paul Borgmeier
Salt Lake City, Utah
USA