欢迎光临散文网 会员登陆 & 注册

【micropython】st7789芯片的ips 1.3和1.69小屏幕,连接esp8266,使用硬件hspi驱动记

2023-08-21 14:22 作者:车科技2020  | 我要投稿

连接图我画了一下,注意的是两种模块貌似驱动电压不同,一个3.3v一个5v的,使用前要注意不要烧掉了。

建议各位在使用前先看看原理图,因为有些模块会在电路板上把cs或者blk背光控制做了上拉或者下拉的。

8266连接tb的ips液晶模块

驱动程序可以参考这里:

https://blog.csdn.net/applebomb/article/details/126964624

https://github.com/devbis/st7789_mpy


esp8266软件和硬件spi对比:

https://blog.csdn.net/darlingqx/article/details/128697286


示例代码:

# ESP 8266 

import machine 

import st7789 

spi = machine.SPI(1, baudrate=40000000, polarity=1) 

display = st7789.ST7789(spi, 240, 240, reset=machine.Pin(5, machine.Pin.OUT), dc=machine.Pin(4, machine.Pin.OUT)) 

display.init()

------------------------------------------

PS:由于esp8266的硬件spi0用于读取flash,所以用户只能使用硬件spi1

【micropython】st7789芯片的ips 1.3和1.69小屏幕,连接esp8266,使用硬件hspi驱动记的评论 (共 条)

分享到微博请遵守国家法律