Ok, I'll study more on Voltage Dividers then .
If you want to use a fixed value, you should build something that does the same as that potentiometer.And as said, that means you need to make the voltage divider by using at least 2 resistors.You cannot do the same thing with a single resistor.
I see, so my previous reply would be correct?
I never found the answer to the question so here goes! The LCD boards I have are using a PCF8574 which is connected to the LCD and is controlled with the I2C interface. It also contains a jumper plug on the opposite side of the board from the I2C interface connector. Try connecting a P-Channel BS-170 available from On-Semi or whatever you may have. The drain and source leads connect in place of the plug. Put a 10K resistor in series with the gate then connect it to a PWM output. If you connect it in reverse the LED will remain on, because the internal substrate diode will conduct. This should not damage anything assuming a 5 volt system. Hint: use the tilde character to complement the PWM value you write, that will invert the logic which will again be inverted by the MOSFET. If you do not 0 will be full on, 0xFF will be full off.When the PWM output is LOW the MOSFET will turn on illuminating the backlight LED. If it does not work try reversing the Drain Source leads. I would start with an On-Semi BS170 P-Channel MOSFET or use whatever you may have. For those that want to use a resistor just connect it in place of the plug. The LED cathode on my parts is driven from the +5 supply and the anode is connected to the collector of a transistor on the board. I have not had the time to actually try this but I see no reason it should not work. If the PWM source and the LCD do not have the same ground problems will ensure.
I am always amazed by variable backlight questions.In practice, you might want off or on. Possibly half-bright for night time.You can do this with a single resistor and transistor switch.You can probably achieve a good enough half-bright with 20mA i.e. with a 100R - 150R resistor switched over the 2 pin header.David.
. . .I can't help noticing your name. You obviously must be a younger generation. The 6V6G had a bigger glass envelope.. . .