PWM backlight control RPI
For the NHD-7.0-HDMI-HR-RSXP-CTU Display, it states that it uses PWM to control the backlight brightness. Is there any example code for this for the Raspberry pi 4?
The frequency needs to be 5kHz – 100kHz, can this be achieved, or is it easier to use an Arduino, I preferable want to try and get it working with a rotary encoder.
I also found this on amazon. Would something like this also work?
And just so I understand, if the frequency is set to 5kHz then that's the dimmest the backlight will go, and increasing that to 100kHz would be maximum brightness?
-
Hello Keegan,
Thank you for your interest in Newhaven Displays!
We do not have PWM brightness control example code for Raspberry PI 4.
To learn about RPi4 and PWM, I recommend starting here.
The frequency generator you linked should work as long as the frequency is set between 5kHz and 100kHz.
You can adjust the backlight brightness by adjusting the PWM signal's duty cycle. 100% duty cycle is maximum brightness while 0% duty cycle will turn the backlight OFF.
See our video on PWM for more information.
If you have any questions, don't hesitate to ask.
Best Regards,
Cody Johnson
0
Please sign in to leave a comment.
Comments
1 comment