In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to write Python's TPYBoard-driven LCD5110 script". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to write Python's TPYBoard driver LCD5110 script" can help you solve the problem.
TPYBoard driver LCD5110 of MicroPython
Let's take a look at the meaning of LCD5110 stitches (note: LCD5110 stitches are a little different)
The pins of TPYBoard correspond to the pins of 5110 as follows:
TPYBoard LCD5110 memo
-
# any Pin = > RST Reset pin (0=reset, 1=normal)
# any Pin = > CE Chip Enable (0=listen for input, 1=ignore input)
# any Pin = > DC Data/Command (0=commands, 1=data)
# MOSI = > DIN data flow (Master out, Slave in)
# SCK = > CLK SPI clock
# 3V3 or any Pin = > VCC 3.3V logic voltage (0=off, 1=on)
# any Pin = > LIGHT Light (0=on, 1=off)
# GND = > GND
If you still don't understand, just put the pin number on it.
TPYBoard LCD5110 memo
-
Y10 = > RST Reset pin (0=reset, 1=normal)
Y11 = > CE Chip Enable (0=listen for input, 1=ignore input)
Y9 = > DC Data/Command (0=commands, 1=data)
X8 = > DIN data flow (Master out, Slave in)
X6 = > CLK SPI clock
VCC
Y12 = > LIGHT Light (0=on, 1=off)
GND
After connecting the ok, you can run main.py.
Main.py source code:
Import pybimport upcd8544from machine import SPI,Pin def main (): SPI = pyb.SPI (1) # DIN= > X8 Mosi data flow CLK = > X6-SCK # DIN= > SPI (1). MOSI 'X8' data flow (Master out) Slave in) # CLK = > SPI (1). SCK 'X6' SPI clock RST = pyb.Pin (' Y10') CE = pyb.Pin ('Y11') DC = pyb.Pin (' Y9') LIGHT = pyb.Pin ('Y12') lcd_5110 = upcd8544.PCD8544 (SPI, RST, CE, DC, LIGHT) lcd_5110.lcd_write_string 6) lcd_5110.lcd_write_string ('TPYBoard',12,2) lcd_5110.lcd_write_string (' v102) lcd_5110.lcd_write_string ('v102) 60 name__ 3) lcd_5110.lcd_write_string (' This is a test of LCD5110',0,4) if _ _ name__ = ='_ main__':main () this is the end of the introduction to "how to write a LCD5110 script for Python's TPYBoard driver". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.