Hi, I have a personal project using 3 PWM of different frequency. Everything working but I would like to know if it's possible to do this:
In my project, 3 frequencies are using but if frequency 1/2 are ON, event if 3 is ON it should be OFF, instead of handling this with NAND/FLIPFLOP IC I would like to know if it's possible to handle it by software with some kind of trick to be able to do the same thing.
Is there are some way to PROGRAM how a PIN can go ON or OFF while using the hardware PWM at the same time.
The frequency can go relatively high so i cannot handle it manually with 100% software (max +-33khz right now).
My project is finished but wanted to eliminate components if they are not really needed!
Thank you for your help!
ESP32 Pins behavior
-
ahsrabrifat
- Posts: 201
- Joined: Sat Jan 18, 2025 2:31 pm
Re: ESP32 Pins behavior
You can manage the behavior of PWM outputs on the ESP32 using the Motor Control Pulse Width Modulator (MCPWM) module. The MCPWM peripheral is versatile and allows for advanced configurations, including the ability to control PWM signals based on specific conditions. You can find the details in espressif document.
https://docs.espressif.com/projects/esp ... mcpwm.html
And here is all the basic info about ESP32 PWM: https://www.theengineeringprojects.com/ ... 2-pwm.html
https://docs.espressif.com/projects/esp ... mcpwm.html
And here is all the basic info about ESP32 PWM: https://www.theengineeringprojects.com/ ... 2-pwm.html
Re: ESP32 Pins behavior
Than you for your reply,
I am using MCPWM and everything work but I did not fine anything that let me to set some conditions.
Can you pin point one of the function to look for? the links you provided (example) nothing really useful in that but the other from Expressif I already used it. But I don't know what I need to look to do some "conditions".
Thanks!
I am using MCPWM and everything work but I did not fine anything that let me to set some conditions.
Can you pin point one of the function to look for? the links you provided (example) nothing really useful in that but the other from Expressif I already used it. But I don't know what I need to look to do some "conditions".
Thanks!
Who is online
Users browsing this forum: No registered users and 5 guests