Hello, I have LCD screen for the Arduino Uno that I am trying to color control. I read online that I can control the brightness of the green and blue backlights using any of the PWM pins. However, I was wondering if it was possible to achieve the same effect with a regular analog pin. It seems like it should be possible to me because from what I understand, PWM pins are basically digital pins builds to imitate analog pins. However, after some experimentation, it seems like it might not be possible.
analog pins can READ analog values, in addition to doing anything that a normal digital pin can do.
This has nothing to do with PWM output, which can only be done on certain pins. (just like how you can only read analog values with some pins, and how there are certain pins you need to use for I2C or SPI).
It's unfortunate that Arduino has analogRead() and analogWrite() which do almost completely different things - the names imply they're similar, when they're really not.
Of course, you could do software PWM using "blink without delay". I have made 20 KHz outputs doing that.
500 Hz would not be pressing the uC's performance very much.