{IDF_TARGET_NAME} has a second-order sigma-delta modulation module. This driver configures the channels of the sigma-delta module.
There are eight independent sigma-delta modulation channels identified with :cppsigmadelta_channel_t
. Each channel is capable to output the binary, hardware generated signal with the sigma-delta modulation.
Selected channel should be set up by providing configuration parameters in :cppsigmadelta_config_t
and then applying this configuration with :cppsigmadelta_config
.
Another option is to call individual functions, that will configure all required parameters one by one:
- Prescaler of the sigma-delta generator - :cpp
sigmadelta_set_prescale
- Duty of the output signal - :cpp
sigmadelta_set_duty
- GPIO pin to output modulated signal - :cpp
sigmadelta_set_pin
The range of the 'duty' input parameter of :cppsigmadelta_set_duty
is from -128 to 127 (eight bit signed integer). If zero value is set, then the output signal's duty will be about 50%, see description of :cppsigmadelta_set_duty
.
Sigma-delta Modulation example: peripherals/sigmadelta
.
inc/sigmadelta.inc
inc/sigmadelta_types.inc