当前位置:网站首页>STM32 lights up the 1.8-inch screen under Arduino IDE
STM32 lights up the 1.8-inch screen under Arduino IDE
2022-07-05 08:29:00 【Sharing master】
Premise : I've been using it for two days stm32, Plus screen display , You can't use it directly after looking for a lot of bitterness , It's very unpleasant , Now it can be basically lit , recorded
I bought a piece on Taobao before stm32, Always in the midst of ashes , It looks like this , There was a general yesterday arduino make sense of sth. , For details, please refer to another article (https://blog.csdn.net/yyandad/article/details/105659633)
2、 Because the interface of the development board is different from the general order , So pay attention when buying a screen , I bought this screen at that time ,
3、 The order of screen and development board is the same , The screen pins are shown in the following figure
This is the pin of the development board
4、 Pin sequence
SDA/SDI/MOSI(it means LCD_Model Pin_SDA/SDI/MOSI Connect to Arduino_UNO Pin11)
SCL/CLK/SCLK(it means LCD_Model Pin_SCL/CLK/SCLK Connect to Arduino_UNO Pin10)
CS/CE(it means LCD_Model Pin_CS/CE Connect to Arduino_UNO Pin9)
RST/RESET(it means LCD_Model Pin_RST/RESET Connect to Arduino_UNO Pin12)
RS/DC(it means LCD_Model Pin_RS/DC Connect to Arduino_UNO Pin8)
5、 Library functions used
[1]: https://github.com/adafruit/Adafruit-ST7735-Library
There is no way to use the original library function directly , Refer to the following modifications :
Pin definition and configuration
#define TFT_MOSI PB15 // Data out
#define TFT_SCLK PB13 // Clock out
#define TFT_CS PB12
#define TFT_DC PB1
#define TFT_RST PB14`
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
Start point and end point
stay Adafruit_ST77xxx.h Set the starting point in
`protected:
uint8_t _colstart = 2, ///< Some displays need this changed to offset
_rowstart = 1, ///< Some displays need this changed to offset
spiMode = SPI_MODE0; ///< Certain display needs MODE3 instead`
// Set the end point
#define ST7735_TFTHEIGHT_128 130 // for 1.44" display
#define ST7735_TFTHEIGHT_160 161 // for 1.8" and mini display
边栏推荐
- Soem EtherCAT source code analysis I (data type definition)
- Cinq détails de conception du régulateur de tension linéaire
- QEMU STM32 vscode debugging environment configuration
- [tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
- 实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
- 实例010:给人看的时间
- 实例005:三数排序 输入三个整数x,y,z,请把这三个数由小到大输出。
- Stm32--- systick timer
- Stm32--- systick timer
- Slist of linked list
猜你喜欢
剑指 Offer 06. 从尾到头打印链表
[trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
Wifi-802.11 negotiation rate table
On boost circuit
[paper reading] the latest transfer ability in deep learning: a survey in 2022
Sword finger offer 09 Implementing queues with two stacks
Tailq of linked list
Example 009: pause output for one second
NTC thermistor application - temperature measurement
[tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
随机推荐
Design a clock frequency division circuit that can be switched arbitrarily
關於線性穩壓器的五個設計細節
Circleq of linked list
[trio basic from introduction to mastery tutorial 20] trio calculates the arc center and radius through three points of spatial arc
实例007:copy 将一个列表的数据复制到另一个列表中。
Negative pressure generation of buck-boost circuit
Example 005: three numbers sorting input three integers x, y, Z, please output these three numbers from small to large.
STM32---ADC
Zero length array in GNU C
Live555 push RTSP audio and video stream summary (I) cross compilation
How to write cover letter?
MySQL MHA high availability cluster
Soem EtherCAT source code analysis II (list of known configuration information)
Problem solving: interpreter error: no file or directory
Explain task scheduling based on Cortex-M3 in detail (Part 2)
99 multiplication table (C language)
Introduction of air gap, etc
实例006:斐波那契数列
[nas1] (2021cvpr) attentivenas: improving neural architecture search via attentive sampling (unfinished)
[NAS1](2021CVPR)AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)