The main difference is that delta-sigma won't keep the modulation frequency constant. So if you change the duty cycle, the frequency also changes. If you don't want that, you will have to compensate for it.
Secondly, there is only one sigma-delta generator. Although it may drive multiple outputs, it has only one set of configuration registers.
Third, sigma-delta is implemented in hardware, the ESP8266 does not have any hardware support for PWM, so one will need to implement it using software. The function in the native SDK supplies something like that, but it's far from optimal. I know at least two alternative implementations (one of them by myself) that quite closely approach a real hardware PWM, which allows for different duty cycles on all attached pins.
Fourth, the sigma-delta function only allow for 8 bit resolution, which is really quite small. A software PWM can achieve full 16 bit resolution at 122 Hz, if the cpu is set to 160 MHz.
eriksl wrote:There are a number of differences between PWM and delta-sigma (implementations on ESP8266).
The main difference is that delta-sigma won't keep the modulation frequency constant. So if you change the duty cycle, the frequency also changes. If you don't want that, you will have to compensate for it.
Secondly, there is only one sigma-delta generator. Although it may drive multiple outputs, it has only one set of configuration registers.
Third, sigma-delta is implemented in hardware, the ESP8266 does not have any hardware support for PWM, so one will need to implement it using software. The function in the native SDK supplies something like that, but it's far from optimal. I know at least two alternative implementations (one of them by myself) that quite closely approach a real hardware PWM, which allows for different duty cycles on all attached pins.
Fourth, the sigma-delta function only allow for 8 bit resolution, which is really quite small. A software PWM can achieve full 16 bit resolution at 122 Hz, if the cpu is set to 160 MHz.
I found this a very helpful response, thank you!
Just curious, did you mean 122 Hz, or 122 KHz?
What are you trying to achieve with a PWM at 121 KHz? It will probably fry your mosfets if they need to switch a significant amount of current.