码迷,mamicode.com
首页 > 其他好文 > 详细

TFT2.0液晶屏幕测试

时间:2018-12-24 19:50:19      阅读:694      评论:0      收藏:0      [点我收藏+]

标签:loop   芯片   fas   bsp   ast   other   raw   printing   include   

型号

尺寸:2.0寸

驱动芯片: ILI9225

分辨率:176*220

SPI

板载3.3v电平转换,直接插在arduino上可用。

 技术分享图片

 

 安装这个库

 

技术分享图片

这个库默认是 uno 板子的,如果换成mega2560 可以直接插上去。

在mega2560板子下测试

 

#include "SPI.h"
#include "TFT_22_ILI9225.h"




#define TFT_RST A4
#define TFT_RS  A3
#define TFT_CS  A5  // SS
#define TFT_SDI A2  // MOSI
#define TFT_CLK A1  // SCK
#define TFT_LED A0   // 0 if wired to +5V directly

// Use hardware SPI (faster - on Uno: 13-SCK, 12-MISO, 11-MOSI)
//TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_LED);
// Use software SPI (slower)
TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_SDI, TFT_CLK, TFT_LED);

const unsigned char gImage_ic[3872] PROGMEM= { /* 0X00,0X01,0XB0,0X00,0XB0,0X00, */
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X03,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X03,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X30,0X00,0X03,0XFF,0XFF,0X80,0X00,0X3C,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XF8,0X00,0X03,
0XFF,0XFF,0X80,0X00,0X7F,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X03,0XF8,0X00,0X07,0XFF,0XFF,0X80,0X00,0X7F,0XC0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFC,0X00,0X07,0XFF,0XFF,0X80,0X00,
0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFE,
0X00,0X07,0XFF,0XFF,0X80,0X01,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X7F,0XFE,0X00,0X1F,0XFF,0XFF,0XF8,0X01,0XFF,0XFE,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0X01,0XFF,0XFF,0XFF,
0XFF,0X03,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,
0XFF,0XFF,0X8F,0XFF,0XFF,0XFF,0XFF,0XE7,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X07,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X03,0XFF,0XFF,0XFF,0XFE,0X00,0X00,0X7F,0XFF,0XFF,0XFF,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFF,0XC0,0X00,0X00,
0X03,0XFF,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,
0XFF,0XFF,0XFE,0X03,0XFF,0XFF,0X80,0X7F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XF0,0X3F,0XFF,0XFF,0XF8,0X1F,0XFF,0XFC,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XC1,0XFF,
0XFC,0X7F,0XFF,0X03,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0XFF,0XFE,0X0F,0XFC,0X00,0X00,0X3F,0XE0,0XFF,0XFE,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFC,0X3F,0XC0,0X00,0X00,0X07,0XF8,
0X7F,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XF0,
0XFE,0X00,0X00,0X00,0X00,0XFE,0X1F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X07,0XFF,0XC3,0XF0,0X00,0X00,0X00,0X00,0X1F,0X87,0XFF,0XC0,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0X87,0XC0,0X00,0X00,0X00,
0X00,0X07,0XE3,0XFF,0XE0,0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0X00,0X1F,
0XFF,0X1F,0X80,0X00,0X00,0X00,0X00,0X01,0XF0,0XFF,0XF0,0X0F,0XC0,0X00,0X00,0X00,
0X00,0X00,0X00,0X07,0XC0,0X3F,0XFC,0X3E,0X00,0X00,0X00,0X00,0X00,0X00,0XFC,0X7F,
0XF8,0X3F,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XF0,0X7F,0XF8,0XF8,0X00,0X00,
0X00,0X00,0X00,0X00,0X3E,0X3F,0XFC,0X7F,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,
0XFC,0XFF,0XF1,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0X1F,0XFF,0XFF,0XF0,0X00,
0X00,0X00,0X00,0X00,0X00,0X1F,0XFF,0XFF,0XE3,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,
0X07,0X8F,0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0XFF,0XC7,0X80,
0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XC7,0XFF,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,
0X00,0X3F,0XFF,0XFF,0X8F,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XE3,0XFF,0XFF,
0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XFF,0X1E,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0XF9,0XFF,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XFE,
0X3C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X78,0XFF,0XFF,0XFE,0X00,0X00,0X00,
0X00,0X00,0X00,0XFF,0XFF,0XFC,0X78,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3C,
0X7F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFC,0XF0,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X1E,0X3F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,
0XFF,0XF9,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X3F,0XFF,0XFF,0X00,
0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XF1,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X07,0X9F,0XFF,0XFF,0X80,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XF3,0X80,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0X8F,0XFF,0XFF,0X80,0X00,0X00,0X00,0X00,
0X03,0XFF,0XFF,0XE7,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XCF,0XFF,
0XFF,0X80,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XC7,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XE7,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XCE,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XE3,0XFF,0XFC,0X00,0X00,0X00,
0X00,0X00,0X00,0X7F,0XFF,0X9E,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0XF3,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0X9C,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X71,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,
0XFF,0X3C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X39,0XFF,0XC0,0X00,
0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0X38,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X38,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFE,0X78,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1C,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,
0X00,0X03,0XFE,0X70,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1C,0XFF,
0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFC,0X70,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X1E,0X7F,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFC,0XE0,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0E,0X7F,0XC0,0X00,0X00,0X00,
0X00,0X00,0X00,0X07,0XFC,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X0F,0X3F,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XF9,0XC0,0X3E,0X00,0X00,0X01,
0XF0,0X07,0XE0,0X00,0X00,0XFC,0X07,0X3F,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,
0XF9,0XC0,0X7F,0XFF,0XFF,0XFF,0XF8,0X0F,0XF0,0X7F,0XFF,0XFE,0X07,0X3F,0XE0,0X00,
0X00,0X00,0X00,0X00,0X00,0X0F,0XF9,0XC0,0XE3,0XFF,0XFF,0XFF,0X1C,0X0E,0X38,0XFF,
0XFF,0X8E,0X07,0X3F,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XF9,0XC0,0XC1,0XFF,
0XFF,0XFE,0X0C,0X0C,0X18,0XFF,0XFF,0X86,0X03,0X9F,0XF0,0X00,0X00,0X00,0X00,0X00,
0X00,0X0F,0XF3,0X80,0XC1,0XFF,0XFF,0XFE,0X0C,0X1C,0X18,0XFF,0XFF,0X07,0X03,0X9F,
0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XF3,0X80,0XC1,0XFF,0XFF,0XFE,0X0C,0X0C,
0X18,0XFF,0XFF,0X86,0X03,0X9F,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XF3,0X80,
0XE3,0XFF,0XFF,0XFF,0X1C,0X0E,0X38,0XFF,0XFF,0XCE,0X03,0X9F,0XFF,0XE0,0X00,0X00,
0X00,0X00,0X01,0XFF,0XF3,0X80,0X7F,0XFF,0XFF,0XFF,0XF8,0X07,0XF0,0X7F,0XFF,0XFC,
0X03,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0X7F,0XFF,0XF3,0X80,0X3F,0XFF,0XFF,0XFF,
0XF0,0X07,0XF0,0X3F,0XFF,0XF8,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,
0XE7,0X00,0X00,0X01,0XFF,0X00,0X00,0X07,0XF0,0X00,0X00,0X00,0X01,0XCF,0XFF,0XFE,
0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,0X00,0X00,0XFF,0X00,0X00,0X07,0XF0,0X00,
0X00,0X00,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,0X00,0X00,
0XFE,0X00,0X00,0X07,0XF8,0X00,0X00,0X00,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,
0XFF,0XFF,0XE7,0X00,0X00,0X00,0XFF,0X00,0X00,0X07,0XFF,0XFF,0XFF,0XFC,0X01,0XCF,
0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,0X00,0X00,0XFF,0X00,0X00,0X07,
0XFF,0XFF,0XFF,0XFE,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,
0X00,0X01,0XFF,0X00,0X00,0X07,0XFF,0XFF,0XFF,0XFE,0X01,0XCF,0XFF,0XFE,0X00,0X00,
0X00,0X00,0XFF,0XFF,0XE7,0X00,0X00,0X01,0XC7,0X00,0X00,0X07,0XFF,0XFF,0XFF,0XFE,
0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,0X00,0X01,0X83,0X00,
0X00,0X07,0XFF,0XFF,0XFF,0XFE,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,
0XE7,0X00,0X00,0X01,0X83,0X00,0X00,0X07,0XFF,0XFF,0XFF,0XFE,0X01,0XCF,0XFF,0XFE,
0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,0X00,0X01,0XC7,0X00,0X00,0X07,0XFF,0XFF,
0XFF,0XFE,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,0X00,0X01,
0XEF,0X00,0X00,0X03,0XFF,0XFF,0XFF,0XFE,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,
0XFF,0XFF,0XE7,0X00,0X00,0X00,0XFE,0X00,0X00,0X00,0X00,0X00,0X01,0XFE,0X01,0XCF,
0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,0X00,0X00,0X38,0X00,0X00,0X00,
0X00,0X00,0X01,0XFE,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0XFF,0XFF,0XE7,0X00,
0X1C,0X00,0X00,0X00,0XF8,0X01,0XC0,0X00,0X01,0XFE,0X01,0XCF,0XFF,0XFE,0X00,0X00,
0X00,0X00,0XFF,0XFF,0XE7,0X00,0X7F,0XFF,0XFF,0XFF,0XFC,0X07,0XFF,0XFF,0XFF,0XFE,
0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0X7F,0XFF,0XF3,0X80,0XFF,0XFF,0XFF,0XFF,
0X8E,0X0F,0XFF,0XFF,0XFF,0XFE,0X01,0XCF,0XFF,0XFE,0X00,0X00,0X00,0X00,0X7F,0XFF,
0XF3,0X80,0XE3,0XFF,0XFF,0XFF,0X06,0X0E,0X3F,0XFF,0XFF,0XFE,0X03,0X8F,0XFE,0X00,
0X00,0X00,0X00,0X00,0X03,0XFF,0XF3,0X80,0XC1,0XFF,0XFF,0XFF,0X06,0X1C,0X1F,0XFF,
0XFF,0XFE,0X03,0X9F,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XF3,0X80,0XC1,0XFF,
0XFF,0XFF,0X06,0X1C,0X1F,0XFF,0XFF,0XFE,0X03,0X9F,0XF0,0X00,0X00,0X00,0X00,0X00,
0X00,0X0F,0XF3,0X80,0XC3,0XFF,0XFF,0XFF,0X8E,0X0C,0X3F,0XFF,0XFF,0XFE,0X03,0X9F,
0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XF9,0XC0,0XFF,0XFF,0XFF,0XFF,0XFC,0X0F,
0X7F,0XFF,0XFF,0XFE,0X03,0X9F,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XF9,0XC0,
0X7F,0XFF,0XFF,0XFF,0XFC,0X07,0XFF,0XFF,0XFF,0XFC,0X07,0X3F,0XE0,0X00,0X00,0X00,
0X00,0X00,0X00,0X0F,0XF9,0XC0,0X3C,0X00,0X00,0X00,0X00,0X03,0XC0,0X00,0X00,0X00,
0X07,0X3F,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XF8,0XE0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X3F,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X07,
0XFC,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0E,0X3F,0XE0,0X00,
0X00,0X00,0X00,0X00,0X00,0X07,0XFC,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X0E,0X7F,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFC,0X70,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1E,0X7F,0XC0,0X00,0X00,0X00,0X00,0X00,
0X00,0X03,0XFE,0X70,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1C,0XFF,
0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFE,0X38,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X3C,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0X38,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X39,0XFF,0XC0,0X00,0X00,0X00,
0X00,0X00,0X00,0X03,0XFF,0X1C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X79,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0X9E,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X71,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,
0XFF,0X8E,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XF3,0XFF,0XFE,0X00,
0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XCF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X01,0XE3,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XC7,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC7,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,
0X03,0XFF,0XFF,0XE7,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XCF,0XFF,
0XFF,0XC0,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XF3,0XC0,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X07,0X8F,0XFF,0XFF,0X80,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XF1,
0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0X1F,0XFF,0XFF,0X80,0X00,0X00,
0X00,0X00,0X01,0XFF,0XFF,0XF8,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,
0X3F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFC,0XF0,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X1E,0X7F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,
0XFF,0XFE,0X78,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3C,0X7F,0XFF,0XFE,0X00,
0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XFE,0X3C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X78,0XFF,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XFF,0X1E,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XF1,0XFF,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,
0X00,0X3F,0XFF,0XFF,0X8F,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XE3,0XFF,0XFF,
0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0XFF,0XC7,0XC0,0X00,0X00,0X00,0X00,
0X00,0X00,0X07,0XC7,0XFF,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XFF,0XFF,
0XE3,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X8F,0XFF,0XFF,0XF0,0X00,0X00,0X00,
0X00,0X00,0X00,0X0F,0XFF,0XFF,0XF1,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0X1F,
0XFE,0X7F,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFE,0X7F,0XF8,0X7C,0X00,0X00,
0X00,0X00,0X00,0X00,0X7E,0X3F,0XFC,0X1F,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X07,
0XF8,0X3F,0XFE,0X3E,0X00,0X00,0X00,0X00,0X00,0X00,0XF8,0X7F,0XF8,0X07,0XC0,0X00,
0X00,0X00,0X00,0X00,0X00,0X03,0XE0,0X1F,0XFF,0X1F,0X80,0X00,0X00,0X00,0X00,0X03,
0XF1,0XFF,0XF0,0X01,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0X80,0X0F,0XFF,0X87,
0XF0,0X00,0X00,0X00,0X00,0X0F,0XC3,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X07,0XFF,0XE1,0XFC,0X00,0X00,0X00,0X00,0X3F,0X07,0XFF,0XC0,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XF0,0X7F,0X00,0X00,0X00,
0X01,0XFE,0X1F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,
0XFF,0XFC,0X3F,0XF0,0X00,0X00,0X1F,0XF8,0X7F,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0X07,0XFF,0X80,0X01,0XFF,0XC1,0XFF,0XFE,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XC0,0XFF,
0XFF,0XFF,0XFE,0X07,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X7F,0XFF,0XF0,0X1F,0XFF,0XFF,0XF0,0X1F,0XFF,0XFF,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFE,0X00,0XFF,0XFE,0X00,0XFF,
0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,
0XFF,0XE0,0X00,0X00,0X07,0XFF,0XFF,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFF,0XFF,0XFE,0X00,0X00,0XFF,0XFF,0XFF,0XFF,0X80,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X07,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XCF,0XFF,0XFF,0XFF,0XFF,0XF1,
0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,
0X81,0XFF,0XFF,0XFF,0XFF,0X01,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X7F,0XFF,0X80,0X1F,0XFF,0XFF,0XF0,0X00,0XFF,0XFE,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0X00,0X01,0XFF,0XFF,
0XC0,0X00,0X7F,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X0F,0XFE,0X00,0X01,0XFF,0XFF,0XC0,0X00,0X7F,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFE,0X00,0X01,0XFF,0XFF,0XC0,0X00,0X3F,0XC0,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFC,0X00,0X01,
0XFF,0XFF,0XC0,0X00,0X3F,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X3C,0X00,0X01,0XFF,0XFF,0XC0,0X00,0X1C,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X08,0X00,0X01,0XFF,0XFF,0XC0,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X01,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,
0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
};

String duration;
unsigned long startTime;
// Setup
void setup() {
  tft.begin();
  Serial.begin(9600);
}

// Loop
void loop() {
  startTime = millis();
  tft.drawBitmap(0, 0, gImage_ic, 176, 176, COLOR_CYAN);
  tft.setBackgroundColor(COLOR_BLACK);
  tft.setFont(Terminal6x8);
  tft.drawText(0, 178, "Printing some random text.", COLOR_WHITE);
  tft.drawText(0, 188, "Another line of nonsense", COLOR_WHITE);
  duration = String(millis()-startTime);
  tft.drawText(0, 198, duration, COLOR_WHITE);
  
  while(true);

}

  

 

TFT2.0液晶屏幕测试

标签:loop   芯片   fas   bsp   ast   other   raw   printing   include   

原文地址:https://www.cnblogs.com/kekeoutlook/p/10170348.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!