PWM on ESP32

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Tom12
Posts: 2
Joined: Tue Apr 27, 2021 4:38 am

PWM on ESP32

Post by Tom12 » Tue Apr 27, 2021 5:46 am

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?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: PWM on ESP32

Post by Roberthh » Tue Apr 27, 2021 6:12 am

Using an external inverter may be more dependable in this case (e.g. 74HC14).

Tom12
Posts: 2
Joined: Tue Apr 27, 2021 4:38 am

Re: PWM on ESP32

Post by Tom12 » Wed Apr 28, 2021 6:16 am

Hi,

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

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: PWM on ESP32

Post by Roberthh » Wed Apr 28, 2021 9:26 am

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.

Post Reply