-->
Page 1 of 1

PWM resolution

PostPosted: Fri Nov 04, 2016 1:33 pm
by Ingo
I'm working with the esp8266-12 for quite a while now using the Arduino IDE.
The problem I can't solve on my own is the following:

As a part of my project I want to fade an LED but unfortunately it is not possible to fade the LED as dark as I want to. (I don't want to set the maximum brightness lower btw.)
The function I use it the standard one: analogWrite(fading_pin,value) range form 0-1023
If I write 1022, the LED is still too bright
With an Arduino UNO and its 16 bit PWM everything works as expected of cause. That is where I the project started bevor I discovered the esp ;-)

The datasheet of the esp says:
When the PWM frequency is at 1 KHz, the duty ratio will reach 1/22727, and over 14-bit resolution will be achieved at 1KHz refresh rate.

So is it possible to increase the resolution of the PWM or does someone have got another idea using only the esp?

Cheers
Ingo

Re: PWM resolution

PostPosted: Mon Nov 07, 2016 5:17 am
by Ribeiro Santos
See if this help...
https://github.com/StefanBruens/ESP8266_new_pwm (installing is refered in first issue).