Hi Duncan,

I'm not sure how you're getting frequencies between 10,000 and 500,000 in a word var, but for sure, the HPWM10 macro will have problems with frequencies greater than 32,767.

The calculation from frequency to TimerTicks uses the DIV32 command, and the Divisor has a 15-bit maximum (32,767). The limitation is the same for PBP's HPWM.

Since you have PBPL, it's possible to modify the macro to use LONG's.
Then it won't have the DIV32 problem anymore.

But if you're having problems getting PBPL to work. That may not help out either.
<br>