当前位置:网站首页>STC MCU drive 1.8 'TFT SPI screen demonstration example (including data package)
STC MCU drive 1.8 'TFT SPI screen demonstration example (including data package)
2022-07-29 03:10:00 【perseverance52】
STC Single chip drive 1.8‘TFT SPI Screen demonstration example ( Including data package )
- Drive demo

- STC SCM uses :
STC12C5A60S2 1.8‘TFTThe screen is ;Hezhou 1.8‘TFTThe screen
Drive reference package
- originate :http://www.lcdwiki.com/zh/1.8inch_Arduino_SPI_Module_ST7735S_SKU:MAR1801

We should be good at using materials to learn , Although here we use the universal 1.8" tft The screen , But they are the same as their driver chips . On the screen of Hezhou, the official information is only for their development board , This cannot stop our extended use of the screen , We should make good use of the resources at hand to give full play to the maximum value .
- In the package 2 Two driving modes : simulation SPI And hardware SPI Driving mode
http://www.lcdwiki.com/res/Program/Arduino_SPI/1.8inch/Arduino_SPI_ST7735S_MAR1801_V1.0/1.8inch_Arduino_SPI_Module_ST7735S_MAR1801_V1.0.zip

Chinese character modeling software and method
pctolcd2002
Wiring instructions
This example demonstrates the use of hardware SPI Interface , The model of single chip microcomputer used
STC12C5A60S2, BelowRSThe corresponding universal isDCPin
// The default data bus type of this module is SPI
// LCD module Single chip microcomputer
// SDA Pick up P15 //SPI Write the signal
//======================================= LCD control line wiring ==========================================//
// LCD module Single chip microcomputer
// CS Pick up P13 // Chip selection control signal
// RST Pick up P33 // Reset signal
// RS/DC Pick up P12 // data / Command selection control signal
// CLK Pick up P17 //SPI Clock signal
The main program
This example demonstrates the use of hardware SPI Driven display DEMO Program :
Demo_STC12C5A60S2_Hardware_SPI
#include "sys.h"
#include "lcd.h"
#include "gui.h"
#include "test.h"
#include "touch.h"
//STC Single chip microcomputer IO Push pull output setting definition
// Other common C51 The SCM has no such configuration. Please shield the following statement
//sfr P3M1 = 0xB1; //P3M1.n,P3M0.n =00--->Standard, 01--->push-pull
//sfr P3M0 = 0xB2; // =10--->pure input, 11--->open drain
// The main function
void main(void)
{
// Set up STC_12LE5A60S2 Single chip microcomputer P3.2 For push-pull output , Used to control the backlight on and off
// Other common C51 The SCM has no such configuration. Please shield the following statement
//P3M1 &= ~(1<<2),P3M0 |= (1<<2);
// LCD initialization
LCD_Init();
// Cycle through the tests
while(1)
{
main_test(); // Test the main interface
Test_Color(); // Simple screen swiping and filling test
Test_FillRec(); //GUI Rectangle drawing test
Test_Circle(); //GUI Circle test
Test_Triangle(); //GUI Triangle filling test
English_Font_test();// English font sample test
Chinese_Font_test();// Chinese font sample test
Pic_test(); // Pictures show sample tests
Rotate_Test();
// Do not use touch or the module itself does not have touch , Please shield the touch screen below for test
// Touch_Test(); // Touch screen handwriting test
// Need to touch the calibration time , Please shield the touch handwriting test , Open the following touch calibration test item
// Touch_Adjust(); // Touch calibration
}
}
边栏推荐
- 【机器人学习】机械臂抓手matlab运动学与admas动力学分析
- shell脚本总结
- SOA(面向服务架构)是什么?
- C traps and defects Chapter 3 semantic "traps" 3.4 avoid "couple method"
- sqlilabs less-32~less-33
- C语言基础知识点汇总
- Engineering boy: under 20 years old, ordinary but not mediocre
- 数字图像处理 第10章——图像分割
- Multi table (Association) query of SQL query data
- Weekly recommended short videos: how to make product development more effective?
猜你喜欢

Confusion matrix learning notes

Mongodb index (3)

MySQL - the difference between count (field), count (primary key), count (1), count (*)

Hangao database best practice configuration tool Hg_ BP log collection content

Chapter 2 VRP command line

IDEA安装后无法启动

Verilog:阻塞赋值和非阻塞赋值

Plato Farm在Elephant Swap上铸造的ePLATO是什么?为何具备高溢价?

力扣刷题之分数加减运算(每日一题7/27)

【FreeSwitch开发实践】media bug获取通话语音流
随机推荐
C语言程序设计 | 交换二进制数奇偶位(宏实现)
三子棋(玩家+电脑)
navicat新建数据库
扫雷简单版
TP5.0 小程序用户无需登录,直接获取用户手机号。
vasp计算任务报错:M_divide:can not subdivide 8 nodes by 6
美联储再加息,75基点 鲍威尔“放鸽”,美股狂欢
Tp5.0 applet users do not need to log in and directly obtain the user's mobile number.
C陷阱与缺陷 第3章 语义“陷阱” 3.3 作为参数的数组声明
C语言小项目 -- 通讯录(静态版+动态版+文件版)
Wechat's crazy use of glide - life cycle learning
Jinshan cloud returns to Hong Kong for listing: Hong Kong stock rush of Chinese to B cloud manufacturers
C#从网址异步获得json格式的数据
Incremental real-time disaster recovery notes
带你来浅聊一下,单商户功能模块汇总
C traps and defects Chapter 3 semantic "traps" 3.2 pointers to non arrays
STC单片机驱动1.8‘TFT SPI屏幕演示示例(含资料包)
年内首个“三连跌” 95号汽油回归“8元时代“
MySql的安装配置超详细教程与简单的建库建表方法
centos安装mysql8