The PCA9685 also doesn’t have a variable clock UNLESS it’s driven by an external clock source, in which case a pre-scaler value can be applied (though, I’m not 100% certain on this — need to re-read the data sheet). So having to configure the period as the current API requires is kind of inconvenient.
Ah, I did, in fact, mis-read the data sheet.
The PWM period is set by the following formula:
pre_scale = round((clock / (4096 * period)) - 1;
…regardless of internal or external clock.
So, my objection to having to set the period is hereby withdrawn :-)
|