Page 1 of 1

PWM on ESP32

Posted: Tue Apr 27, 2021 5:46 am
by Tom12
Hi,

i need two PWM-Signals. The simples way is "machine.PWM" but there is the Problem. Signal 1 I can do it with "machine.pwm" but Signal 2 must invertet to Signal 1.
Can I use "Signal(PWM, invert=true)"? If I tried it, it doesn't work.
If I used a Timer, there are some Problems. For example its to slow...

May someone help me?

Re: PWM on ESP32

Posted: Tue Apr 27, 2021 6:12 am
by Roberthh
Using an external inverter may be more dependable in this case (e.g. 74HC14).

Re: PWM on ESP32

Posted: Wed Apr 28, 2021 6:16 am
by Tom12
Hi,

I don't want to use an external oscillator though.

Re: PWM on ESP32

Posted: Wed Apr 28, 2021 9:26 am
by Roberthh
The 74hc14 is an inverter, not an oscillator. It just inverts the polarity of a signal. You may use it to build an oscillator, but that is not the primary application.