Hi there,
I have a project using a 1602LCD screen without an IC2 module (no room for one). As such I am wiring everything up to the GPIO pins directly and I'm using the Adafruit_CharLCD library. This has provision for controlling the brightness of the LCD through PWM. This is exactly what I need since I intend to store settings such a brightness in a config file and have the user able to edit these values and adjust the brightness, etc. What I'm not sure about is how to wire up the LCD to receive this information. I'm aware that pins 15 and 16 on the LCD are for powering the backlight, and in previous projects I've added a potentiometer here to manually control brightness. But in a software led setup I'm not sure how these pins should be wired. PWM pins are only 3.3v so I'm guessing we don't wire them directly to the GPIO.
I had thought maybe that these would be connected to 5v and GND and then another pin on the LCD would connect to a PWM pin on the RPI, the value of which would then set the brightness. But there's even a specific `set_backlight` method in the Adafruit_CharLCD library which, as far as I can see will set the duty cycle of the pin nominated as the `backlight` pin and hence set the brightness. So I guess my question is - where on the LCD would this ` backlight` pin connect to the LCD?
The library is here: https://github.com/adafruit/Adafruit_Py ... CharLCD.py and the bit about controlling the brightness is quite well documented but it doesn't cover the pin setup. Would therefore appreciate the help of anyone here. Thanks.
I have a project using a 1602LCD screen without an IC2 module (no room for one). As such I am wiring everything up to the GPIO pins directly and I'm using the Adafruit_CharLCD library. This has provision for controlling the brightness of the LCD through PWM. This is exactly what I need since I intend to store settings such a brightness in a config file and have the user able to edit these values and adjust the brightness, etc. What I'm not sure about is how to wire up the LCD to receive this information. I'm aware that pins 15 and 16 on the LCD are for powering the backlight, and in previous projects I've added a potentiometer here to manually control brightness. But in a software led setup I'm not sure how these pins should be wired. PWM pins are only 3.3v so I'm guessing we don't wire them directly to the GPIO.
I had thought maybe that these would be connected to 5v and GND and then another pin on the LCD would connect to a PWM pin on the RPI, the value of which would then set the brightness. But there's even a specific `set_backlight` method in the Adafruit_CharLCD library which, as far as I can see will set the duty cycle of the pin nominated as the `backlight` pin and hence set the brightness. So I guess my question is - where on the LCD would this ` backlight` pin connect to the LCD?
The library is here: https://github.com/adafruit/Adafruit_Py ... CharLCD.py and the bit about controlling the brightness is quite well documented but it doesn't cover the pin setup. Would therefore appreciate the help of anyone here. Thanks.
Statistics: Posted by asprinwizard — Mon Nov 11, 2024 3:45 pm