russhughes/st7789_mpy

Not working correctly when DC pin is transmitted as a variable

dobodu opened this issue ยท 1 comments

dobodu commented

Firstly, many thanks for this wornderfull library !

I'd like to indicate a strange behaviour I noticed ๐Ÿ‘

LCD_DC = Pin(8, Pin.OUT)
LCD_CS = Pin(9, Pin.OUT)
LCD_CLK = Pin(10, Pin.OUT)
LCD_DIN = Pin(11, Pin.OUT)
LCD_RST = Pin(12, Pin.OUT)
LCD_BL = Pin(13, Pin.OUT)
TFT_WIDTH = 240
TFT_HEIGHT = 320

Working correctly :

display = st7789.ST7789(spi, width=TFT_WIDTH, height=TFT_HEIGHT, reset=LCD_RST,
cs=LCD_CS, dc=Pin(8, Pin.OUT), backlight=LCD_BL, rotation=1, buffer_size=0, options=0)

Not Working (Black screen)

display = st7789.ST7789(spi, width=TFT_WIDTH, height=TFT_HEIGHT, reset=LCD_RST,
cs=LCD_CS, dc=LCD_DC, backlight=LCD_BL, rotation=1, buffer_size=0, options=0)

Thus, there's a way for making it work as expected but it is strange that this bug applies only to the dc pin !

I'll look into this.