A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By eriksl
#22898 I completely agree with your point, I didn't see the huge spelling mistake until you pointed it out, even though I am always very strict on spelling. I can't see a way to change the subject of the topic though.

The only document I found that refers to SD cards says it's "not yet implemented". It may be outdated in the meantime, we simply can't know without any information. I have no interest in adding SD card connectivity though, because it will use the same pins as the SPI-flash, so you wouldn't be able to use the "normal" flash, which makes things complicated.

The PWM is a software implementation (though quite fast and also at least frequency- maybe also phase-correct, if we're supposed to believe the documentation). The older implementation was only 8 bits (and therefore, imho, unfit for lighting control), the newer implementation offers a variable resolution; the higher the frequency, the lower the resolution. Kind of comparable to changing the TOP-register on ATmel microcontrollers. I've calculated that setting the frequency to 330 Hz, the resolution will be a theoretical 16 bits (at least the "full on" value will be 65535, I can't garantuee that all values from 0-65535 will give a different duty).

Also please follow the link to the new topic (two problems solved in one go...)

And your signature is annoying.
User avatar
By tytower
#22907 Ok Good . The Topic can usually be changed by editing the first post if you are the first poster.
The signature - its meant to wrankle the reader to leave a lasting impression but you can turn signatures off in the profile settings if you want to . Its my personal response to the erosion of my freedoms in this and other British based countries and is not likely to be implemented but it seeps into the psyche of the younger members of forums and may help in the long run . Maybe you are a Public Servant.

So you seem to be saying that somehow you get the equivalent of 16 bit accuracy from a 10 bit ADC . Do I understand that right . If so, I want to go study and use your code , that's why I ask.
User avatar
By eriksl
#22916 Probably, but this forum doesn't allow you to edit posts...

Read carefully, I said Espressif implemented it different now. There is no hardware support for PWM. You will have to implement it in software one way or another. Their first implementation was limited to 8 bits, now the resolution is variable.
User avatar
By tytower
#22939 Eh ? Each post has two icons top right . Click on first and a sub menu comes up ,choose "edit post" . Go back to first post and you can edit the title if you wish.

On PWM each declared PWM pin can produce a pulse at a rate selected by you based on a scale of 0 to 1023 , being 0 to 100% power on as I understand it . It is based on a 10 bit register in the ESP but maybe I have this wrong?.
The wiki has
"
PWM analogWrite(pin, value) enables software PWM on the given pin. PWM may be used on pins 0 to 15. Call analogWrite(pin, 0) to disable PWM on the pin. value may be in range from 0 to 1023. 0 to 255 is normal on an arduino board as its an 8bit ADC but ESP8266 is 10 bit so 1023 is full duty cycle.


"software PWM" is what I don't understand . Can you explain that for me . Does the pulse get calculated by the ADC and transfered to the selected pin?

Also please follow the link to the new topic (two problems solved in one go...)

I didn't see a link ?

BTW I am not having a shot at you . I use PWM to drive motors on my solar tracking device and am trying to convert it to wifi from my phone so my interest is piqued.