Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[IDEA] [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Idea: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver
10th Oct, 2018, 11:02 PM
Post: #11
newto Offline
Registered
Posts: 1
Joined: Oct 2018
Reputation: 0
[Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver
I found this post and have made a few improvements/modifications

The version of the Waveshare 7" I have had a capacitor to ground just below the removed resistor (see attached photo) connected to the Enable pin of the the LED controller, I removed this as well to get a proper PWM signal to the enable pin, otherwise it becomes a triangle wave. Also, if you're using a raspberry pi, you don't need to add another ground, the panel is already grounded through the USB and HDMI cables.



Also, I used pigpio instead of wiring pi, gpioHardwarePWM(18, 1000, 1000000) means to use BCM pin 18 (pin 12 on the PI), at 1000Hz (from the 4103 manual), and 1000000 is 100% duty factor, and 500000 would be a 50% duty factor.

The attached code cycles back and forth between 100% on and 50% on, I was using it to test power consumption changes.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>

#include <pigpio.h>


int main(int argc, char *argv[])
{

    if (gpioInitialise()<0) return 1;

    for (int h = 0; h<30; h++){
        printf("%d",gpioHardwarePWM(18, 1000, 1000000));
        printf("\n%d\n",1000000);
        gpioDelay(5000000);
        printf("%d",gpioHardwarePWM(18, 1000, 500000));
        printf("\n%d\n",500000);
        gpioDelay(5000000);
    }
    gpioTerminate();
}
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Messages In This Thread
[Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - Lucatze - 3rd Feb, 2017, 08:54 AM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - rikardo1979 - 3rd Feb, 2017, 05:23 PM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - f1vefour - 8th Feb, 2017, 08:25 AM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - Lucatze - 8th Feb, 2017, 09:02 AM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - tridy - 10th Mar, 2017, 09:24 PM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - Yaodgelo - 7th Oct, 2017, 05:52 AM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - tmat256 - 18th Oct, 2017, 10:45 AM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - Desy166 - 20th Nov, 2017, 10:25 PM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - lpt2007 - 5th Jul, 2018, 08:15 AM
Review - johnsonberry - 21st Sep, 2018, 08:47 PM
[Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - newto - 10th Oct, 2018 11:02 PM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - Skywatch - 11th Oct, 2018, 05:41 PM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - Nachteule - 11th Oct, 2018, 10:05 PM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - hoeb - 5th Jan, 2019, 07:26 AM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - Fistandantilus - 31st Mar, 2019, 11:22 PM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - Fistandantilus - 3rd Apr, 2019, 05:22 AM
RE: [Tut] new lcd MPI7006 - fox_ - 29th Oct, 2021, 07:13 PM
RE: [Tut] How to turn off Backlight of a Waveshare 7" HDMI LCD using GPIO and screensaver - charlotte - 27th Nov, 2024, 08:26 PM

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 5th Jun, 2025, 02:00 AM Powered By MyBB, © 2002-2025 MyBB Group.