Exactly what I needed, Thank you !
Side note : It seems "Justin Berken" use the wrong symbol on his diagram (p-channel instead of n-channel), but judging from the datasheet of his MOSFET, it's a n-channel as my 2N7000.
Despite posts on this thread, I believe that the HD44780 positive backlight pin comes with an LED preattached internally on the board. The datasheet states to just put 5V on the line, so I'm pretty sure there is a resistor there already protecting the LED backlight. However, to be safe, it doesn't hurt to put a 150 ohm resistor.
Is that really a satisfactory reason to drag up such an old thread?
Some LCDs have a resistor inline with the backlight but some don't. That depends completely on the LCD and looking at the specific datasheet for your LCD will tell you if it does or not.
This thread was also discussing pulse width modulation of a pin to dim the backlight, not simply powering it.
Is that really a satisfactory reason to drag up such an old thread?
It's irrelevant as well as you have pointed out. Here's more.
Despite posts on this thread, I believe that the HD44780 positive backlight pin comes with an LED preattached internally on the board.
The Hitachi HD44780 LCD controller has been around for more than two decades. The controller used (and still uses) a 14 pin interface with no provisions for a backlight.
Early LED modules that had backlights used electroluminescent panels that required >100 volts to operate. The connections were at the end of the display, not on adjacent pins 15 and 16 as on current modules with LED backlights.
How to deal with the backlight is determined by the manufacturer of the pc board on which the LCD panel and LCD controller is also mounted. The LED backlight is completely independent of the LCD and it's controller.
No... eliminate R1 it will limit the current flow through the Mosfet as it is in series with the source lead, Ground the source and all should work fine except the analogwrite() function will be reversed, I believe, where 255 would be off and 0 would be fully on and you might well SLOWLY reduce the 150 ohm resistor value (NO Pot will work well here) if needed start with a 4700 ohm in parallel with the 150 ohm, the resultant resistance will be about 110 ohms (113.7 ohms) but only if the brightness of the back-light isn't workable in normal room lighting. Most LCD's aren't of the daylight viewing types. IMO