PWM registers?
PWM registers?
Postby BuGless » Wed Sep 23, 2015 6:19 pm
I'm in need of actually only one PWM (one frequency), but with five or possibly even six outputs with six different duty cycles.
Is there documentation regarding the PWM configuration registers? Sample code?
Any suggestions on how I create one or two extra PWM outputs with a different duty cycle (but same startphase)?
I'm trying to avoid involving yet another MCU.
Is there documentation regarding the PWM configuration registers? Sample code?
Any suggestions on how I create one or two extra PWM outputs with a different duty cycle (but same startphase)?
I'm trying to avoid involving yet another MCU.
-
- Posts: 26
- Joined: Fri Oct 24, 2014 7:58 pm
Re: PWM registers?
Postby ESP_Sprite » Wed Sep 30, 2015 2:06 pm
There's no PWM hardware as such, but the SDK has a pretty capable software PWM implementation. Check the pwm_* functions in the SDK, they probably do what you want.
Re: PWM registers?
Postby BuGless » Thu Oct 01, 2015 8:27 am
Interesting.
This begs the question though, what is the resolution of the PWM pulses, and how accurate does it maintain fixed phase relationships between different PWM channels?
How well can it guarantee that the width of the pulses stays unaltered?
I'm trying to reach 25ns resolution with respect to pulsewidth and phase difference in order to be able to switch 240VAC MOSFETs on and off in sync without creating electrical shorts among them.
This begs the question though, what is the resolution of the PWM pulses, and how accurate does it maintain fixed phase relationships between different PWM channels?
How well can it guarantee that the width of the pulses stays unaltered?
I'm trying to reach 25ns resolution with respect to pulsewidth and phase difference in order to be able to switch 240VAC MOSFETs on and off in sync without creating electrical shorts among them.
Re: PWM registers?
Postby dkinzer » Thu Oct 01, 2015 10:39 am
Look at the PWM example code included in SDK version 1.0.1b2 (and earlier). It is quite likely (probably certain) that the PWM code now part of the SDK is based on the earlier example code.BuGless wrote:what is the resolution of the PWM pulses, and how accurate does it maintain fixed phase relationships between different PWM channels?
I would guess that 25nS resolution is not likely.
Don Kinzer
Beaverton, OR, USA
Beaverton, OR, USA
Who is online
Users browsing this forum: No registered users and 12 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.