- Add functions
setPWMPushPull_Int
,setPWMPushPull
andsetPWMPushPull_Period
for the newPushPull
mode. Check pwm_set_output_polarity #21 - Add these examples to demo the new
PushPull
mode
- Fix bug of half frequency when using
phaseCorrect
mode - Improve
README.md
so that links can be used in other sites, such asPIO
- Optimize speed with new
setPWM_manual_Fast
function to improve almost 50% compared tosetPWM_manual
. Check setPWM latency #19 - Add example PWM_SpeedTest to demo the better speed of new
setPWM_manual_Fast
function - Modify examples PWM_manual to use new
setPWM_manual_Fast
function
- Add example PWM_manual to demo how to correctly use PWM to generate waveform
- Add function
setPWM_DCPercentage_manual()
to facilitate the setting PWM DC manually by usingDCPercentage
, instead ofabsolute DCValue
depending on varyingTOP
- Add functions
getPin()
andgetActualDutyCycle()
- Add example PWM_StepperControl to demo how to control Stepper Motor using PWM. Check Using PWM to step a stepper driver #16
- Use
allman astyle
and addutils
- Fix glitch when dynamically changing dutycycle. Check Changing Duty Cycle Dynamically Creates Runt PWM pulse #10
- Adjust
MIN_PWM_FREQUENCY
andMAX_PWM_FREQUENCY
dynamically according to actualF_CPU
- Update examples
- Add
minimal
example PWM_Basic. Check added minimal viable program to get the user up and running #9
- Add
setPWM_manual(pin, level)
function for efficiency in wafeform creation using PWM. Check Duty cycle as integer rather than float #6 - Add example PWM_Waveform_Fast to demonstrate how to use new
setPWM_manual(pin, level)
function. - Add
setPWM_Int()
function for optionaluint32_t dutycycle = real_dutycycle * 1000
. Check Duty cycle as integer rather than float #6 - Add example PWM_DynamicDutyCycle_Int to demonstrate how to use new
setPWM_Int()
function. - Rewrite many functions to take advantage of new features.
- Add efficient
setPWM_manual()
function to use in wafeform creation using PWM. Check Duty cycle as integer rather than float #6 - Add example PWM_Waveform to demonstrate how to use new
setPWM_manual()
function in wafeform creation - Optimize library code and examples by using reference-passing instead of value-passing and inline.
- Fix compiler warnings.
- Display informational warning when
_PWM_LOGLEVEL_
> 3
- Permit PWM output for both channels of PWM slice. Check Request for Clarification on PWM Slices and A/B sides #5
- Use float
instead
ofdouble
for frequency and duty-cycle - Add example PWM_MultiChannel to demonstrate how to use both channels of PWM slice.
- Permit changing dutyCycle and keep same frequency on-the-fly. Check Attempting to Alter the Duty Cycle w/o changing any other values #3
- Add example PWM_DynamicDutyCycle to demonstrate new feature
- Add support for more boards using arduino-pico core, such as ADAFRUIT_ITSYBITSY_RP2040, CYTRON_MAKER_NANO_RP2040, SPARKFUN_PROMICRO_RP2040, CHALLENGER_2040_WIFI_RP2040, ILABS_2040_RPICO32_RP2040, MELOPERO_SHAKE_RP2040, SOLDERPARTY_RP2040_STAMP, UPESY_RP2040_DEVKIT, WIZNET_5100S_EVB_PICO, etc.
- Display compiler informational warning messages only when
_PWM_LOGLEVEL_
> 3
- Fix platform in
library.json
- Not reprogram if same PWM frequency.
- Add PIO strict
lib_compat_mode
- Fix bug not changing frequency dynamically. See Change the PWM frequency #2
- Fix bug generating wrong frequency. See Wrong frequency #1
- Initial coding to support RP2040-based boards such as Nano_RP2040_Connect, RASPBERRY_PI_PICO, etc. using either RP2040 ArduinoCore-mbed mbed_nano or mbed_rp2040 core or Earle Philhower's arduino-pico core
- The purely hardware-based PWM channel can generate from very low (lowest is 7.5Hz) to very high PWM frequencies (in the MHz range, up to 62.5MHz).