I am directly driving a little screen from the pico and have created a crude LCD driver using the PIO
Problem is, within Thonny editor when you press "stop" it resets the pico but the enable pins stay in their current state and this causes damage to the screen (if enabled and there is no LCD signal it makes a horrible beached image which can stick).
If I add some pin output low to the boot.py file it stops this issue, is this considered bad practice or is it perfectly ok?
this is what my boot.py is (its just copied from the main.py at the moment)
Code: Select all
from machine import Pin, PWM
DISP = 4
DE = 5
BACKLIGHT = 28
disp = Pin(DISP, Pin.OUT, 1)
disp.off()
de = Pin(DE, Pin.OUT, 0)
de.off()
backlight = PWM(Pin(BACKLIGHT))
backlight.freq(500)
backlight.duty_u16(0)