当前位置:网站首页>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
边栏推荐
- 第十八章 使用工作队列管理器(一)
- Detailed summary of FIO test hard disk performance parameters and examples (with source code)
- Example 010: time to show
- MHA High available Cluster for MySQL
- Design a clock frequency division circuit that can be switched arbitrarily
- 剑指 Offer 05. 替换空格
- Stm32--- systick timer
- 实例002:“个税计算” 企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.
- STM32 tutorial triple ADC interleaved sampling
- [three tier architecture and JDBC summary]
猜你喜欢
leetcode - 445. 两数相加 II
STM32 --- NVIC interrupt
STM32 single chip microcomputer - external interrupt
每日一题——输入一个日期,输出它是该年的第几天
DokuWiki deployment notes
MySQL之MHA高可用集群
How to write cover letter?
Count the number of inputs (C language)
Keil use details -- magic wand
Management and use of DokuWiki (supplementary)
随机推荐
關於線性穩壓器的五個設計細節
第十八章 使用工作队列管理器(一)
MySQL之MHA高可用集群
[tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)
List of linked lists
What are the test items of power battery ul2580
Basic information commands and functions of kernel development
MySQL MHA high availability cluster
[three tier architecture]
Take you to understand the working principle of lithium battery protection board
STM32 summary (HAL Library) - DHT11 temperature sensor (intelligent safety assisted driving system)
More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
Soem EtherCAT source code analysis I (data type definition)
实例009:暂停一秒输出
Talk about the function of magnetic beads in circuits
[three tier architecture and JDBC summary]
Let's briefly talk about the chips commonly used in mobile phones - OVP chips
STM32 single chip microcomputer -- volatile keyword
Example 009: pause output for one second
[noi simulation] juice tree (tree DP)