kopia lustrzana https://github.com/devbis/st7789_mpy
Add documentation for connecting to the rp-pico.
rodzic
3c15f5e5cb
commit
abca386c38
29
README.md
29
README.md
|
@ -18,6 +18,22 @@ firmware by yourself.
|
|||
ESP8266, ESP32, and STM32 ports are supported for now.
|
||||
|
||||
|
||||
Connecting to the Raspberry Pi Pico
|
||||
----------------------------------
|
||||
This repository is a fork of
|
||||
[https://github.com/devbis/st7789_mpy/](https://github.com/devbis/st7789_mpy/)
|
||||
focused on the [Raspberry Pi Pico](https://www.raspberrypi.org/products/raspberry-pi-pico/).
|
||||
|
||||
Here is a firmware for the rp2040 with the st7789 module:
|
||||
[rp2-st7789-20210412.uf2](https://github.com/udifuchs/st7789_mpy/releases/download/rp2-20210412/rp2-st7789-20210412.uf2). It is based on the github version of MicroPython from 2021-04-12.
|
||||
|
||||
Here is a sample wiring for connecting the [Adafruit 1.3 LCD display](https://learn.adafruit.com/adafruit-1-3-and-1-54-240-x-240-wide-angle-tft-lcd-displays) to the Raspberry PI Pico:
|
||||
<p align="center">
|
||||
<img src="adafruit-1.3-display_bb.png" alt="adafruit 1.3 inch display"/>
|
||||
</p>
|
||||
(the source [fritzing]() file is [here](adafruit-1.3-display.fzz).)
|
||||
The "Lite" pin is not connected to make it fit on a mini breadboard.
|
||||
|
||||
Building instruction
|
||||
---------------------
|
||||
|
||||
|
@ -111,6 +127,19 @@ Also, the driver was tested on STM32 board:
|
|||
display = st7789.ST7789(spi, 135, 240, reset=machine.Pin('B3', machine.Pin.OUT), dc=machine.Pin('B6', machine.Pin.OUT))
|
||||
display.init()
|
||||
|
||||
For the rp2040 with the wiring shown above use:
|
||||
|
||||
import machine
|
||||
import st7789
|
||||
|
||||
spi = machine.SPI(1, baudrate=500_000_000, polarity=1)
|
||||
display = st7789.ST7789(
|
||||
spi, 240, 240,
|
||||
reset=machine.Pin(15, machine.Pin.OUT),
|
||||
dc=machine.Pin(14, machine.Pin.OUT),
|
||||
cs=machine.Pin(13, machine.Pin.OUT),
|
||||
)
|
||||
display.init()
|
||||
|
||||
Methods
|
||||
-------------
|
||||
|
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 178 KiB |
Ładowanie…
Reference in New Issue