logo

低功耗模式下彻底关闭屏幕背光问题。

2022-04-27 11:14
J
tens

我在不使用屏幕时,将屏幕关闭背光

############## LCD Shutdown ########################

lcd.init()
lcd.set_backlight(False)
lcd.clear()

在OpenMV运行时可以关闭背光,但是在OpenMV深度睡眠时`pyb.standby()`,单片机失去了对屏幕的控制,背光重新打开。

我尝试了焊接LCD模块上面的跳线焊盘,以及给这个引脚到地平加入了10K的下拉电阻,均失败。

在模块睡眠时,不安装屏幕,背光控制引脚的电平是0V,安装了屏幕,这个脚的电平变成了1-2V左右。

请问如何解决这个问题,否则其携带屏幕的时候低功耗模式就失去了意义。

2022-04-27 20:42
I
网红小智智 星瞳科技

因为这个LCD当时设计的时候没有考虑低功耗的问题。所以需要魔改一下。

65cfbf85-8c6c-4cfe-a857-093872c5488c.png

代码:

主要是设置成推挽输出,不启动芯片内部拉电阻。

import sensor, image, lcd
import time
import pyb

sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.QQVGA2) # Special 128x160 framesize for LCD Shield.
lcd.init() # Initialize the lcd screen.

import time
from pyb import Pin, Timer

lcd_backlight = pin=Pin("P6", Pin.OUT_PP, pull=Pin.PULL_NONE)
lcd_backlight.value(1) #light

for i in range(100):
    lcd.display(sensor.snapshot()) # Take a picture and display the image.

pyb.standby()

while(True):
    lcd.display(sensor.snapshot()) # Take a picture and display the image.