当前位置:网站首页>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
}
}
边栏推荐
- Analysis of concepts and terms in data warehouse
- 【机器人学习】机械臂抓手matlab运动学与admas动力学分析
- Wechat's crazy use of glide - life cycle learning
- Verilog: blocking assignment and non blocking assignment
- Tp5.0 applet users do not need to log in and directly obtain the user's mobile number.
- Object转String的几种方法
- 国产ERP有没有机会击败SAP ?
- Codeworks 5 questions per day (average 1500) - day 25
- C traps and defects Chapter 3 semantic "traps" 3.6 Boundary Calculation and asymmetric boundary
- Verilog的时间系统任务----$time、$stime、$realtime
猜你喜欢

MYCAT read / write separation configuration

C语言基础知识点汇总

Digital image processing Chapter 10 - image segmentation

微信为之疯狂的Glide使用——之生命周期学习

会议OA之反馈功能

12_ue4进阶_换一个更好看的人物模型

Chapter 09_ Use of performance analysis tools

年内首个“三连跌” 95号汽油回归“8元时代“

从零开始实现lmax-Disruptor队列(六)Disruptor 解决伪共享、消费者优雅停止实现原理解析

Analysis of concepts and terms in data warehouse
随机推荐
shell脚本总结
Summary of common hooks
mysql大表联合查询优化,大事务优化,规避事务超时,锁等待超时与锁表
Server operation management system
基于单片机烟雾温湿度甲醛监测设计
Flask的创建的流程day05-06之创建项目
C陷阱和缺陷 第3章 语义“陷阱” 3.2 非数组的指针
Why did I choose the test when the development salary was high?
Chapter 2 VRP command line
[robot learning] matlab kinematics and ADMAS dynamics analysis of manipulator gripper
Codeworks 5 questions per day (average 1500) - day 25
Verilog的时间系统任务----$time、$stime、$realtime
MYSQL入门与进阶(十四)
Typescript学习(一)
centos安装mysql8
sqlilabs less-32~less-33
Verilog: blocking assignment and non blocking assignment
VASP calculation task error: M_ divide:can not subdivide 8 nodes by 6
C陷阱与缺陷 第3章 语义“陷阱” 3.1 指针与数组
单例模式(饿汉式 懒汉式)