PWM
前に戻る
PWM出力の参考ページ
- Raspberry Pi PicoでPWM出力 : 個人ブログ
- Raspberry Pi PicoとMOSFET ③ PWMのAPI : 個人ブログ
- PWMの関数
-
- analogWriteFreq(uint32_t frequency)
- to set the frequency of the PWM signal. It supports a frequency of 100Hz to 1MHz*.
-
- analogWriteRange(uint32_t range)
- to set the range of the PWM signal — the maximum value you’ll use to set 100% duty cycle. It supports a value from 16 to 65535.
-
- analogWriteResolution (int resolution)
- to set the resolution of the PWM signal — up to 16-bit.
-
- analogWrite(GPIO, duty cycle)
- to output a PWM signal to a specified pin with a defined duty cycle. It continuously outputs a PWM signal until a digitalWrite() or other digital output is performed.