Bananian

LCD-backlight PWM control

3 2941
T.S.  
I got my LCD running fine last time [1] and thinking about controlling the backlight. Not only On and Off.
Searched the web I found this [2] and [3]. It is very easy based on this work and would like to sharel.

Step1:
Edit script.bin the fex-tools. Add this lines at the end:
  1. [pwm0_para]
  2. pwm_used = 1
  3. pwm_period = 10000
  4. pwm_duty_percent = 60
Copy the Code
Step2:
add this line at the end of /etc/modules
  1. pwm-sunxi
Copy the Code
Step3:
  1. reboot
Copy the Code
Control the backlight now with
  1. echo 100 > /sys/class/pwm-sunxi/pwm0/duty_percent
Copy the Code
or
  1. echo 10 > /sys/class/pwm-sunxi/pwm0/duty_percent
Copy the Code
Remember 100 means dark, 1 means light, 0 flickers.

[1]http://forum.lemaker.org/thread-10712-1-1-bananian_with_5_quot_lcd.html
[2]https://www.olimex.com/wiki/How_to_add_pwm
[3]https://groups.google.com/forum/#!msg/linux-sunxi/I81t60tLgcA/3z26wqyrPaAJ
Note: The author has been banned or deleted.

Working very well, thanks a lot.

I did it not on my own bPIs, but an MID A13 tablet and working link a sharme

Edited by masta_k74 at May 19, 2016 10:11

Thank you! It works fine!
I'm using BPi M1, Armbian Linux and a LTN101NT06 - Netbook - Display connected to CON2. Using this "HowTo"

You have to log in before you can reply Login | Sign Up

Points Rules