Controlling LCD Contrast and Backlight with microcontroller?
Hello, all, and Happy New Year.
I'd like to control the contrast and backlight for an 4x20 LCD display (like the NHD-0420AZ-FL-GBW-33V3) using the programming in the micro-controller, in my case, a STM32L010K4Tx. For instance, I want to control the contrast through a user dialog, or use the backlight to 'flash' the display to call attention to it.
The datasheet of the display's contrast pin just states, "Supply Voltage for Contrast (approx. 0V)". A reference schematic just shows it connected to the wiper of a 10-20K pot connected at the ends to GND and VDD. For the backlight, the current is typically 15 mA at a voltage of 2.8-3.3v.
I think that I could implement micro-controller control using PWM output pins, but I suspect that I'll need some sort of low-pass filtering, to smooth out the pulses, and probably current buffering, with a transistor or MOSFET, to deliver more current than the controller can sink or source.
Has anyone done this type of thing before, and can point me to some datasheets or reference schematics that can get me started on this task?
Thanks so much for your advice and guidance.
-Kevin
