Changing Arduino Zero PWM Frequency

Martini,
Thanks very much for the detailed response. I will try this code with the Zero over the weekend to see if I can get it to work.

What we are doing is running a PID heater control algorithm using the duty cycle of the PWM output (which drives a MOSFET, which drives the heater current). The heater power is directly proportional to the PWM duty cycle, but the system has a horribly slow response (it is more like an oven than a contact heater).

Tuning using a normal PID approach has not worked, so we are trying to get fancier with the algorithm and stumbled with the PWM frequency on the Zero being too fast. I tried a Due which seems to have a default PWM frequency of 1 KHz and everything works very well, but we prefer the Zero for size reasons (and because we have already made a custom "shield" with the same footprint). So if I can get the Zero's PWM frequency down I think we will be in business.

Thanks again for the detailed explanation ... people like you who understand all these details are a very valuable resource for those of us who don't but need to get projects working.
Randy