├── Document ├── LCDWIKI SPI lib Manual.pdf ├── LCDWIKI SPI lib Requirements.pdf └── LCDWIKI SPI lib Supported display modules&controllers.pdf ├── README.txt ├── LICENSE ├── mcu_spi_magic.h ├── Example ├── Example_01_clear_screen │ └── clear_Screen │ │ └── clear_Screen.ino ├── Example_03_display_string │ └── display_string │ │ └── display_string.ino ├── Example_06_read_piexl │ └── read_piexl │ │ └── read_piexl.ino ├── Example_04_display_picture │ └── display_picture │ │ └── display_picture.ino ├── Example_05_display_scroll │ └── display_scroll │ │ ├── display_scroll.ino │ │ └── font.h └── Example_02_colligate_test │ └── colligate_test │ └── colligate_test.ino ├── LCDWIKI_SPI.h ├── lcd_spi_registers.h └── LCDWIKI_SPI.cpp /Document/LCDWIKI SPI lib Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdwiki/LCDWIKI_SPI/HEAD/Document/LCDWIKI SPI lib Manual.pdf -------------------------------------------------------------------------------- /Document/LCDWIKI SPI lib Requirements.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdwiki/LCDWIKI_SPI/HEAD/Document/LCDWIKI SPI lib Requirements.pdf -------------------------------------------------------------------------------- /Document/LCDWIKI SPI lib Supported display modules&controllers.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdwiki/LCDWIKI_SPI/HEAD/Document/LCDWIKI SPI lib Supported display modules&controllers.pdf -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | This is a library for the SPI lcd display. 2 | This library support these lcd controller: 3 | ILI9325 4 | ILI9328 5 | ILI9341 6 | HX8357D 7 | HX8347G 8 | HX8347I 9 | ILI9486 10 | ST7735S 11 | SSD1283A 12 | 13 | Check out the file of LCDWIKI SPI lib Requirements for our tutorials and wiring diagrams. 14 | 15 | These displays use spi bus to communicate, 5 pins are required to interface (MISO is no need). 16 | 17 | Basic functionally of this library was origianlly based on the demo-code of Adafruit GFX lib and Adafruit SPITFT lib. 18 | 19 | MIT license, all text above must be included in any redistribution 20 | 21 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder LCDWIKI_SPI. Check that the LCDWIKI_SPI folder contains LCDWIKI_SPI.cpp and LCDWIKI_SPI.h 22 | 23 | Place the LCDWIKI_SPI library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE 24 | 25 | Also requires the LCDWIKI_GUI library for Arduino. 26 | https://github.com/lcdwiki/LCDWIKI_gui -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 lcdwiki 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mcu_spi_magic.h: -------------------------------------------------------------------------------- 1 | #ifndef _mcu_spi_magic_ 2 | #define _mcu_spi_magic_ 3 | 4 | //#define write8(d) {Spi_Write(d);} 5 | #define write8(d) Spi_Write(d) 6 | #define read8(dst) { dst=Spi_Read();} 7 | #define setWriteDir() 8 | #define setReadDir() 9 | 10 | #define RD_ACTIVE 0 11 | #define RD_IDLE 0 12 | #define WR_ACTIVE 0 13 | #define WR_IDLE 0 14 | #if defined(__AVR__) 15 | #define CD_COMMAND *spicdPort &= spicdPinUnset 16 | #define CD_DATA *spicdPort |= spicdPinSet 17 | #define CS_ACTIVE *spicsPort &= spicsPinUnset 18 | #define CS_IDLE *spicsPort |= spicsPinSet 19 | #define MISO_STATE(x) { x = *spimisoPort&spimisoPinSet;} 20 | #define MOSI_LOW *spimosiPort &= spimosiPinUnset 21 | #define MOSI_HIGH *spimosiPort |= spimosiPinSet 22 | #define CLK_LOW *spiclkPort &= spiclkPinUnset 23 | #define CLK_HIGH *spiclkPort |= spiclkPinSet 24 | 25 | #elif defined(ARDUINO_ARCH_ESP8266) 26 | #define CD_COMMAND (digitalWrite(_cd,LOW)) 27 | #define CD_DATA (digitalWrite(_cd,HIGH)) 28 | #define CS_ACTIVE (digitalWrite(_cs,LOW)) 29 | #define CS_IDLE (digitalWrite(_cs,HIGH)) 30 | #define MISO_STATE(x) { x = digitalRead(_miso);} 31 | #define MOSI_LOW (digitalWrite(_mosi,LOW)) 32 | #define MOSI_HIGH (digitalWrite(_mosi,HIGH)) 33 | #define CLK_LOW (digitalWrite(_clk,LOW)) 34 | #define CLK_HIGH (digitalWrite(_clk,HIGH)) 35 | #endif 36 | 37 | #define WR_STROBE { } 38 | #define RD_STROBE { } 39 | 40 | //#define write16(d) { uint8_t h = (d)>>8, l = (d&0xFF); write8(h); write8(l); } 41 | #define write16(d) write8(d>>8); write8(d) 42 | #define read16(dst) { uint8_t hi; read8(hi); read8(dst); dst |= (hi << 8); } 43 | //#define writeCmd8(x) { CD_COMMAND; write8(x); CD_DATA;} 44 | #define writeCmd8(x) CD_COMMAND; write8(x) 45 | //#define writeData8(x) { write8(x) } 46 | #define writeData8(x) CD_DATA; write8(x) 47 | 48 | //#define writeCmd16(x) { CD_COMMAND; write16(x); CD_DATA; } 49 | //#define writeData16(x) { write16(x)} 50 | 51 | #define writeCmd16(x) CD_COMMAND; write16(x) 52 | #define writeData16(x) CD_DATA; write16(x) 53 | #define writeData18(x) CD_DATA; write8((x>>8)&0xF8);write8((x>>3)&0xFC);write8(x<<3) 54 | 55 | 56 | //#define writeCmdData8(a, d) { CD_COMMAND; write8(a); CD_DATA; write8(d); } 57 | //#define writeCmdData16(a, d) { \ 58 | //uint8_t hi, lo; \ 59 | // hi = (a) >> 8; lo = (a); CD_COMMAND; write8(hi); write8(lo); \ 60 | // hi = (d) >> 8; lo = (d); CD_DATA ; write8(hi); write8(lo); } 61 | 62 | #define writeCmdData8(a, d) CD_COMMAND; write8(a); CD_DATA; write8(d) 63 | #define writeCmdData16(a, d) CD_COMMAND; write8(a>>8); write8(a); CD_DATA; write8(d>>8); write8(d) 64 | 65 | #endif // _mcu_spi_magic_ 66 | -------------------------------------------------------------------------------- /Example/Example_01_clear_screen/clear_Screen/clear_Screen.ino: -------------------------------------------------------------------------------- 1 | // IMPORTANT: LCDWIKI_SPI LIBRARY MUST BE SPECIFICALLY 2 | // CONFIGURED FOR EITHER THE TFT SHIELD OR THE BREAKOUT BOARD. 3 | 4 | //This program is a demo of clearing screen to display black,white,red,green,blue. 5 | 6 | //Set the pins to the correct ones for your development shield or breakout board. 7 | //when using the BREAKOUT BOARD only and using these software spi lines to the LCD, 8 | //there is no MISO pin and You can use any free pin to define the pins,for example 9 | //pin usage as follow: 10 | // CS CD RST MOSI MISO CLK LED 11 | //Arduino Uno A5 A3 A4 A2 NONE A1 A3 12 | //Arduino Mega A5 A3 A4 A2 NONE A1 A3 13 | 14 | //when using the BREAKOUT BOARD only and using these hardware spi lines to the LCD, 15 | //there is no MISO pin 16 | //the MOSI pin and CLK pin is defined by the system and can't be modified. 17 | //other pins can be defined by youself,for example 18 | //pin usage as follow: 19 | // CS CD RST MOSI MISO CLK LED 20 | //Arduino Uno 10 9 8 11 NONE 13 A3 21 | //Arduino Mega 10 9 8 51 NONE 52 A3 22 | 23 | //Remember to set the pins to suit your display module! 24 | 25 | #include //Core graphics library 26 | #include //Hardware-specific library 27 | 28 | //the definiens of software spi mode as follow: 29 | //if the IC model is known or the modules is unreadable,you can use this constructed function 30 | //LCDWIKI_SPI mylcd(ST7735S,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 31 | //LCDWIKI_SPI mylcd(SSD1283A,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 32 | 33 | //if the IC model is not known and the modules is readable,you can use this constructed function 34 | //LCDWIKI_SPI mylcd(160,128,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 35 | //LCDWIKI_SPI mylcd(130,130,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 36 | 37 | //the definiens of hardware spi mode as follow: 38 | //if the IC model is known or the modules is unreadable,you can use this constructed function 39 | //LCDWIKI_SPI mylcd(ST7735S,10,9,8,A3); //hardware spi,cs,cd,reset 40 | //LCDWIKI_SPI mylcd(SSD1283A,10,9,8,A3); //hardware spi,cs,cd,reset 41 | 42 | //if the IC model is not known and the modules is readable,you can use this constructed function 43 | //LCDWIKI_SPI mylcd(160,128,10,9,8,A3); //hardware spi,cs,cd,reset 44 | //LCDWIKI_SPI mylcd(130,130,10,9,8,A3); //hardware spi,cs,cd,reset 45 | 46 | void setup() 47 | { 48 | mylcd.Init_LCD(); 49 | mylcd.Fill_Screen(0x0000); 50 | mylcd.Fill_Screen(0xFFFF); 51 | } 52 | 53 | void loop() 54 | { 55 | mylcd.Fill_Screen(0,0,0); 56 | mylcd.Fill_Screen(255,255,255); 57 | mylcd.Fill_Screen(255,0,0); 58 | mylcd.Fill_Screen(0,255,0); 59 | mylcd.Fill_Screen(0,0,255); 60 | delay(3000); 61 | mylcd.Fill_Screen(0,0,0); 62 | delay(1000); 63 | mylcd.Fill_Screen(255,255,255); 64 | delay(1000); 65 | mylcd.Fill_Screen(0xF800); 66 | delay(1000); 67 | mylcd.Fill_Screen(0x07E0); 68 | delay(1000); 69 | mylcd.Fill_Screen(0x001F); 70 | delay(3000); 71 | } 72 | -------------------------------------------------------------------------------- /Example/Example_03_display_string/display_string/display_string.ino: -------------------------------------------------------------------------------- 1 | // IMPORTANT: LCDWIKI_SPI LIBRARY MUST BE SPECIFICALLY 2 | // CONFIGURED FOR EITHER THE TFT SHIELD OR THE BREAKOUT BOARD. 3 | 4 | //This program is a demo of displaying string 5 | 6 | //Set the pins to the correct ones for your development shield or breakout board. 7 | //when using the BREAKOUT BOARD only and using these software spi lines to the LCD, 8 | //there is no MISO pin and You can use any free pin to define the pins,for example 9 | //pin usage as follow: 10 | // CS CD RST MOSI MISO CLK LED 11 | //Arduino Uno A5 A3 A4 A2 NONE A1 A3 12 | //Arduino Mega A5 A3 A4 A2 NONE A1 A3 13 | 14 | //when using the BREAKOUT BOARD only and using these hardware spi lines to the LCD, 15 | //there is no MISO pin 16 | //the MOSI pin and CLK pin is defined by the system and can't be modified. 17 | //other pins can be defined by youself,for example 18 | //pin usage as follow: 19 | // CS CD RST MOSI MISO CLK LED 20 | //Arduino Uno 10 9 8 11 NONE 13 A3 21 | //Arduino Mega 10 9 8 51 NONE 52 A3 22 | 23 | //Remember to set the pins to suit your display module! 24 | 25 | #include //Core graphics library 26 | #include //Hardware-specific library 27 | 28 | //the definiens of software spi mode as follow: 29 | //if the IC model is known or the modules is unreadable,you can use this constructed function 30 | //LCDWIKI_SPI mylcd(ST7735S,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 31 | //LCDWIKI_SPI mylcd(SSD1283A,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 32 | 33 | //if the IC model is not known and the modules is readable,you can use this constructed function 34 | //LCDWIKI_SPI mylcd(160,128,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 35 | //LCDWIKI_SPI mylcd(130,130,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 36 | 37 | //the definiens of hardware spi mode as follow: 38 | //if the IC model is known or the modules is unreadable,you can use this constructed function 39 | //LCDWIKI_SPI mylcd(ST7735S,10,9,8,A3); //hardware spi,cs,cd,reset 40 | //LCDWIKI_SPI mylcd(SSD1283A,10,9,8,A3); //hardware spi,cs,cd,reset 41 | 42 | //if the IC model is not known and the modules is readable,you can use this constructed function 43 | //LCDWIKI_SPI mylcd(160,128,10,9,8,A3); //hardware spi,cs,cd,reset 44 | //LCDWIKI_SPI mylcd(130,130,10,9,8,A3); //hardware spi,cs,cd,reset 45 | 46 | #define BLACK 0x0000 47 | #define BLUE 0x001F 48 | #define RED 0xF800 49 | #define GREEN 0x07E0 50 | #define CYAN 0x07FF 51 | #define MAGENTA 0xF81F 52 | #define YELLOW 0xFFE0 53 | #define WHITE 0xFFFF 54 | 55 | void setup() 56 | { 57 | mylcd.Init_LCD(); 58 | mylcd.Fill_Screen(BLACK); 59 | } 60 | 61 | void loop() 62 | { 63 | mylcd.Set_Text_Mode(0); 64 | 65 | mylcd.Fill_Screen(0x0000); 66 | mylcd.Set_Text_colour(RED); 67 | mylcd.Set_Text_Back_colour(BLACK); 68 | mylcd.Set_Text_Size(1); 69 | mylcd.Print_String("Hello World!", 0, 0); 70 | mylcd.Print_Number_Float(01234.56789, 2, 0, 8, '.', 0, ' '); 71 | mylcd.Print_Number_Int(0xDEADBEF, 0, 16, 0, ' ',16); 72 | 73 | mylcd.Set_Text_colour(GREEN); 74 | mylcd.Set_Text_Size(2); 75 | mylcd.Print_String("Hello", 0, 32); 76 | mylcd.Print_Number_Float(01234.56789, 2, 0, 48, '.', 0, ' '); 77 | mylcd.Print_Number_Int(0xDEADBEF, 0, 64, 0, ' ',16); 78 | 79 | mylcd.Set_Text_colour(BLUE); 80 | mylcd.Set_Text_Size(3); 81 | mylcd.Print_String("Hello", 0, 86); 82 | mylcd.Print_Number_Float(01234.56789, 2, 0, 110, '.', 0, ' '); 83 | mylcd.Print_Number_Int(0xDEADBEF, 0, 134, 0, ' ',16); 84 | 85 | delay(3000); 86 | } 87 | -------------------------------------------------------------------------------- /LCDWIKI_SPI.h: -------------------------------------------------------------------------------- 1 | // Lcdwiki GUI library with init code from Rossum 2 | // MIT license 3 | 4 | #ifndef _LCDWIKI_SPI_H_ 5 | #define _LCDWIKI_SPI_H_ 6 | 7 | #if ARDUINO >= 100 8 | #include "Arduino.h" 9 | #else 10 | #include "WProgram.h" 11 | #endif 12 | 13 | #ifdef __AVR__ 14 | #include 15 | #elif defined(ESP8266) 16 | #include 17 | #else 18 | #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) 19 | #define pgm_read_word(addr) (*(const unsigned short *)(addr)) 20 | #endif 21 | #include "LCDWIKI_GUI.h" 22 | 23 | // LCD controller chip identifiers 24 | #define ID_932X 0 25 | #define ID_7575 1 26 | #define ID_9341 2 27 | #define ID_HX8357D 3 28 | #define ID_4535 4 29 | #define ID_9486 5 30 | #define ID_7735 6 31 | #define ID_1283A 7 32 | #define ID_1106 8 33 | #define ID_7735_128 9 34 | #define ID_9488 10 35 | #define ID_9225 11 36 | #define ID_UNKNOWN 0xFF 37 | 38 | //LCD controller chip mode identifiers 39 | #define ILI9325 0 40 | #define ILI9328 1 41 | #define ILI9341 2 42 | #define HX8357D 3 43 | #define HX8347G 4 44 | #define HX8347I 5 45 | #define ILI9486 6 46 | #define ST7735S 7 47 | #define SSD1283A 8 48 | #define SH1106 9 49 | #define ST7735S128 10 50 | #define ILI9488 11 51 | #define ILI9488_18 12 52 | #define ILI9225 13 53 | 54 | 55 | typedef struct _lcd_info 56 | { 57 | uint16_t lcd_id; 58 | int16_t lcd_wid; 59 | int16_t lcd_heg; 60 | }lcd_info; 61 | 62 | class LCDWIKI_SPI:public LCDWIKI_GUI 63 | { 64 | public: 65 | LCDWIKI_SPI(uint16_t model,int8_t cs, int8_t cd, int8_t miso, int8_t mosi, int8_t reset, int8_t clk, int8_t led); 66 | LCDWIKI_SPI(uint16_t model,int8_t cs, int8_t cd, int8_t reset,int8_t led); 67 | LCDWIKI_SPI(int16_t wid,int16_t heg,int8_t cs, int8_t cd, int8_t miso, int8_t mosi, int8_t reset, int8_t clk,int8_t led); 68 | LCDWIKI_SPI(int16_t wid,int16_t heg,int8_t cs, int8_t cd, int8_t reset,int8_t led); 69 | void Init_LCD(void); 70 | void reset(void); 71 | void start(uint16_t ID); 72 | void Draw_Pixe(int16_t x, int16_t y, uint16_t color); 73 | void Spi_Write(uint8_t data); 74 | uint8_t Spi_Read(void); 75 | void Write_Cmd(uint16_t cmd); 76 | void Write_Data(uint16_t data); 77 | void Write_Cmd_Data(uint16_t cmd, uint16_t data); 78 | void init_table8(const void *table, int16_t size); 79 | void init_table16(const void *table, int16_t size); 80 | void Push_Command(uint8_t cmd, uint8_t *block, int8_t N); 81 | uint16_t Color_To_565(uint8_t r, uint8_t g, uint8_t b); 82 | uint16_t Read_ID(void); 83 | void Fill_Rect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); 84 | void Set_Rotation(uint8_t r); 85 | uint8_t Get_Rotation(void) const; 86 | void Invert_Display(boolean i); 87 | void SH1106_Display(void); 88 | void SH1106_Draw_Bitmap(uint8_t x,uint8_t y,uint8_t width, uint8_t height, uint8_t *BMP, uint8_t mode); 89 | uint16_t Read_Reg(uint16_t reg, int8_t index); 90 | int16_t Read_GRAM(int16_t x, int16_t y, uint16_t *block, int16_t w, int16_t h); 91 | void Set_Addr_Window(int16_t x1, int16_t y1, int16_t x2, int16_t y2); 92 | void Push_Any_Color(uint16_t * block, int16_t n, bool first, uint8_t flags); 93 | void Push_Any_Color(uint8_t * block, int16_t n, bool first, uint8_t flags); 94 | void Vert_Scroll(int16_t top, int16_t scrollines, int16_t offset); 95 | int16_t Get_Height(void) const; 96 | int16_t Get_Width(void) const; 97 | void Set_LR(void); 98 | void Led_control(boolean i); 99 | 100 | protected: 101 | uint8_t xoffset,yoffset; 102 | uint16_t WIDTH,HEIGHT,width, height, rotation,lcd_driver,lcd_model; 103 | boolean hw_spi; 104 | private: 105 | uint16_t XC,YC,CC,RC,SC1,SC2,MD,VL,R24BIT,MODEL; 106 | 107 | volatile uint8_t *spicsPort, *spicdPort, *spimisoPort , *spimosiPort, *spiclkPort; 108 | uint8_t spicsPinSet, spicdPinSet ,spimisoPinSet , spimosiPinSet , spiclkPinSet, 109 | spicsPinUnset, spicdPinUnset, spimisoPinUnset, spimosiPinUnset,spiclkPinUnset; 110 | int8_t _cs,_cd,_miso,_mosi,_clk,_reset,_led; 111 | }; 112 | #endif 113 | -------------------------------------------------------------------------------- /Example/Example_06_read_piexl/read_piexl/read_piexl.ino: -------------------------------------------------------------------------------- 1 | // IMPORTANT: LCDWIKI_SPI LIBRARY MUST BE SPECIFICALLY 2 | // CONFIGURED FOR EITHER THE TFT SHIELD OR THE BREAKOUT BOARD. 3 | 4 | //This program is a demo of how to read color value from GRAM. 5 | 6 | //Set the pins to the correct ones for your development shield or breakout board. 7 | //when using the BREAKOUT BOARD only and using these software spi lines to the LCD, 8 | //there is no MISO pin and You can use any free pin to define the pins,for example 9 | //pin usage as follow: 10 | // CS CD RST MOSI MISO CLK LED 11 | //Arduino Uno A5 A3 A4 A2 NONE A1 A3 12 | //Arduino Mega A5 A3 A4 A2 NONE A1 A3 13 | 14 | //when using the BREAKOUT BOARD only and using these hardware spi lines to the LCD, 15 | //there is no MISO pin 16 | //the MOSI pin and CLK pin is defined by the system and can't be modified. 17 | //other pins can be defined by youself,for example 18 | //pin usage as follow: 19 | // CS CD RST MOSI MISO CLK LED 20 | //Arduino Uno 10 9 8 11 NONE 13 A3 21 | //Arduino Mega 10 9 8 51 NONE 52 A3 22 | 23 | //Remember to set the pins to suit your display module! 24 | 25 | #include //Core graphics library 26 | #include //Hardware-specific library 27 | 28 | //the definiens of software spi mode as follow: 29 | //if the IC model is known or the modules is unreadable,you can use this constructed function 30 | //LCDWIKI_SPI mylcd(ST7735S,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 31 | //LCDWIKI_SPI mylcd(SSD1283A,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 32 | 33 | //if the IC model is not known and the modules is readable,you can use this constructed function 34 | //LCDWIKI_SPI mylcd(160,128,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 35 | //LCDWIKI_SPI mylcd(130,130,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 36 | 37 | //the definiens of hardware spi mode as follow: 38 | //if the IC model is known or the modules is unreadable,you can use this constructed function 39 | //LCDWIKI_SPI mylcd(ST7735S,10,9,8,A3); //hardware spi,cs,cd,reset 40 | //LCDWIKI_SPI mylcd(SSD1283A,10,9,8,A3); //hardware spi,cs,cd,reset 41 | 42 | //if the IC model is not known and the modules is readable,you can use this constructed function 43 | //LCDWIKI_SPI mylcd(160,128,10,9,8,A3); //hardware spi,cs,cd,reset 44 | //LCDWIKI_SPI mylcd(130,130,10,9,8,A3); //hardware spi,cs,cd,reset 45 | 46 | #define BLACK 0x0000 47 | #define BLUE 0x001F 48 | #define RED 0xF800 49 | #define GREEN 0x07E0 50 | #define CYAN 0x07FF 51 | #define MAGENTA 0xF81F 52 | #define YELLOW 0xFFE0 53 | #define WHITE 0xFFFF 54 | 55 | void color_dump(uint16_t x,uint16_t y) 56 | { 57 | uint8_t buf[30] = {0},pbuf[10] = {0}; 58 | uint8_t wd = (my_lcd.Get_Display_Width() - 9 * 6)/ (5 * 6); 59 | uint8_t hi = (my_lcd.Get_Display_Height() / 8) - 1; 60 | uint16_t pixel = 0; 61 | //set white 62 | my_lcd.Set_Text_colour(WHITE); 63 | //set text size 1 64 | my_lcd.Set_Text_Size(1); 65 | for(int j = 0;j< hi;j++) 66 | { 67 | sprintf(buf,"%3d,%3d:",x,y+j); 68 | my_lcd.Print_String(buf, 0, 8*(j+1)*my_lcd.Get_Text_Size()); 69 | for(int i=0;i //Core graphics library 27 | #include //Hardware-specific library 28 | 29 | //the definiens of software spi mode as follow: 30 | //if the IC model is known or the modules is unreadable,you can use this constructed function 31 | //LCDWIKI_SPI mylcd(ST7735S,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 32 | //LCDWIKI_SPI mylcd(SSD1283A,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 33 | 34 | //if the IC model is not known and the modules is readable,you can use this constructed function 35 | //LCDWIKI_SPI mylcd(160,128,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 36 | //LCDWIKI_SPI mylcd(130,130,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 37 | 38 | //the definiens of hardware spi mode as follow: 39 | //if the IC model is known or the modules is unreadable,you can use this constructed function 40 | //LCDWIKI_SPI mylcd(ST7735S,10,9,8,A3); //hardware spi,cs,cd,reset 41 | //LCDWIKI_SPI mylcd(SSD1283A,10,9,8,A3); //hardware spi,cs,cd,reset 42 | 43 | //if the IC model is not known and the modules is readable,you can use this constructed function 44 | //LCDWIKI_SPI mylcd(160,128,10,9,8,A3); //hardware spi,cs,cd,reset 45 | //LCDWIKI_SPI mylcd(130,130,10,9,8,A3); //hardware spi,cs,cd,reset 46 | 47 | #define BLACK 0x0000 48 | #define BLUE 0x001F 49 | #define RED 0xF800 50 | #define GREEN 0x07E0 51 | #define CYAN 0x07FF 52 | #define MAGENTA 0xF81F 53 | #define YELLOW 0xFFE0 54 | #define WHITE 0xFFFF 55 | 56 | void fill_screen_test() 57 | { 58 | mylcd.Fill_Screen(BLACK); 59 | mylcd.Fill_Screen(RED); 60 | mylcd.Fill_Screen(GREEN); 61 | mylcd.Fill_Screen(BLUE); 62 | mylcd.Fill_Screen(BLACK); 63 | } 64 | 65 | void text_test() 66 | { 67 | mylcd.Set_Text_Mode(0); 68 | 69 | mylcd.Fill_Screen(BLACK); 70 | mylcd.Set_Text_Back_colour(BLACK); 71 | mylcd.Set_Text_colour(WHITE); 72 | mylcd.Set_Text_Size(1); 73 | mylcd.Print_String("Hello World!", 0, 0); 74 | 75 | mylcd.Set_Text_colour(YELLOW); 76 | mylcd.Set_Text_Size(2); 77 | mylcd.Print_Number_Float(1234.56,2,0, 8, '.', 0, ' '); 78 | 79 | mylcd.Set_Text_colour(RED); 80 | mylcd.Set_Text_Size(3); 81 | mylcd.Print_Number_Int(0xDEADBEF, 0, 24, 0, ' ', 16); 82 | 83 | mylcd.Set_Text_colour(GREEN); 84 | mylcd.Set_Text_Size(4); 85 | mylcd.Print_String("Groop", 0, 48); 86 | 87 | mylcd.Set_Text_Size(2); 88 | mylcd.Print_String("I implore,", 0, 80); 89 | 90 | mylcd.Set_Text_Size(1); 91 | mylcd.Print_String("my foonting turling.", 0, 96); 92 | mylcd.Print_String("And hooptiously me", 0, 104); 93 | mylcd.Print_String("with crinkly bindle,", 0, 112); 94 | mylcd.Print_String("Or I will rend thee", 0, 120); 95 | } 96 | 97 | void lines_test(void) 98 | { 99 | mylcd.Fill_Screen(BLACK); 100 | mylcd.Set_Draw_color(GREEN); 101 | int i = 0; 102 | for(i = 0; i< mylcd.Get_Display_Width();i+=5) 103 | { 104 | mylcd.Draw_Line(0, 0, i, mylcd.Get_Display_Height()-1); 105 | } 106 | for(i = mylcd.Get_Display_Height()-1; i>= 0;i-=5) 107 | { 108 | mylcd.Draw_Line(0, 0, mylcd.Get_Display_Width()-1, i); 109 | } 110 | 111 | mylcd.Fill_Screen(BLACK); 112 | mylcd.Set_Draw_color(RED); 113 | for(i = mylcd.Get_Display_Width() -1; i>=0;i-=5) 114 | { 115 | mylcd.Draw_Line(mylcd.Get_Display_Width()-1, 0, i, mylcd.Get_Display_Height()-1); 116 | } 117 | for(i = mylcd.Get_Display_Height()-1; i>=0;i-=5) 118 | { 119 | mylcd.Draw_Line(mylcd.Get_Display_Width()-1, 0, 0, i); 120 | } 121 | 122 | mylcd.Fill_Screen(BLACK); 123 | mylcd.Set_Draw_color(BLUE); 124 | for(i = 0; i < mylcd.Get_Display_Width();i+=5) 125 | { 126 | mylcd.Draw_Line(0, mylcd.Get_Display_Height()-1, i, 0); 127 | } 128 | for(i = 0; i < mylcd.Get_Display_Height();i+=5) 129 | { 130 | mylcd.Draw_Line(0, mylcd.Get_Display_Height()-1, mylcd.Get_Display_Width()-1, i); 131 | } 132 | 133 | mylcd.Fill_Screen(BLACK); 134 | mylcd.Set_Draw_color(YELLOW); 135 | for(i = mylcd.Get_Display_Width()-1; i >=0;i-=5) 136 | { 137 | mylcd.Draw_Line(mylcd.Get_Display_Width()-1, mylcd.Get_Display_Height()-1, i, 0); 138 | } 139 | for(i = 0; i0;i-=5) 240 | { 241 | 242 | mylcd.Set_Draw_color(0,i+64,i+64); 243 | mylcd.Fill_Triangle(mylcd.Get_Display_Width()/2-1,mylcd.Get_Display_Height()/2-1-i, 244 | mylcd.Get_Display_Width()/2-1-i,mylcd.Get_Display_Height()/2-1+i, 245 | mylcd.Get_Display_Width()/2-1+i,mylcd.Get_Display_Height()/2-1+i); 246 | mylcd.Set_Draw_color(i,0,i); 247 | mylcd.Draw_Triangle(mylcd.Get_Display_Width()/2-1,mylcd.Get_Display_Height()/2-1-i, 248 | mylcd.Get_Display_Width()/2-1-i,mylcd.Get_Display_Height()/2-1+i, 249 | mylcd.Get_Display_Width()/2-1+i,mylcd.Get_Display_Height()/2-1+i); 250 | } 251 | } 252 | 253 | void round_rectangle(void) 254 | { 255 | int i = 0; 256 | mylcd.Fill_Screen(BLACK); 257 | for(i = 0;i //Core graphics library 26 | #include //Hardware-specific library 27 | #include "font.h" 28 | 29 | //the definiens of software spi mode as follow: 30 | //if the IC model is known or the modules is unreadable,you can use this constructed function 31 | //LCDWIKI_SPI mylcd(ST7735S,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 32 | //LCDWIKI_SPI mylcd(SSD1283A,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 33 | 34 | //if the IC model is not known and the modules is readable,you can use this constructed function 35 | //LCDWIKI_SPI mylcd(160,128,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 36 | //LCDWIKI_SPI mylcd(130,130,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 37 | 38 | //the definiens of hardware spi mode as follow: 39 | //if the IC model is known or the modules is unreadable,you can use this constructed function 40 | //LCDWIKI_SPI mylcd(ST7735S,10,9,8,A3); //hardware spi,cs,cd,reset 41 | //LCDWIKI_SPI mylcd(SSD1283A,10,9,8,A3); //hardware spi,cs,cd,reset 42 | 43 | //if the IC model is not known and the modules is readable,you can use this constructed function 44 | //LCDWIKI_SPI mylcd(160,128,10,9,8,A3); //hardware spi,cs,cd,reset 45 | //LCDWIKI_SPI mylcd(130,130,10,9,8,A3); //hardware spi,cs,cd,reset 46 | 47 | #define BLACK 0x0000 48 | #define BLUE 0x001F 49 | #define RED 0xF800 50 | #define GREEN 0x07E0 51 | #define CYAN 0x07FF 52 | #define MAGENTA 0xF81F 53 | #define YELLOW 0xFFE0 54 | #define WHITE 0xFFFF 55 | 56 | char *color_name[] = { "BLUE", "GREEN", "RED", "WHITE" ,"CYAN","MAGENTA","YELLOW"}; 57 | uint16_t color_mask[] = { 0x001F, 0x07E0, 0xF800, 0xFFFF,0x07FF,0xF81F,0xFFE0 }; 58 | 59 | 60 | void show_16font(uint16_t x, uint16_t y,uint16_t fc, uint16_t bc,uint8_t *str,uint8_t mode) 61 | { 62 | uint16_t i,j,k,c_num,color=0; 63 | boolean first = true; 64 | c_num = sizeof(tfont16)/sizeof(typFNT_GB16); 65 | for(k=0;k>i)) 77 | { 78 | my_lcd.Set_Draw_color(fc); 79 | my_lcd.Draw_Pixel(x+((j*8+i)%16),y+((j*8+i)/16)); 80 | } 81 | // x++; 82 | // if((x-x0)==16) 83 | // { 84 | // x = x0; 85 | // y++; 86 | // } 87 | 88 | } 89 | else //非叠加模式 90 | { 91 | if(pgm_read_byte(&tfont16[k].Msk[j])&(0x80>>i)) 92 | { 93 | color = fc; 94 | } 95 | else 96 | { 97 | color = bc; 98 | } 99 | my_lcd.Push_Any_Color(&color, 1, first, 0); 100 | first = false; 101 | } 102 | } 103 | } 104 | } 105 | } 106 | 107 | } 108 | 109 | void show_24font(uint16_t x, uint16_t y,uint16_t fc, uint16_t bc,uint8_t *str,uint8_t mode) 110 | { 111 | uint16_t i,j,k,c_num,color; 112 | boolean first = true; 113 | c_num = sizeof(tfont24)/sizeof(typFNT_GB24); 114 | for(k=0;k>i)) 126 | { 127 | my_lcd.Set_Draw_color(fc); 128 | my_lcd.Draw_Pixel(x+((j*8+i)%24),y+((j*8+i)/24)); 129 | } 130 | // x++; 131 | // if((x-x0)==32) 132 | // { 133 | // x = x0; 134 | // y++; 135 | // } 136 | } 137 | else //非叠加模式 138 | { 139 | if(pgm_read_byte(&tfont24[k].Msk[j])&(0x80>>i)) 140 | { 141 | color = fc; 142 | } 143 | else 144 | { 145 | color = bc; 146 | } 147 | my_lcd.Push_Any_Color(&color, 1, first, 0); 148 | first = false; 149 | } 150 | } 151 | } 152 | } 153 | } 154 | } 155 | 156 | void show_32font(uint16_t x, uint16_t y,uint16_t fc, uint16_t bc,uint8_t *str,uint8_t mode) 157 | { 158 | uint16_t i,j,k,c_num,color; 159 | boolean first = true; 160 | c_num = sizeof(tfont32)/sizeof(typFNT_GB32); 161 | for(k=0;k>i)) 173 | { 174 | my_lcd.Set_Draw_color(fc); 175 | my_lcd.Draw_Pixel(x+((j*8+i)%32),y+((j*8+i)/32)); 176 | } 177 | // x++; 178 | // if((x-x0)==32) 179 | // { 180 | // x = x0; 181 | // y++; 182 | // } 183 | } 184 | else //非叠加模式 185 | { 186 | if(pgm_read_byte(&tfont32[k].Msk[j])&(0x80>>i)) 187 | { 188 | color = fc; 189 | } 190 | else 191 | { 192 | color = bc; 193 | } 194 | my_lcd.Push_Any_Color(&color, 1, first, 0); 195 | first = false; 196 | } 197 | } 198 | } 199 | } 200 | } 201 | } 202 | 203 | void show_chinese(uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *str,uint16_t csize,uint8_t mode) 204 | { 205 | int i = 0; 206 | if(x>(my_lcd.Get_Display_Width()-csize)||y>(my_lcd.Get_Display_Height()-csize)) 207 | { 208 | return; 209 | } 210 | while(*str!='\0') 211 | { 212 | // i += 5; 213 | // my_lcd.Draw_Fast_VLine(i, 10, 100); 214 | if(csize==32) 215 | { 216 | show_32font(x, y,fc, bc,str,mode); 217 | } 218 | else if(csize==24) 219 | { 220 | show_24font(x, y,fc, bc,str,mode); 221 | } 222 | else 223 | { 224 | show_16font(x, y,fc, bc,str,mode); 225 | } 226 | str+=3; 227 | x+=csize; 228 | } 229 | } 230 | 231 | void show_chinese_test(void) 232 | { 233 | uint16_t i; 234 | my_lcd.Set_Rotation(1); 235 | show_chinese(0, 10,RED,BLACK,"欢迎您",16,1); 236 | show_chinese(0, 26,GREEN,BLACK,"欢迎您",24,1); 237 | show_chinese(0, 50,BLUE,BLACK,"欢迎您",32,1); 238 | for (i = 1; i <= my_lcd.Get_Display_Width(); i++) 239 | { 240 | my_lcd.Vert_Scroll(0, my_lcd.Get_Display_Width(), i); 241 | delay(10); 242 | } 243 | delay(2000); 244 | my_lcd.Fill_Screen(BLACK); 245 | show_chinese(0, 10,RED,WHITE,"欢迎您",16,0); 246 | show_chinese(0, 26,GREEN,WHITE,"欢迎您",24,0); 247 | show_chinese(0, 50,BLUE,WHITE,"欢迎您",32,0); 248 | } 249 | 250 | void show_pic(void) 251 | { 252 | int i; 253 | my_lcd.Set_Addr_Window(my_lcd.Get_Display_Width()-40, 20, my_lcd.Get_Display_Width()-1, 59); 254 | my_lcd.Push_Any_Color(penguin_pic, 1600, 1, 1); 255 | } 256 | 257 | void windowScroll(int16_t x, int16_t y, int16_t wid, int16_t ht, int16_t dx, int16_t dy, uint16_t *buf) 258 | { 259 | if (dx) 260 | { 261 | for (int16_t row = 0; row < ht; row++) 262 | { 263 | my_lcd.Read_GRAM(x, y + row, buf,wid, 1); 264 | my_lcd.Set_Addr_Window(x, y + row, x + wid - 1, y + row); 265 | my_lcd.Push_Any_Color(buf + dx, wid - dx, 1,0); 266 | my_lcd.Push_Any_Color(buf + 0, dx, 0,0); 267 | } 268 | } 269 | if (dy) 270 | { 271 | for (int16_t col = 0; col < wid; col++) 272 | { 273 | my_lcd.Read_GRAM(x + col, y, buf,1, ht); 274 | my_lcd.Set_Addr_Window(x + col, y, x + col, y + ht - 1); 275 | my_lcd.Push_Any_Color(buf + dy, ht - dy, 1,0); 276 | my_lcd.Push_Any_Color(buf + 0, dy, 0,0); 277 | } 278 | } 279 | } 280 | 281 | void show_string(uint8_t *str,int16_t x,int16_t y,uint8_t csize,uint16_t fc, uint16_t bc,boolean mode) 282 | { 283 | my_lcd.Set_Text_Mode(mode); 284 | my_lcd.Set_Text_Size(csize); 285 | my_lcd.Set_Text_colour(fc); 286 | my_lcd.Set_Text_Back_colour(bc); 287 | my_lcd.Print_String(str,x,y); 288 | } 289 | 290 | void color_test() 291 | { 292 | int n,i; 293 | int cnum = sizeof(color_mask)/sizeof(uint16_t); 294 | for(i=0;i 0; i -= dx) 392 | //{ 393 | // windowScroll(0, 123, my_lcd.Get_Display_Width(), 16, dx, dy, scrollbuf); 394 | //} 395 | delay(3000); 396 | } 397 | 398 | my_lcd.Invert_Display(true); 399 | delay(3000); 400 | my_lcd.Invert_Display(false); 401 | my_lcd.Fill_Screen(BLACK); 402 | } 403 | -------------------------------------------------------------------------------- /Example/Example_02_colligate_test/colligate_test/colligate_test.ino: -------------------------------------------------------------------------------- 1 | // IMPORTANT: LCDWIKI_SPI LIBRARY MUST BE SPECIFICALLY 2 | // CONFIGURED FOR EITHER THE TFT SHIELD OR THE BREAKOUT BOARD. 3 | 4 | //This program is a demo of how to use most of the functions 5 | //of the library with a supported display modules. 6 | 7 | //Set the pins to the correct ones for your development shield or breakout board. 8 | //when using the BREAKOUT BOARD only and using these software spi lines to the LCD, 9 | //there is no MISO pin and You can use any free pin to define the pins,for example 10 | //pin usage as follow: 11 | // CS CD RST MOSI MISO CLK LED 12 | //Arduino Uno A5 A3 A4 A2 NONE A1 A3 13 | //Arduino Mega A5 A3 A4 A2 NONE A1 A3 14 | 15 | //when using the BREAKOUT BOARD only and using these hardware spi lines to the LCD, 16 | //there is no MISO pin 17 | //the MOSI pin and CLK pin is defined by the system and can't be modified. 18 | //other pins can be defined by youself,for example 19 | //pin usage as follow: 20 | // CS CD RST MOSI MISO CLK LED 21 | //Arduino Uno 10 9 8 11 NONE 13 A3 22 | //Arduino Mega 10 9 8 51 NONE 52 A3 23 | 24 | //Remember to set the pins to suit your display module! 25 | 26 | #include //Core graphics library 27 | #include //Hardware-specific library 28 | 29 | //the definiens of software spi mode as follow: 30 | //if the IC model is known or the modules is unreadable,you can use this constructed function 31 | //LCDWIKI_SPI mylcd(ST7735S,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 32 | //LCDWIKI_SPI mylcd(SSD1283A,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk,led 33 | 34 | //if the IC model is not known and the modules is readable,you can use this constructed function 35 | //LCDWIKI_SPI mylcd(160,128,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 36 | //LCDWIKI_SPI mylcd(130,130,A5,A3,-1,A2,A4,A1,A3);//software spi,model,cs,cd,miso,mosi,reset,clk 37 | 38 | //the definiens of hardware spi mode as follow: 39 | //if the IC model is known or the modules is unreadable,you can use this constructed function 40 | //LCDWIKI_SPI mylcd(ST7735S,10,9,8,A3); //hardware spi,cs,cd,reset 41 | //LCDWIKI_SPI mylcd(SSD1283A,10,9,8,A3); //hardware spi,cs,cd,reset 42 | 43 | //if the IC model is not known and the modules is readable,you can use this constructed function 44 | //LCDWIKI_SPI mylcd(160,128,10,9,8,A3); //hardware spi,cs,cd,reset 45 | //LCDWIKI_SPI mylcd(130,130,10,9,8,A3); //hardware spi,cs,cd,reset 46 | 47 | 48 | unsigned long show_text(void) 49 | { 50 | unsigned long time_start = micros(); 51 | my_lcd.Set_Draw_color(32, 0,255); 52 | my_lcd.Fill_Rectangle(0, 0, my_lcd.Get_Display_Width()-1, 10); 53 | my_lcd.Set_Text_colour(0, 255, 0); 54 | my_lcd.Set_Text_Size(1); 55 | my_lcd.Set_Text_Mode(1); 56 | my_lcd.Print_String("* Color TFT Display *", CENTER, 2); 57 | 58 | my_lcd.Set_Draw_color(128, 128, 128); 59 | my_lcd.Fill_Rectangle(0, my_lcd.Get_Display_Height()-1-10, my_lcd.Get_Display_Width()-1, my_lcd.Get_Display_Height()-1); 60 | my_lcd.Set_Text_colour(255, 255, 255); 61 | my_lcd.Set_Text_Size(1); 62 | my_lcd.Set_Text_Mode(1); 63 | my_lcd.Print_String("", CENTER, my_lcd.Get_Display_Height()-9); 64 | 65 | my_lcd.Set_Draw_color(255,255,0); 66 | my_lcd.Draw_Rectangle(0, 11, my_lcd.Get_Display_Width()-1, my_lcd.Get_Display_Height()-1-11); 67 | return micros() - time_start; 68 | } 69 | 70 | unsigned long show_triangle_function(void) 71 | { 72 | uint16_t i; 73 | unsigned long time_start = micros(); 74 | my_lcd.Set_Draw_color(0, 0, 255); 75 | my_lcd.Draw_Fast_VLine(my_lcd.Get_Display_Width()/2-1, 12, my_lcd.Get_Display_Height()- 24); 76 | my_lcd.Draw_Fast_HLine(1, my_lcd.Get_Display_Height()/2-1, my_lcd.Get_Display_Width()-2); 77 | for(i = 1;i <= (my_lcd.Get_Display_Height()- 32)/2/10;i++) 78 | { 79 | my_lcd.Draw_Fast_HLine(my_lcd.Get_Display_Width()/2-1-2, my_lcd.Get_Display_Height()/2-1-i*10, 5); 80 | my_lcd.Draw_Fast_HLine(my_lcd.Get_Display_Width()/2-1-2, my_lcd.Get_Display_Height()/2-1+i*10, 5); 81 | } 82 | for(i = 1;i <= (my_lcd.Get_Display_Width()-2)/2/10;i++) 83 | { 84 | my_lcd.Draw_Fast_VLine(my_lcd.Get_Display_Width()/2-1-i*10, my_lcd.Get_Display_Height()/2-1-2, 5); 85 | my_lcd.Draw_Fast_VLine(my_lcd.Get_Display_Width()/2-1+i*10, my_lcd.Get_Display_Height()/2-1-2, 5); 86 | } 87 | my_lcd.Set_Text_colour(0, 255, 255); 88 | my_lcd.Set_Text_Back_colour(0,0,0); 89 | my_lcd.Set_Text_Size(1); 90 | my_lcd.Set_Text_Mode(0); 91 | my_lcd.Print_String("sin",5,17); 92 | my_lcd.Set_Draw_color(0, 255, 255); 93 | for (i=1; imy_lcd.Get_Display_Width()-1) 151 | { 152 | if ((x==my_lcd.Get_Display_Width()/2-1)||(buf[x-1]==my_lcd.Get_Display_Height()/2-1)) 153 | { 154 | my_lcd.Set_Draw_color(0, 0, 255); 155 | } 156 | else 157 | { 158 | my_lcd.Set_Draw_color(0, 0, 0); 159 | } 160 | my_lcd.Draw_Pixel(x,buf[x-1]); 161 | } 162 | my_lcd.Set_Draw_color(255, 64, 255); 163 | y=my_lcd.Get_Display_Height()/2-1+(sin(((i*k)*3.14)/180)*(b-(i/100))); 164 | my_lcd.Draw_Pixel(x,y); 165 | buf[x-1]=y; 166 | } 167 | return micros()- time_start; 168 | } 169 | 170 | unsigned long show_fill_rectangle(void) 171 | { 172 | uint16_t i; 173 | unsigned long time_start = micros(); 174 | uint16_t side_len = (my_lcd.Get_Display_Height()-40)/5; 175 | uint16_t x_spec = (my_lcd.Get_Display_Width()-5*side_len)/2; 176 | uint16_t y_spec = (my_lcd.Get_Display_Height()-5*side_len)/2; 177 | for(i = 0;i<5;i++) 178 | { 179 | switch (i) 180 | { 181 | case 0: 182 | my_lcd.Set_Draw_color(255,0,255); 183 | break; 184 | case 1: 185 | my_lcd.Set_Draw_color(255,0,0); 186 | break; 187 | case 2: 188 | my_lcd.Set_Draw_color(0,255,0); 189 | break; 190 | case 3: 191 | my_lcd.Set_Draw_color(0,0,255); 192 | break; 193 | case 4: 194 | my_lcd.Set_Draw_color(255,255,0); 195 | break; 196 | default: 197 | break; 198 | } 199 | my_lcd.Fill_Rectangle(x_spec+i*side_len-1, y_spec+i*side_len-1, x_spec+(i+1)*side_len-1, y_spec+(i+1)*side_len-1); 200 | my_lcd.Fill_Rectangle(x_spec+i*side_len-1, y_spec+(5-i)*side_len-1, x_spec+(i+1)*side_len-1, y_spec+(4-i)*side_len-1); 201 | } 202 | return micros()- time_start; 203 | } 204 | 205 | unsigned long show_fill_round_rectangle(void) 206 | { 207 | uint16_t i; 208 | unsigned long time_start = micros(); 209 | uint16_t side_len = (my_lcd.Get_Display_Height()-40)/5; 210 | uint16_t x_spec = (my_lcd.Get_Display_Width()-5*side_len)/2; 211 | uint16_t y_spec = (my_lcd.Get_Display_Height()-5*side_len)/2; 212 | for(i = 0;i<5;i++) 213 | { 214 | switch (i) 215 | { 216 | case 0: 217 | my_lcd.Set_Draw_color(255,0,255); 218 | break; 219 | case 1: 220 | my_lcd.Set_Draw_color(255,0,0); 221 | break; 222 | case 2: 223 | my_lcd.Set_Draw_color(0,255,0); 224 | break; 225 | case 3: 226 | my_lcd.Set_Draw_color(0,0,255); 227 | break; 228 | case 4: 229 | my_lcd.Set_Draw_color(255,255,0); 230 | break; 231 | default: 232 | break; 233 | } 234 | my_lcd.Fill_Round_Rectangle(x_spec+i*side_len-1, y_spec+i*side_len-1, x_spec+(i+1)*side_len-1, y_spec+(i+1)*side_len-1,5); 235 | my_lcd.Fill_Round_Rectangle(x_spec+i*side_len-1, y_spec+(5-i)*side_len-1, x_spec+(i+1)*side_len-1, y_spec+(4-i)*side_len-1,5); 236 | } 237 | return micros()- time_start; 238 | } 239 | 240 | unsigned long show_fill_circle(void) 241 | { 242 | uint16_t i; 243 | unsigned long time_start = micros(); 244 | uint16_t r_len = (my_lcd.Get_Display_Height()-40)/5/2; 245 | uint16_t x_spec = (my_lcd.Get_Display_Width()-5*r_len*2)/2; 246 | uint16_t y_spec = (my_lcd.Get_Display_Height()-5*r_len*2)/2; 247 | for(i = 0;i<5;i++) 248 | { 249 | switch (i) 250 | { 251 | case 0: 252 | my_lcd.Set_Draw_color(255,0,255); 253 | break; 254 | case 1: 255 | my_lcd.Set_Draw_color(255,0,0); 256 | break; 257 | case 2: 258 | my_lcd.Set_Draw_color(0,255,0); 259 | break; 260 | case 3: 261 | my_lcd.Set_Draw_color(0,0,255); 262 | break; 263 | case 4: 264 | my_lcd.Set_Draw_color(255,255,0); 265 | break; 266 | default: 267 | break; 268 | } 269 | my_lcd.Fill_Circle(x_spec+r_len+i*r_len*2-1, y_spec+r_len+i*r_len*2-1,r_len); 270 | my_lcd.Fill_Circle(x_spec+r_len+i*r_len*2-1, y_spec+(5-i)*r_len*2-r_len-1,r_len); 271 | } 272 | return micros()- time_start; 273 | } 274 | 275 | unsigned long show_fill_triangle(void) 276 | { 277 | uint16_t i; 278 | unsigned long time_start = micros(); 279 | uint16_t h_len = (my_lcd.Get_Display_Height()-40)/5; 280 | uint16_t side_len = (h_len*115)/100; 281 | uint16_t x_spec = (my_lcd.Get_Display_Width()-5*side_len)/2; 282 | uint16_t y_spec = (my_lcd.Get_Display_Height()-5*h_len)/2; 283 | for(i = 0;i<5;i++) 284 | { 285 | switch (i) 286 | { 287 | case 0: 288 | my_lcd.Set_Draw_color(255,0,255); 289 | break; 290 | case 1: 291 | my_lcd.Set_Draw_color(255,0,0); 292 | break; 293 | case 2: 294 | my_lcd.Set_Draw_color(0,255,0); 295 | break; 296 | case 3: 297 | my_lcd.Set_Draw_color(0,0,255); 298 | break; 299 | case 4: 300 | my_lcd.Set_Draw_color(255,255,0); 301 | break; 302 | default: 303 | break; 304 | } 305 | my_lcd.Fill_Triangle(x_spec+i*side_len-1,y_spec+(i+1)*h_len-1,x_spec+side_len/2+i*side_len-1,y_spec+i*h_len-1,x_spec+(i+1)*side_len-1,y_spec+(i+1)*h_len-1); 306 | my_lcd.Fill_Triangle(x_spec+i*side_len-1,y_spec+(5-i)*h_len-1,x_spec+side_len/2+i*side_len-1,y_spec+(4-i)*h_len-1,x_spec+(i+1)*side_len-1,y_spec+(5-i)*h_len-1); 307 | } 308 | return micros()- time_start; 309 | } 310 | 311 | unsigned long show_grid_lines(void) 312 | { 313 | uint16_t i; 314 | unsigned long time_start = micros(); 315 | int16_t wid = my_lcd.Get_Display_Width(); 316 | float k = 1.44; 317 | 318 | my_lcd.Set_Draw_color(255,0,0); 319 | for (i=12; i13; i-=5) 325 | { 326 | my_lcd.Draw_Line(my_lcd.Get_Display_Width()-2, i, (i*k)-10, 12); 327 | } 328 | my_lcd.Set_Draw_color(0,255,255); 329 | for (i=my_lcd.Get_Display_Height()-2-12; i>13; i-=5) 330 | { 331 | my_lcd.Draw_Line(1, i, (my_lcd.Get_Display_Height()-1-12)*k+10-(i*k), 12); 332 | } 333 | my_lcd.Set_Draw_color(0,255,255); 334 | for (int i=13; i 6 | #elif defined(ESP8266) 7 | #include 8 | #else 9 | #define PROGMEM 10 | #endif 11 | 12 | 13 | const unsigned char penguin_pic[] PROGMEM = { /* 0X00,0X10,0X28,0X00,0X28,0X00,0X01,0X1B, */ 14 | 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 15 | 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XBE, 0XF7, 0X7D, 0XEF, 16 | 0XBA, 0XD6, 0XB6, 0XB5, 0XF3, 0X9C, 0XB2, 0X94, 0XB3, 0X9C, 0XB2, 0X94, 0X34, 0XA5, 0XF7, 0XBD, 17 | 0XFB, 0XDE, 0X7D, 0XEF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 18 | 0XFF, 0XFF, 0XFF, 0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F3, 0X8A, 0XFA, 0X82, 0XE8, 0X82, 0XB0, 0X45, 0X69, 0XC7, 0X51, 0X08, 0X42, 0X08, 0X3A, 106 | 0X86, 0X5A, 0X83, 0X9B, 0XA2, 0XBC, 0X22, 0XCD, 0X21, 0XCD, 0XA1, 0XC4, 0X22, 0XB4, 0XC4, 0X7A, 107 | 0X06, 0X3A, 0X86, 0X29, 0X45, 0X29, 0X05, 0X31, 0XC4, 0X50, 0X41, 0X90, 0X00, 0XC0, 0X00, 0XA8, 108 | 0X00, 0XA0, 0X00, 0XA8, 0X00, 0X30, 0X4A, 0X4A, 0XBA, 0XD6, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 109 | 0XFF, 0XFF, 0XFF, 0XFF, 0X7D, 0XEF, 0X8E, 0X73, 0XC3, 0X18, 0X05, 0X39, 0X82, 0XA8, 0X00, 0XF8, 110 | 0XC3, 0XF8, 0X4D, 0XFB, 0X4D, 0XFB, 0XC7, 0XF9, 0XC3, 0XF0, 0X82, 0XD8, 0XC3, 0XB0, 0X04, 0X81, 111 | 0X45, 0X61, 0X46, 0X51, 0X86, 0X49, 0X86, 0X49, 0X46, 0X41, 0X45, 0X41, 0X45, 0X41, 0X45, 0X41, 112 | 0X05, 0X49, 0X04, 0X61, 0X82, 0X90, 0X41, 0XB0, 0X00, 0XD0, 0X00, 0XC8, 0X00, 0XA8, 0X00, 0XA8, 113 | 0X00, 0XB8, 0X41, 0X58, 0X82, 0X10, 0X82, 0X10, 0XB2, 0X94, 0XBE, 0XF7, 0XFF, 0XFF, 0XFF, 0XFF, 114 | 0XFF, 0XFF, 0XBE, 0XF7, 0XCF, 0X7B, 0X82, 0X10, 0X04, 0X21, 0X86, 0X29, 0X86, 0X41, 0X04, 0X99, 115 | 0X40, 0XE8, 0X41, 0XF8, 0X86, 0XF9, 0XCB, 0XFA, 0X49, 0XFA, 0X82, 0XF8, 0X00, 0XF8, 0X00, 0XF0, 116 | 0X00, 0XE8, 0X41, 0XD8, 0X41, 0XD0, 0X41, 0XC0, 0X41, 0XC0, 0X41, 0XC0, 0X41, 0XC0, 0X41, 0XC8, 117 | 0X00, 0XD0, 0X00, 0XE0, 0X00, 0XE0, 0X00, 0XD8, 0X00, 0XD0, 0X00, 0XB8, 0X00, 0XA8, 0X41, 0X88, 118 | 0X82, 0X48, 0X82, 0X10, 0X82, 0X10, 0X00, 0X00, 0X45, 0X29, 0X79, 0XCE, 0XFF, 0XFF, 0XFF, 0XFF, 119 | 0XBE, 0XF7, 0XF3, 0X9C, 0X82, 0X10, 0XC3, 0X18, 0X45, 0X29, 0X86, 0X31, 0XC7, 0X31, 0X30, 0X7C, 120 | 0XF3, 0XDC, 0X86, 0XE1, 0X00, 0XF0, 0X00, 0XF8, 0X41, 0XF8, 0X41, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 121 | 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 122 | 0X00, 0XE8, 0X00, 0XE0, 0X00, 0XE0, 0X00, 0XD8, 0X00, 0XC8, 0X41, 0XA0, 0X8A, 0X9A, 0X0C, 0X63, 123 | 0X04, 0X11, 0X82, 0X10, 0X82, 0X10, 0X41, 0X08, 0X00, 0X00, 0X4D, 0X6B, 0X7D, 0XEF, 0XFF, 0XFF, 124 | 0XFB, 0XDE, 0X08, 0X42, 0X42, 0X10, 0X45, 0X29, 0X86, 0X31, 0X86, 0X31, 0X49, 0X4A, 0X38, 0XBE, 125 | 0XFF, 0XFF, 0X38, 0XD6, 0X86, 0XA9, 0X00, 0XC8, 0X00, 0XE0, 0X00, 0XF0, 0X00, 0XF8, 0X00, 0XF8, 126 | 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF8, 0X00, 0XF0, 0X00, 0XF0, 127 | 0X00, 0XE8, 0X00, 0XE0, 0X00, 0XD0, 0XC3, 0X98, 0X8A, 0X8A, 0XB2, 0XA4, 0XBA, 0XC6, 0XF7, 0XB5, 128 | 0X08, 0X42, 0X41, 0X08, 0X82, 0X10, 0X41, 0X08, 0X00, 0X00, 0X45, 0X29, 0XF7, 0XBD, 0XFF, 0XFF, 129 | 0X71, 0X8C, 0X41, 0X08, 0X04, 0X21, 0X45, 0X29, 0X86, 0X31, 0X86, 0X31, 0X0C, 0X63, 0X3C, 0XE7, 130 | 0XFF, 0XFF, 0X79, 0XD6, 0X46, 0XB9, 0X00, 0XE0, 0X42, 0XC8, 0X82, 0XA8, 0X82, 0XB0, 0X41, 0XD8, 131 | 0X82, 0XE8, 0X82, 0XF0, 0X41, 0XE8, 0X41, 0XE8, 0X41, 0XE8, 0X41, 0XF0, 0X41, 0XE8, 0X41, 0XD8, 132 | 0X04, 0XC1, 0X08, 0X92, 0X4D, 0X8B, 0X34, 0XA5, 0XFB, 0XC6, 0XFB, 0XD6, 0XBA, 0XCE, 0X3C, 0XE7, 133 | 0X30, 0X84, 0XC3, 0X18, 0X41, 0X08, 0X41, 0X08, 0X00, 0X00, 0X41, 0X08, 0XCF, 0X7B, 0X7D, 0XEF, 134 | 0X49, 0X4A, 0X00, 0X00, 0X04, 0X21, 0X45, 0X29, 0X46, 0X31, 0X86, 0X31, 0X30, 0X84, 0XFF, 0XFF, 135 | 0XFF, 0XF7, 0XF7, 0XDD, 0X09, 0XDA, 0X83, 0XF8, 0X01, 0XF0, 0X42, 0XC0, 0X82, 0X98, 0X49, 0X9A, 136 | 0XF3, 0XB4, 0XF3, 0XCC, 0X71, 0XBC, 0X8E, 0XBB, 0X8E, 0XBB, 0X30, 0XBC, 0X71, 0XBC, 0XF3, 0XBC, 137 | 0XB6, 0XBD, 0XFB, 0XCE, 0XBE, 0XE7, 0X7D, 0XE7, 0X3B, 0XDF, 0XBA, 0XD6, 0X79, 0XCE, 0XFB, 0XDE, 138 | 0X75, 0XAD, 0X86, 0X31, 0X41, 0X08, 0X41, 0X08, 0X00, 0X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 0XBE, 0XF7, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 214 | }; 215 | 216 | 217 | typedef struct 218 | { 219 | unsigned char Index[2]; 220 | char Msk[32]; 221 | }typFNT_GB16; 222 | 223 | const typFNT_GB16 tfont16[] PROGMEM = 224 | { 225 | 226 | "深",0x00,0x00,0x00,0x00,0x12,0x3C,0x0B,0xC8,0x02,0x20,0x01,0x10,0x22,0x40,0x00,0x58, 227 | 0x0B,0xE0,0x10,0xE0,0x11,0x50,0x31,0x58,0x26,0x4E,0x00,0x40,0x00,0x40,0x00,0x00,/*"深",0*/ 228 | "圳",0x00,0x00,0x00,0x08,0x10,0x04,0x08,0x04,0x08,0x08,0x09,0x28,0x0D,0x28,0x19,0x28, 229 | 0x09,0x24,0x0D,0x24,0x11,0x24,0x21,0x24,0x02,0x04,0x00,0x04,0x00,0x00,0x00,0x00,/*"圳",1*/ 230 | "市",0x00,0x00,0x01,0x00,0x01,0x80,0x00,0x1C,0x7F,0xE0,0x01,0x00,0x01,0xF0,0x0F,0x10, 231 | 0x09,0x10,0x09,0x10,0x09,0x30,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,/*"市",2*/ 232 | "全",0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x02,0x80,0x02,0x40,0x04,0x20,0x08,0x58, 233 | 0x17,0x8E,0x21,0x00,0x07,0xC0,0x01,0x00,0x01,0x00,0x0F,0xF8,0x10,0x00,0x00,0x00,/*"全",3*/ 234 | "动",0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x20,0x0E,0x20,0x00,0x3C,0x01,0xE4,0x7E,0x24, 235 | 0x08,0x44,0x12,0x44,0x1D,0x88,0x30,0x88,0x01,0x08,0x02,0x30,0x04,0x00,0x00,0x00,/*"动",4*/ 236 | "电",0x00,0x00,0x00,0x00,0x03,0x00,0x02,0x00,0x02,0x70,0x3F,0xB0,0x12,0x30,0x17,0xA0, 237 | 0x1A,0x20,0x13,0xC0,0x0E,0x00,0x02,0x04,0x02,0x04,0x01,0xFC,0x00,0x00,0x00,0x00,/*"电",5*/ 238 | "子",0x00,0x00,0x00,0x00,0x00,0xE0,0x0F,0x20,0x00,0x40,0x01,0x80,0x00,0x9C,0x0F,0xE0, 239 | 0x30,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x04,0x80,0x03,0x00,0x00,0x00,/*"子",6*/ 240 | "技",0x00,0x00,0x08,0x00,0x04,0x20,0x04,0x20,0x08,0x38,0x06,0xE0,0x38,0x40,0x0A,0x50, 241 | 0x05,0xF0,0x19,0x10,0x68,0xE0,0x08,0x20,0x08,0x50,0x0B,0x8E,0x00,0x00,0x00,0x00,/*"技",7*/ 242 | "术",0x00,0x00,0x00,0x00,0x03,0x00,0x01,0x30,0x02,0x00,0x02,0x60,0x0F,0x80,0x03,0x00, 243 | 0x06,0x80,0x0A,0x40,0x12,0x30,0x22,0x1C,0x42,0x00,0x02,0x00,0x00,0x00,0x00,0x00,/*"术",8*/ 244 | "有",0x00,0x00,0x01,0x80,0x01,0x00,0x01,0x1C,0x3F,0xE0,0x02,0x00,0x02,0x60,0x07,0xA0, 245 | 0x0A,0x20,0x13,0xA0,0x22,0x20,0x03,0x20,0x04,0x20,0x04,0x20,0x00,0x20,0x00,0x00,/*"有",9*/ 246 | "限",0x00,0x00,0x00,0x00,0x00,0x30,0x3D,0xD0,0x29,0x20,0x29,0xE0,0x29,0x20,0x25,0xE8, 247 | 0x3C,0x90,0x21,0x60,0x21,0x30,0x21,0x5C,0x21,0x8C,0x21,0x80,0x01,0x00,0x00,0x00,/*"限",10*/ 248 | "公",0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x80,0x00,0x40,0x04,0x40,0x04,0x20,0x08,0x10, 249 | 0x11,0x1C,0x11,0x00,0x62,0x00,0x02,0x20,0x07,0xE0,0x0C,0x30,0x00,0x00,0x00,0x00,/*"公",11*/ 250 | "司",0x00,0x00,0x00,0x00,0x00,0x78,0x03,0x88,0x00,0x08,0x0F,0x88,0x00,0x08,0x01,0x88, 251 | 0x1E,0x88,0x08,0x88,0x09,0x88,0x0E,0x08,0x00,0x08,0x00,0x38,0x00,0x10,0x00,0x00,/*"司",12*/ 252 | "欢",0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x40,0x00,0x80,0x1C,0xB8,0x25,0x50,0x28,0x80, 253 | 0x18,0x80,0x08,0x80,0x14,0xC0,0x14,0xA0,0x21,0x10,0x02,0x18,0x00,0x04,0x00,0x00,/*"欢",13*/ 254 | "迎",0x00,0x00,0x00,0x00,0x00,0xC0,0x18,0x80,0x09,0x1C,0x02,0x68,0x02,0x48,0x3A,0xC8, 255 | 0x13,0x48,0x12,0x40,0x08,0x40,0x78,0x40,0x07,0x40,0x00,0xFE,0x00,0x10,0x00,0x00,/*"迎",14*/ 256 | "您",0x00,0x00,0x00,0x00,0x04,0x80,0x08,0x98,0x09,0x68,0x1A,0x50,0x29,0x50,0x0A,0x48, 257 | 0x0A,0x40,0x08,0x40,0x11,0x8E,0x14,0x82,0x14,0x10,0x23,0x98,0x00,0x60,0x00,0x00,/*"您",15*/ 258 | 259 | 260 | 261 | #if 0 262 | {0x01,0x00,0x01,0x00,0x02,0x80,0x04,0x40,0x08,0x20,0x10,0x10,0x2F,0xE8,0xC1,0x06}, 263 | {0x01,0x00,0x01,0x00,0x1F,0xF0,0x01,0x00,0x01,0x00,0x01,0x00,0x7F,0xFC,0x00,0x00},/*"全",3*/ 264 | {0x00,0x40,0x00,0x40,0x7C,0x40,0x00,0x40,0x01,0xFC,0x00,0x44,0xFE,0x44,0x20,0x44}, 265 | {0x20,0x44,0x20,0x84,0x48,0x84,0x44,0x84,0xFD,0x04,0x45,0x04,0x02,0x28,0x04,0x10},/*"动",4*/ 266 | {0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8}, 267 | {0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x0A,0x01,0x02,0x01,0x02,0x00,0xFE},/*"电",5*/ 268 | {0x00,0x00,0x7F,0xF8,0x00,0x10,0x00,0x20,0x00,0x40,0x01,0x80,0x01,0x00,0xFF,0xFE}, 269 | {0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00},/*"子",6*/ 270 | {0x10,0x20,0x10,0x20,0x10,0x20,0x13,0xFE,0xFC,0x20,0x10,0x20,0x10,0x20,0x15,0xFC}, 271 | {0x18,0x84,0x30,0x88,0xD0,0x48,0x10,0x50,0x10,0x20,0x10,0x50,0x51,0x88,0x26,0x06},/*"技",7*/ 272 | {0x01,0x00,0x01,0x20,0x01,0x10,0x01,0x10,0x7F,0xFC,0x03,0x80,0x05,0x40,0x05,0x40}, 273 | {0x09,0x20,0x11,0x10,0x21,0x08,0x41,0x04,0x81,0x02,0x01,0x00,0x01,0x00,0x01,0x00},/*"术",8*/ 274 | {0x02,0x00,0x02,0x00,0xFF,0xFE,0x04,0x00,0x04,0x00,0x0F,0xF0,0x08,0x10,0x18,0x10}, 275 | {0x2F,0xF0,0x48,0x10,0x88,0x10,0x0F,0xF0,0x08,0x10,0x08,0x10,0x08,0x50,0x08,0x20},/*"有",9*/ 276 | {0x00,0x00,0x7B,0xF8,0x4A,0x08,0x52,0x08,0x53,0xF8,0x62,0x08,0x52,0x08,0x4B,0xF8}, 277 | {0x4A,0x44,0x4A,0x48,0x6A,0x30,0x52,0x20,0x42,0x10,0x42,0x88,0x43,0x06,0x42,0x00},/*"限",10*/ 278 | {0x00,0x80,0x04,0x80,0x04,0x80,0x08,0x40,0x08,0x40,0x10,0x20,0x20,0x10,0x42,0x08}, 279 | {0x82,0x06,0x04,0x00,0x04,0x40,0x08,0x20,0x10,0x20,0x3F,0xF0,0x10,0x10,0x00,0x00},/*"公",11*/ 280 | {0x00,0x00,0x3F,0xF8,0x00,0x08,0x00,0x08,0x7F,0xE8,0x00,0x08,0x00,0x08,0x1F,0x88}, 281 | {0x10,0x88,0x10,0x88,0x10,0x88,0x10,0x88,0x1F,0x88,0x10,0x88,0x00,0x28,0x00,0x10},/*"司",12*/ 282 | {0x00,0x80,0x00,0x80,0xFC,0x80,0x04,0xFC,0x05,0x04,0x49,0x08,0x2A,0x40,0x14,0x40}, 283 | {0x10,0x40,0x28,0xA0,0x24,0xA0,0x45,0x10,0x81,0x10,0x02,0x08,0x04,0x04,0x08,0x02},/*"欢",13*/ 284 | {0x00,0x00,0x20,0x80,0x13,0x3C,0x12,0x24,0x02,0x24,0x02,0x24,0xF2,0x24,0x12,0x24}, 285 | {0x12,0x24,0x12,0xB4,0x13,0x28,0x12,0x20,0x10,0x20,0x28,0x20,0x47,0xFE,0x00,0x00},/*"迎",14*/ 286 | {0x09,0x00,0x09,0x00,0x11,0xFC,0x32,0x04,0x54,0x48,0x99,0x50,0x11,0x48,0x12,0x44}, 287 | {0x14,0x44,0x11,0x40,0x10,0x80,0x02,0x00,0x51,0x04,0x51,0x12,0x90,0x12,0x0F,0xF0},/*"您",15*/ 288 | #endif 289 | 290 | #if 0 291 | "深",0x00,0x00,0x27,0xFC,0x14,0x04,0x14,0xA4,0x81,0x10,0x42,0x08,0x40,0x40,0x10,0x40, 292 | 0x17,0xFC,0x20,0x40,0xE0,0xE0,0x21,0x50,0x22,0x48,0x2C,0x46,0x20,0x40,0x00,0x40,/*0*/ 293 | "圳",0x11,0x04,0x11,0x24,0x11,0x24,0x11,0x24,0x11,0x24,0xFD,0x24,0x11,0x24,0x11,0x24, 294 | 0x11,0x24,0x11,0x24,0x11,0x24,0x1D,0x24,0xE1,0x24,0x42,0x24,0x02,0x04,0x04,0x04,/*1*/ 295 | "市",0x02,0x00,0x01,0x00,0x00,0x00,0x7F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8, 296 | 0x21,0x08,0x21,0x08,0x21,0x08,0x21,0x08,0x21,0x28,0x21,0x10,0x01,0x00,0x01,0x00,/*2*/ 297 | "全",0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x40,0x04,0x30,0x18,0x08,0x60,0x06,0x1F,0xF9, 298 | 0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x01,0x00,0x01,0x00,0x01,0x00,0x7F,0xFE,/*0*/ 299 | "动",0x00,0x00,0x00,0x00,0x00,0x20,0x3E,0x20,0x00,0x7C,0x00,0x22,0x00,0x22,0x7F,0x22, 300 | 0x10,0x22,0x10,0x22,0x12,0x22,0x12,0x22,0x22,0x42,0x23,0x42,0x3D,0x82,0x00,0x9C,/*1*/ 301 | "电",0x00,0x00,0x01,0x00,0x01,0x00,0x1F,0xF0,0x61,0x0C,0x41,0x04,0x41,0x04,0x7F,0xFC, 302 | 0x41,0x04,0x41,0x04,0x41,0x04,0x7F,0xFC,0x01,0x00,0x01,0x02,0x01,0x02,0x01,0xFC,/*2*/ 303 | "子",0x00,0x00,0x00,0x00,0x3F,0xF8,0x00,0x10,0x00,0x60,0x00,0x80,0x01,0x00,0x00,0x80, 304 | 0x7F,0xFE,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x20,0x18,0x40,0x07,0x80,/*3*/ 305 | "技",0x10,0x20,0x10,0x20,0x10,0x20,0x13,0xFE,0xFC,0x20,0x10,0x20,0x10,0x20,0x15,0xFC,0x18,0x84,0x30,0x88,0xD0,0x48,0x10,0x50,0x10,0x20,0x10,0x50,0x51,0x88,0x26,0x06, 306 | "术",0x01,0x00,0x01,0x20,0x01,0x10,0x01,0x10,0x7F,0xFC,0x03,0x80,0x05,0x40,0x05,0x40,0x09,0x20,0x11,0x10,0x21,0x08,0x41,0x04,0x81,0x02,0x01,0x00,0x01,0x00,0x01,0x00, 307 | "有",0x02,0x00,0x02,0x00,0xFF,0xFE,0x04,0x00,0x04,0x00,0x0F,0xF0,0x08,0x10,0x18,0x10,0x2F,0xF0,0x48,0x10,0x88,0x10,0x0F,0xF0,0x08,0x10,0x08,0x10,0x08,0x50,0x08,0x20, 308 | "限",0x00,0x00,0x7B,0xF8,0x4A,0x08,0x52,0x08,0x53,0xF8,0x62,0x08,0x52,0x08,0x4B,0xF8,0x4A,0x44,0x4A,0x48,0x6A,0x30,0x52,0x20,0x42,0x10,0x42,0x88,0x43,0x06,0x42,0x00, 309 | "公",0x00,0x80,0x04,0x80,0x04,0x80,0x08,0x40,0x08,0x40,0x10,0x20,0x20,0x10,0x42,0x08,0x82,0x06,0x04,0x00,0x04,0x40,0x08,0x20,0x10,0x20,0x3F,0xF0,0x10,0x10,0x00,0x00, 310 | "司",0x00,0x00,0x3F,0xF8,0x00,0x08,0x00,0x08,0x7F,0xE8,0x00,0x08,0x00,0x08,0x1F,0x88,0x10,0x88,0x10,0x88,0x10,0x88,0x10,0x88,0x1F,0x88,0x10,0x88,0x00,0x28,0x00,0x10, 311 | "欢",0x00,0x80,0x00,0x80,0xFC,0x80,0x04,0xFC,0x05,0x04,0x49,0x08,0x2A,0x40,0x14,0x40,0x10,0x40,0x28,0xA0,0x24,0xA0,0x45,0x10,0x81,0x10,0x02,0x08,0x04,0x04,0x08,0x02, 312 | "迎",0x00,0x00,0x20,0x80,0x13,0x3C,0x12,0x24,0x02,0x24,0x02,0x24,0xF2,0x24,0x12,0x24,0x12,0x24,0x12,0xB4,0x13,0x28,0x12,0x20,0x10,0x20,0x28,0x20,0x47,0xFE,0x00,0x00, 313 | "您",0x09,0x00,0x09,0x00,0x11,0xFC,0x32,0x04,0x54,0x48,0x99,0x50,0x11,0x48,0x12,0x44,0x14,0x44,0x11,0x40,0x10,0x80,0x02,0x00,0x51,0x04,0x51,0x12,0x90,0x12,0x0F,0xF0, 314 | "纯",0x00,0x00,0x00,0x20,0x10,0x20,0x13,0xFE,0x20,0x20,0x26,0x24,0x4A,0x24,0x7A,0x24, 315 | 0x12,0x24,0x22,0x24,0x23,0xFC,0x7C,0x20,0x00,0x22,0x04,0x22,0x78,0x22,0x00,0x3C,/*0*/ 316 | "色",0x00,0x00,0x00,0x00,0x04,0x00,0x0F,0xF0,0x10,0x20,0x20,0x20,0x7F,0xFC,0x20,0x84, 317 | 0x20,0x84,0x20,0x84,0x20,0x84,0x3F,0xF8,0x20,0x00,0x20,0x02,0x20,0x02,0x1F,0xFE,/*1*/ 318 | "填",0x00,0x00,0x00,0x00,0x20,0x40,0x23,0xFE,0x20,0x40,0x79,0xFC,0x22,0x04,0x23,0xFC, 319 | 0x22,0x04,0x23,0xFC,0x22,0x04,0x23,0xFC,0x3A,0x04,0x65,0xFA,0x01,0x98,0x02,0x04,/*2*/ 320 | "充",0x00,0x00,0x01,0x00,0x01,0x00,0x7F,0xFE,0x02,0x20,0x04,0x10,0x04,0x08,0x08,0x04, 321 | 0x3F,0xFC,0x04,0x42,0x04,0x40,0x04,0x40,0x04,0x42,0x08,0x42,0x10,0x42,0x60,0x7E,/*3*/ 322 | "矩",0x00,0x00,0x00,0x00,0x20,0x7E,0x3E,0x80,0x48,0x80,0x48,0x80,0x48,0xFE,0x48,0x82, 323 | 0x7F,0x82,0x08,0x82,0x0C,0x82,0x14,0xFA,0x12,0x84,0x22,0x80,0x21,0x80,0x40,0xFE,/*6*/ 324 | "形",0x00,0x00,0x00,0x00,0x7F,0x84,0x22,0x08,0x22,0x30,0x22,0xC0,0x22,0x02,0x22,0x04, 325 | 0x7F,0xC8,0x22,0x30,0x22,0xC2,0x22,0x02,0x22,0x04,0x22,0x08,0x22,0x30,0x40,0x40,/*7*/ 326 | "画",0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x0F,0xF0,0x11,0x10,0x11,0x10,0x11,0x10, 327 | 0x51,0x12,0x5F,0xF2,0x51,0x12,0x51,0x12,0x51,0x12,0x4F,0xF2,0x40,0x02,0x7F,0xFC,/*8*/ 328 | "圆",0x00,0x00,0x00,0x00,0x7F,0xFE,0x47,0xE2,0x48,0x12,0x48,0x12,0x47,0xE2,0x4F,0xF2, 329 | 0x50,0x12,0x50,0x12,0x51,0x12,0x51,0x12,0x42,0x92,0x44,0x72,0x58,0x0A,0x3F,0xFC,/*9*/ 330 | "图",0x00,0x00,0x00,0x00,0x3F,0xFE,0x44,0x02,0x47,0xF2,0x4C,0x22,0x53,0x62,0x40,0x82, 331 | 0x43,0x62,0x5E,0x1A,0x41,0x82,0x40,0x62,0x43,0x02,0x40,0xC2,0x40,0x22,0x3F,0xFC,/*0*/ 332 | "片",0x00,0x00,0x00,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x3F,0xFE,0x20,0x00,0x20,0x00, 333 | 0x20,0x00,0x3F,0xE0,0x20,0x10,0x20,0x10,0x20,0x10,0x20,0x10,0x40,0x10,0x40,0x10,/*1*/ 334 | "显",0x00,0x00,0x00,0x00,0x3F,0xFC,0x20,0x04,0x20,0x04,0x3F,0xFC,0x20,0x04,0x20,0x04, 335 | 0x1F,0xF8,0x24,0x44,0x14,0x48,0x14,0x48,0x14,0x48,0x0C,0x50,0x04,0x40,0x7F,0xFE,/*2*/ 336 | "示",0x00,0x00,0x00,0x00,0x3F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x80, 337 | 0x08,0x90,0x08,0x88,0x10,0x88,0x10,0x84,0x20,0x84,0x20,0x82,0x40,0x82,0x07,0x80,/*3*/ 338 | "菜",0x00,0x00,0x00,0x20,0x08,0x20,0x7F,0xFE,0x00,0x20,0x00,0x78,0x3F,0x88,0x11,0x08, 339 | 0x08,0x90,0x09,0x20,0x7F,0xFE,0x01,0x80,0x03,0x40,0x0D,0x30,0x31,0x0C,0x40,0x02,/*4*/ 340 | "单",0x00,0x00,0x00,0x10,0x08,0x10,0x04,0x20,0x3F,0xF8,0x21,0x04,0x21,0x04,0x3F,0xFC, 341 | 0x21,0x04,0x21,0x04,0x3F,0xF8,0x01,0x00,0x7F,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,/*5*/ 342 | "中",0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xFC,0x21,0x04,0x21,0x04,0x21,0x04, 343 | 0x21,0x04,0x21,0x04,0x21,0x04,0x3F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,/*0*/ 344 | "英",0x00,0x00,0x00,0x00,0x08,0x20,0x7F,0xFE,0x08,0x20,0x09,0x20,0x01,0x00,0x3F,0xF8, 345 | 0x21,0x08,0x21,0x08,0x21,0x08,0x1F,0xF4,0x01,0x40,0x02,0x20,0x0C,0x10,0x70,0x0E,/*1*/ 346 | "文",0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x80,0x3F,0x7C,0x08,0x10,0x08,0x10,0x04,0x10, 347 | 0x04,0x20,0x02,0x20,0x02,0x40,0x01,0x80,0x01,0x80,0x02,0x60,0x1C,0x18,0xE0,0x06,/*2*/ 348 | "综",0x00,0x00,0x00,0x00,0x10,0x20,0x11,0xFE,0x22,0x02,0x22,0x02,0x49,0xFC,0x58,0x00, 349 | 0x30,0x00,0x13,0xFE,0x25,0x28,0x79,0x24,0x01,0x24,0x0D,0x24,0x72,0x22,0x02,0xA2,/*4*/ 350 | "合",0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x40,0x04,0x30,0x18,0x08,0x60,0x06,0x1F,0xF8, 351 | 0x00,0x00,0x1F,0xF8,0x20,0x04,0x20,0x04,0x20,0x04,0x20,0x04,0x20,0x04,0x1F,0xF8,/*5*/ 352 | "亮",0x00,0x00,0x01,0x00,0x01,0x00,0x7F,0xFE,0x00,0x00,0x3F,0xF8,0x20,0x08,0x3F,0xF8, 353 | 0x3F,0xF8,0x40,0x06,0x47,0xC2,0x48,0x24,0x08,0x20,0x08,0x22,0x10,0x22,0x60,0x3E,/*0*/ 354 | "度",0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0xFE,0x44,0x10,0x5F,0xFC,0x44,0x10,0x44,0x10, 355 | 0x43,0xF0,0x40,0x00,0x5F,0xF8,0x44,0x08,0x42,0x30,0x41,0xC0,0x43,0x60,0xBC,0x1E,/*1*/ 356 | "测",0x00,0x00,0x00,0x00,0x67,0xC2,0x14,0x52,0x05,0x52,0x05,0x52,0xC5,0x52,0x25,0x52, 357 | 0x05,0x52,0x05,0x52,0x15,0x52,0x17,0x52,0x22,0x82,0x22,0x42,0x44,0x42,0x48,0x3E,/*2*/ 358 | "试",0x00,0x00,0x00,0x00,0x20,0x14,0x10,0x14,0x17,0xFE,0x00,0x12,0x00,0x10,0x60,0x10, 359 | 0x13,0xF0,0x10,0x90,0x10,0x90,0x10,0x90,0x14,0x92,0x14,0xEA,0x1F,0x0A,0x00,0x06,/*3*/ 360 | "程",0x00,0x00,0x00,0x00,0x19,0xFE,0x72,0x02,0x12,0x02,0x12,0x02,0x7D,0xFC,0x18,0x00, 361 | 0x1B,0xFE,0x34,0x20,0x50,0x20,0x53,0xFE,0x10,0x20,0x10,0x20,0x10,0x20,0x13,0xFE,/*8*/ 362 | "序",0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0xFE,0x40,0x00,0x47,0xFC,0x42,0x08,0x41,0x30, 363 | 0x40,0xC0,0x5F,0xFE,0x40,0x42,0x40,0x42,0x40,0x44,0x40,0x48,0x40,0x40,0x44,0x40,/*9*/ 364 | "调",0x00,0x00,0x00,0x00,0x23,0xFE,0x12,0x22,0x02,0xFA,0x02,0x22,0xE2,0x22,0x12,0xFE, 365 | 0x12,0x72,0x12,0x8A,0x12,0x8A,0x12,0x8A,0x16,0xBA,0x1A,0x42,0x12,0x02,0x04,0x0E,/*0*/ 366 | "光",0x00,0x00,0x01,0x00,0x01,0x04,0x11,0x08,0x09,0x08,0x09,0x10,0x09,0x20,0x7F,0xFE, 367 | 0x04,0x40,0x04,0x40,0x04,0x40,0x04,0x40,0x08,0x42,0x08,0x42,0x10,0x42,0x60,0x7C,/*1*/ 368 | "版",0x00,0x00,0x00,0x00,0x48,0xFE,0x49,0x00,0x49,0x00,0x49,0x00,0x7E,0xFE,0x41,0x82, 369 | 0x41,0x44,0x79,0x44,0x45,0x28,0x45,0x28,0x45,0x10,0x45,0x28,0x46,0x44,0x03,0x82,/*10*/ 370 | "权",0x00,0x00,0x10,0x00,0x10,0x00,0x13,0xFC,0x7D,0x04,0x11,0x04,0x19,0x04,0x18,0x84, 371 | 0x34,0x88,0x50,0x48,0x50,0x50,0x10,0x20,0x10,0x50,0x10,0x88,0x13,0x04,0x14,0x02,/*11*/ 372 | "所",0x00,0x00,0x00,0x00,0x3F,0x7C,0x20,0x40,0x20,0x40,0x3E,0x40,0x22,0x7E,0x22,0x44, 373 | 0x22,0x44,0x22,0x44,0x3E,0x84,0x20,0x84,0x20,0x84,0x40,0x84,0x41,0x04,0x42,0x04,/*12*/ 374 | #endif 375 | }; 376 | typedef struct 377 | { 378 | unsigned char Index[2]; 379 | char Msk[72]; 380 | }typFNT_GB24; 381 | 382 | const typFNT_GB24 tfont24[] PROGMEM = 383 | { 384 | 385 | "深",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x06,0x7F,0x38,0x02, 386 | 0x40,0x20,0x00,0xC1,0x00,0x00,0xD8,0xC0,0x00,0x10,0x40,0x38,0x26,0x00,0x18,0x46, 387 | 0x00,0x00,0x02,0xE0,0x00,0x1F,0x80,0x02,0x66,0x00,0x04,0x0B,0x00,0x04,0x1A,0x80, 388 | 0x0C,0x12,0xC0,0x18,0x26,0x70,0x18,0xC6,0x3C,0x09,0x06,0x00,0x00,0x04,0x00,0x00, 389 | 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"深",0*/ 390 | "圳",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x18,0x06,0x00,0x10,0x02, 391 | 0x00,0x10,0x02,0x00,0x10,0x02,0x19,0x10,0x02,0x19,0x10,0x02,0x19,0x10,0x07,0x99, 392 | 0x10,0x02,0x19,0x10,0x02,0x19,0x10,0x02,0x59,0x10,0x03,0x99,0x10,0x06,0x11,0x10, 393 | 0x38,0x11,0x10,0x10,0x11,0x10,0x00,0x20,0x10,0x00,0x40,0x10,0x00,0x00,0x10,0x00, 394 | 0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x00,/*"圳",1*/ 395 | "市",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x00,0x08,0x00,0x00, 396 | 0x01,0xF8,0x01,0xFF,0xC0,0x3E,0x10,0x00,0x00,0x10,0x00,0x00,0x13,0xC0,0x03,0xFC, 397 | 0xC0,0x02,0x10,0xC0,0x02,0x10,0xC0,0x02,0x10,0xC0,0x02,0x10,0xC0,0x02,0x13,0xC0, 398 | 0x02,0x10,0x80,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00, 399 | 0x10,0x00,0x00,0x10,0x00,0x00,0x00,0x00,/*"市",2*/ 400 | "全",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00, 401 | 0x30,0x00,0x00,0x68,0x00,0x00,0x44,0x00,0x00,0xC2,0x00,0x01,0x81,0x80,0x01,0x01, 402 | 0xC0,0x02,0x0E,0xF0,0x04,0xF8,0x3E,0x18,0x10,0x00,0x20,0x10,0x00,0x00,0x3E,0x00, 403 | 0x00,0xD0,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x17,0xE0,0x0F,0xFC,0xF0,0x04, 404 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"全",3*/ 405 | "动",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x01,0xC0,0x00,0x00,0x80,0x00, 406 | 0x00,0x80,0x01,0xE1,0x80,0x03,0x01,0x90,0x00,0x01,0xFC,0x00,0x07,0x08,0x01,0xF1, 407 | 0x08,0x7E,0x03,0x18,0x03,0x02,0x18,0x02,0x42,0x18,0x04,0x66,0x10,0x05,0xB4,0x10, 408 | 0x0E,0x14,0x10,0x08,0x08,0x30,0x00,0x18,0x20,0x00,0x31,0xE0,0x00,0x60,0xC0,0x00, 409 | 0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,/*"动",4*/ 410 | "电",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00, 411 | 0x20,0x00,0x00,0x21,0x80,0x00,0x7F,0xC0,0x0F,0xA0,0xC0,0x0C,0x20,0xC0,0x04,0x3D, 412 | 0x80,0x05,0xF1,0x80,0x04,0x21,0x00,0x04,0x21,0x00,0x04,0xFE,0x00,0x03,0x60,0x00, 413 | 0x00,0x60,0x00,0x00,0x20,0x10,0x00,0x20,0x08,0x00,0x30,0x18,0x00,0x1F,0xF8,0x00, 414 | 0x03,0x80,0x00,0x00,0x00,0x00,0x00,0x00,/*"电",5*/ 415 | "子",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x79,0x80,0x01, 416 | 0xC3,0x80,0x00,0x06,0x00,0x00,0x04,0x00,0x00,0x38,0x00,0x00,0x18,0x18,0x00,0x0F, 417 | 0xFC,0x0F,0xF8,0x00,0x38,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00, 418 | 0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0xF8,0x00,0x00, 419 | 0x38,0x00,0x00,0x10,0x00,0x00,0x00,0x00,/*"子",6*/ 420 | "技",0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x01,0x83,0x80,0x01,0x01,0x00,0x01, 421 | 0x01,0x00,0x01,0x01,0x20,0x01,0x03,0xE0,0x01,0xDF,0x00,0x1F,0x01,0x00,0x01,0x03, 422 | 0x00,0x01,0x42,0xC0,0x01,0x8F,0xC0,0x03,0x00,0xC0,0x0D,0x18,0xC0,0x39,0x04,0x80, 423 | 0x31,0x03,0x80,0x01,0x01,0x00,0x01,0x06,0xC0,0x07,0x1C,0x70,0x03,0x20,0x3E,0x00, 424 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"技",7*/ 425 | "术",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x70,0x00,0x00,0x21,0x80,0x00, 426 | 0x20,0xC0,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x2F,0x80,0x00,0xFC,0x00,0x0F,0xE0, 427 | 0x00,0x00,0xF0,0x00,0x00,0xA8,0x00,0x01,0xA4,0x00,0x03,0x23,0x00,0x06,0x23,0x80, 428 | 0x0C,0x21,0xE0,0x18,0x20,0xFC,0x20,0x20,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00, 429 | 0x20,0x00,0x00,0x20,0x00,0x00,0x00,0x00,/*"术",8*/ 430 | "有",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x10,0x00,0x00, 431 | 0x11,0xFC,0x03,0xFE,0x00,0x0C,0x20,0x00,0x00,0x60,0x00,0x00,0x43,0x00,0x00,0xFD, 432 | 0x80,0x01,0xC1,0x80,0x01,0x41,0x80,0x02,0x7D,0x80,0x04,0x41,0x80,0x08,0x41,0x80, 433 | 0x30,0x7D,0x80,0x00,0x41,0x80,0x00,0x41,0x80,0x00,0xC1,0x80,0x00,0x85,0x80,0x00, 434 | 0x83,0x80,0x00,0x01,0x00,0x00,0x00,0x00,/*"有",9*/ 435 | "限",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x03,0x9E,0xC0,0x1D, 436 | 0x90,0xC0,0x11,0x10,0x80,0x12,0x1E,0x80,0x12,0x10,0x80,0x12,0x10,0x80,0x11,0x17, 437 | 0x00,0x19,0x18,0x60,0x1F,0x98,0xC0,0x18,0x15,0x80,0x18,0x13,0x00,0x18,0x11,0x80, 438 | 0x18,0x10,0xE0,0x18,0x12,0x78,0x18,0x14,0x3C,0x18,0x1C,0x00,0x10,0x38,0x00,0x00, 439 | 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"限",10*/ 440 | "公",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00, 441 | 0x04,0x00,0x00,0x04,0x00,0x01,0x82,0x00,0x01,0x83,0x00,0x01,0x81,0x80,0x03,0x00, 442 | 0xC0,0x03,0x00,0xE0,0x06,0x20,0x78,0x04,0x30,0x3E,0x08,0x30,0x00,0x10,0x20,0x00, 443 | 0x60,0x42,0x00,0x00,0x41,0x00,0x00,0x9F,0x80,0x03,0xE1,0x80,0x03,0x00,0x80,0x00, 444 | 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,/*"公",11*/ 445 | "司",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x01,0xFC,0x70,0x00, 446 | 0x00,0x30,0x00,0x00,0x20,0x00,0x1C,0x20,0x03,0xF0,0x20,0x00,0x00,0x20,0x00,0x00, 447 | 0x20,0x00,0x3C,0x20,0x07,0xCC,0x20,0x06,0x0C,0x20,0x02,0x08,0x20,0x02,0x08,0x20, 448 | 0x03,0xF0,0x20,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x02,0x60,0x00,0x01,0xE0,0x00, 449 | 0x00,0xE0,0x00,0x00,0xC0,0x00,0x00,0x00,/*"司",12*/ 450 | "欢",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x00, 451 | 0x04,0x00,0x00,0x04,0x00,0x01,0x8C,0x40,0x3F,0x89,0xF0,0x01,0x96,0x60,0x01,0x20, 452 | 0x40,0x09,0x0C,0x00,0x0D,0x04,0x00,0x07,0x04,0x00,0x03,0x0C,0x00,0x07,0x8E,0x00, 453 | 0x05,0x89,0x00,0x08,0x89,0x00,0x10,0x10,0x80,0x20,0x20,0xE0,0x00,0x40,0x78,0x00, 454 | 0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,/*"欢",13*/ 455 | "迎",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x0C,0x0E,0x00,0x06, 456 | 0x08,0x00,0x02,0x10,0x70,0x00,0x63,0x90,0x00,0x21,0x10,0x00,0x21,0x10,0x06,0x21, 457 | 0x30,0x1E,0x2D,0xB0,0x04,0x31,0x60,0x04,0x71,0x20,0x06,0x61,0x00,0x02,0x03,0x00, 458 | 0x02,0x03,0x00,0x7F,0x02,0x00,0x00,0xE2,0x00,0x00,0x1E,0x00,0x00,0x07,0xFC,0x00, 459 | 0x01,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,/*"迎",14*/ 460 | "您",0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x00,0x01,0x84,0x00,0x01,0x0C,0x00,0x03, 461 | 0x09,0xF0,0x02,0x16,0x38,0x06,0x24,0x40,0x09,0x42,0x00,0x11,0x02,0x00,0x21,0x22, 462 | 0x70,0x01,0x22,0x30,0x03,0x22,0x10,0x02,0x06,0x00,0x02,0x02,0x00,0x00,0x18,0x3C, 463 | 0x04,0x0C,0x0C,0x04,0x84,0x04,0x0C,0x80,0x80,0x08,0x60,0x60,0x08,0x3F,0xF0,0x00, 464 | 0x0F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,/*"您",15*/ 465 | 466 | #if 0 467 | "深",0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x08,0x0C,0x7F,0xFC,0x04, 468 | 0x40,0x10,0x01,0xC8,0xA0,0x02,0x18,0x60,0x42,0x30,0x18,0x32,0x23,0x18,0x12,0xC3, 469 | 0x00,0x14,0x03,0x00,0x04,0x03,0x0C,0x04,0x7F,0xF0,0x08,0x0F,0x80,0x08,0x0B,0x40, 470 | 0x78,0x13,0x60,0x18,0x33,0x20,0x18,0x63,0x18,0x18,0x83,0x1C,0x19,0x03,0x08,0x18, 471 | 0x03,0x00,0x00,0x03,0x00,0x00,0x00,0x00,/*0*/ 472 | "圳",0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x10,0x0C,0x04,0x18,0x0C,0x04,0x10,0x8C,0x04, 473 | 0x10,0x8C,0x04,0x10,0x8C,0x04,0x10,0x8C,0x04,0xD0,0x8C,0x3F,0x10,0x8C,0x04,0x10, 474 | 0x8C,0x04,0x10,0x8C,0x04,0x10,0x8C,0x04,0x10,0x8C,0x04,0x10,0x8C,0x04,0x10,0x8C, 475 | 0x05,0xF0,0x8C,0x0E,0x20,0x8C,0x78,0x20,0x8C,0x20,0x40,0x8C,0x00,0x80,0x8C,0x01, 476 | 0x00,0x0C,0x02,0x00,0x0C,0x00,0x00,0x00,/*1*/ 477 | "市",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x18,0x00,0x00,0x18,0x08,0x00, 478 | 0x00,0x1C,0x1F,0xFF,0xE0,0x00,0x18,0x00,0x00,0x18,0x20,0x07,0xFF,0xF0,0x04,0x18, 479 | 0x20,0x04,0x18,0x20,0x04,0x18,0x20,0x04,0x18,0x20,0x04,0x18,0x20,0x04,0x18,0x20, 480 | 0x04,0x18,0x20,0x04,0x18,0x20,0x04,0x18,0x20,0x04,0x18,0xE0,0x04,0x18,0x40,0x00, 481 | 0x18,0x00,0x00,0x18,0x00,0x00,0x00,0x00,/*2*/ 482 | "中",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00, 483 | 0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x3F,0xFF,0xFE,0x30,0x18,0x06,0x30,0x18, 484 | 0x06,0x30,0x18,0x06,0x30,0x18,0x06,0x30,0x18,0x06,0x3F,0xFF,0xFE,0x30,0x18,0x06, 485 | 0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00, 486 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*0*/ 487 | "文",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x1C,0x00,0x00, 488 | 0x06,0x00,0xFF,0xFF,0xFF,0x06,0x00,0x30,0x06,0x00,0x30,0x03,0x00,0x60,0x03,0x00, 489 | 0x60,0x01,0x80,0xC0,0x00,0xC1,0x80,0x00,0xE3,0x00,0x00,0x36,0x00,0x00,0x1C,0x00, 490 | 0x00,0x77,0x00,0x03,0xC1,0xE0,0x1E,0x00,0x3C,0x60,0x00,0x07,0x00,0x00,0x00,0x00, 491 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*1*/ 492 | "测",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x03,0x21, 493 | 0xFF,0x33,0x39,0x83,0x33,0x11,0x83,0x33,0x01,0x9B,0x33,0xC1,0x9B,0x33,0x71,0x9B, 494 | 0x33,0x19,0x9B,0x33,0x01,0x9B,0x33,0x01,0x9B,0x33,0x11,0x9B,0x33,0x19,0xB3,0x33, 495 | 0x30,0x30,0x33,0x30,0x6C,0x03,0x30,0xC6,0x03,0x63,0x83,0x03,0x2E,0x01,0xBE,0x00, 496 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*2*/ 497 | "试",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xD8,0x30, 498 | 0x00,0xCE,0x18,0x00,0xC2,0x1C,0x00,0xC0,0x01,0xFF,0xFF,0x00,0x00,0xC0,0xF8,0x00, 499 | 0xC0,0x18,0x00,0xC0,0x19,0xFF,0xC0,0x18,0x18,0x40,0x18,0x18,0x60,0x19,0x18,0x60, 500 | 0x1B,0x18,0x61,0x1E,0x18,0x31,0x1C,0x1F,0xB1,0x39,0xF0,0x19,0x10,0x00,0x0F,0x00, 501 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*3*/ 502 | #endif 503 | }; 504 | typedef struct 505 | { 506 | unsigned char Index[2]; 507 | char Msk[128]; 508 | }typFNT_GB32; 509 | //字体取模:宋体常规小四 510 | const typFNT_GB32 tfont32[] PROGMEM = 511 | { 512 | 513 | "深",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 514 | 0x00,0x00,0x03,0xE0,0x03,0x84,0x7C,0xF0,0x01,0xCF,0x80,0xE0,0x00,0xCC,0x00,0x80, 515 | 0x00,0x18,0x08,0x00,0x00,0x19,0x8F,0x00,0x00,0x11,0xC7,0x00,0x10,0x03,0x01,0x00, 516 | 0x1C,0x06,0x60,0x00,0x0C,0x04,0x30,0x00,0x04,0x00,0x30,0x00,0x00,0x00,0x37,0xC0, 517 | 0x00,0x00,0xFF,0x00,0x00,0x9F,0xF0,0x00,0x00,0x80,0x78,0x00,0x01,0x00,0xEC,0x00, 518 | 0x01,0x01,0xA6,0x00,0x03,0x03,0x23,0x00,0x06,0x02,0x23,0x80,0x0E,0x06,0x21,0xE0, 519 | 0x0E,0x08,0x20,0xF8,0x04,0x30,0x20,0x78,0x04,0x40,0x60,0x00,0x00,0x00,0x60,0x00, 520 | 0x00,0x00,0x60,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"深",0*/ 521 | "圳",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0, 522 | 0x00,0x00,0x00,0x70,0x01,0x80,0x00,0x60,0x01,0xC0,0x00,0x60,0x00,0xC0,0x00,0x60, 523 | 0x00,0xC0,0x00,0x60,0x00,0xC3,0x18,0x60,0x00,0xC1,0x8C,0x60,0x00,0xC1,0x8C,0x60, 524 | 0x00,0xC1,0x8C,0x60,0x00,0xF9,0x8C,0x60,0x07,0xE1,0x8C,0x60,0x00,0x81,0x8C,0x60, 525 | 0x00,0x81,0x8C,0x60,0x00,0x81,0x8C,0x60,0x00,0x99,0x8C,0x60,0x00,0xE1,0x8C,0x60, 526 | 0x01,0xC1,0x8C,0x60,0x0F,0x01,0x0C,0x60,0x1C,0x03,0x0C,0x60,0x08,0x03,0x00,0x60, 527 | 0x00,0x06,0x00,0x60,0x00,0x04,0x00,0x60,0x00,0x08,0x00,0x60,0x00,0x00,0x00,0x60, 528 | 0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"圳",1*/ 529 | "市",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x80,0x00, 530 | 0x00,0x03,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x3F,0xF8, 531 | 0x00,0x3F,0xFF,0xF0,0x1F,0xFD,0x80,0x00,0x08,0x01,0x80,0x00,0x00,0x01,0x80,0x00, 532 | 0x00,0x01,0x9E,0x00,0x00,0x87,0xE7,0x80,0x00,0xF9,0x03,0x00,0x00,0xC1,0x03,0x00, 533 | 0x00,0xC1,0x03,0x00,0x00,0xC1,0x03,0x00,0x00,0xC1,0x03,0x00,0x00,0xC1,0x13,0x00, 534 | 0x00,0xC1,0x1F,0x00,0x00,0x81,0x0E,0x00,0x00,0x81,0x06,0x00,0x00,0x01,0x00,0x00, 535 | 0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00, 536 | 0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,/*"市",2*/ 537 | "全",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, 538 | 0x00,0x03,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x00,0x00, 539 | 0x00,0x06,0x80,0x00,0x00,0x0C,0x40,0x00,0x00,0x1C,0x20,0x00,0x00,0x18,0x18,0x00, 540 | 0x00,0x30,0x1C,0x00,0x00,0x60,0x0F,0x00,0x00,0xE0,0x07,0x80,0x01,0xC1,0xF3,0xE0, 541 | 0x03,0x3F,0xC1,0xFC,0x06,0x03,0x00,0x00,0x0C,0x03,0x00,0x00,0x10,0x03,0x00,0x00, 542 | 0x00,0x03,0xF8,0x00,0x00,0x3F,0xC0,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00, 543 | 0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x07,0xFE,0x00,0xE0, 544 | 0x03,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"全",3*/ 545 | "动",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00, 546 | 0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00, 547 | 0x00,0x3E,0x04,0x00,0x03,0xF8,0x0C,0x00,0x00,0x00,0x0C,0xF0,0x00,0x00,0x0F,0xF8, 548 | 0x00,0x00,0x7C,0x38,0x00,0x1F,0x08,0x30,0x03,0xF8,0x18,0x30,0x3F,0xC0,0x18,0x30, 549 | 0x00,0xE0,0x18,0x30,0x00,0xC0,0x30,0x20,0x00,0x8C,0x30,0x20,0x01,0x06,0x30,0x60, 550 | 0x03,0x3E,0x60,0x60,0x07,0xC3,0x60,0x60,0x07,0x00,0xC0,0x60,0x06,0x00,0xC0,0xC0, 551 | 0x00,0x01,0x80,0xC0,0x00,0x03,0x0D,0xC0,0x00,0x06,0x07,0x80,0x00,0x0C,0x03,0x00, 552 | 0x00,0x10,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"动",4*/ 553 | "电",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00, 554 | 0x00,0x0E,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00, 555 | 0x00,0x06,0x0C,0x00,0x00,0x07,0xFF,0x00,0x07,0xFE,0x07,0x80,0x07,0x84,0x07,0x00, 556 | 0x02,0x04,0x06,0x00,0x03,0x04,0x06,0x00,0x03,0x1F,0xCE,0x00,0x03,0x7C,0x0C,0x00, 557 | 0x01,0x04,0x0C,0x00,0x01,0x04,0x08,0x00,0x01,0x04,0x78,0x00,0x01,0xFF,0xF0,0x00, 558 | 0x01,0x84,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x20, 559 | 0x00,0x06,0x00,0x20,0x00,0x06,0x00,0x30,0x00,0x03,0x80,0xF0,0x00,0x01,0xFF,0xE0, 560 | 0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"电",5*/ 561 | "子",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 562 | 0x00,0x00,0x38,0x00,0x00,0x01,0xFE,0x00,0x00,0xFE,0x1E,0x00,0x00,0x70,0x1C,0x00, 563 | 0x00,0x00,0x30,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x40,0x00,0x00,0x03,0x80,0x00, 564 | 0x00,0x01,0x80,0x00,0x00,0x01,0x8F,0xF8,0x00,0x07,0xFF,0xF8,0x0F,0xFF,0xC0,0x00, 565 | 0x1F,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00, 566 | 0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00, 567 | 0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x01,0xC0,0x00,0x00,0x1F,0xC0,0x00, 568 | 0x00,0x0F,0x80,0x00,0x00,0x03,0x80,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,/*"子",6*/ 569 | "技",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x18,0x00, 570 | 0x00,0x70,0x1C,0x00,0x00,0x60,0x1C,0x00,0x00,0x60,0x0C,0x00,0x00,0x60,0x08,0x00, 571 | 0x00,0x60,0x08,0x00,0x00,0x60,0x0F,0xC0,0x00,0x60,0x7F,0x00,0x00,0xF9,0xF8,0x00, 572 | 0x0F,0xE0,0x18,0x00,0x00,0x60,0x18,0x00,0x00,0x60,0x18,0x00,0x00,0x68,0x1F,0x00, 573 | 0x00,0x70,0x7F,0x80,0x00,0x63,0xC3,0x00,0x01,0xE0,0x03,0x00,0x03,0x61,0x82,0x00, 574 | 0x1E,0x60,0x66,0x00,0x3C,0x60,0x36,0x00,0x18,0x60,0x1C,0x00,0x00,0x60,0x1C,0x00, 575 | 0x00,0x60,0x3F,0x00,0x00,0x60,0xE3,0x80,0x01,0xE3,0xC1,0xF0,0x00,0xE4,0x00,0xFE, 576 | 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"技",7*/ 577 | "术",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00, 578 | 0x00,0x0E,0x00,0x00,0x00,0x06,0x1C,0x00,0x00,0x06,0x0E,0x00,0x00,0x06,0x03,0x00, 579 | 0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x18,0x00,0x00,0x07,0xFC,0x00, 580 | 0x00,0x1F,0xE0,0x00,0x03,0xFE,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x1F,0x00,0x00, 581 | 0x00,0x17,0x80,0x00,0x00,0x36,0xC0,0x00,0x00,0x66,0x70,0x00,0x00,0xC6,0x38,0x00, 582 | 0x01,0x86,0x1C,0x00,0x03,0x06,0x0F,0x00,0x06,0x06,0x07,0xE0,0x0C,0x06,0x03,0xFC, 583 | 0x10,0x06,0x00,0x00,0x20,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00, 584 | 0x00,0x06,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"术",8*/ 585 | "有",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0xC0,0x00, 586 | 0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x03,0x00,0x60,0x00,0x03,0x3F,0xF8, 587 | 0x00,0x3F,0xF8,0x00,0x0F,0xE6,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x0C,0x00,0x00, 588 | 0x00,0x0C,0x18,0x00,0x00,0x1D,0xFE,0x00,0x00,0x3E,0x0E,0x00,0x00,0x3C,0x0C,0x00, 589 | 0x00,0x6C,0x0C,0x00,0x00,0xCD,0xEC,0x00,0x01,0x8F,0x0C,0x00,0x03,0x08,0x0C,0x00, 590 | 0x06,0x08,0x04,0x00,0x08,0x08,0x64,0x00,0x10,0x0F,0xC4,0x00,0x00,0x08,0x04,0x00, 591 | 0x00,0x18,0x06,0x00,0x00,0x18,0x06,0x00,0x00,0x18,0x06,0x00,0x00,0x10,0x2E,0x00, 592 | 0x00,0x10,0x1C,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,/*"有",9*/ 593 | "限",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 594 | 0x00,0x00,0x0F,0x00,0x00,0x60,0x3F,0x80,0x01,0xF3,0xC7,0x00,0x0E,0x71,0x06,0x00, 595 | 0x0C,0x61,0x06,0x00,0x0C,0x41,0x36,0x00,0x04,0xC1,0xC6,0x00,0x04,0xC1,0x04,0x00, 596 | 0x04,0x41,0x04,0x00,0x04,0x41,0x1C,0x00,0x04,0x61,0xF5,0x80,0x05,0xE1,0x01,0xC0, 597 | 0x04,0xF1,0xC3,0x80,0x04,0x31,0x66,0x00,0x04,0x01,0x3C,0x00,0x04,0x01,0x18,0x00, 598 | 0x04,0x01,0x0E,0x00,0x04,0x01,0x07,0x00,0x0C,0x01,0x03,0xC0,0x0C,0x01,0x11,0xF0, 599 | 0x0C,0x01,0x20,0xFC,0x0C,0x03,0xC0,0x00,0x0C,0x03,0xC0,0x00,0x0C,0x03,0x80,0x00, 600 | 0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"限",10*/ 601 | "公",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 602 | 0x00,0x03,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x40,0x00, 603 | 0x00,0x00,0x20,0x00,0x00,0x20,0x30,0x00,0x00,0x38,0x18,0x00,0x00,0x30,0x18,0x00, 604 | 0x00,0x70,0x0C,0x00,0x00,0x60,0x06,0x00,0x00,0xE0,0x07,0x00,0x00,0xC0,0x03,0xC0, 605 | 0x01,0x80,0x03,0xE0,0x03,0x03,0x01,0xFC,0x03,0x03,0x80,0x7C,0x06,0x07,0x00,0x00, 606 | 0x08,0x06,0x00,0x00,0x10,0x0C,0x10,0x00,0x00,0x08,0x18,0x00,0x00,0x18,0x0C,0x00, 607 | 0x00,0x30,0xFE,0x00,0x00,0x7F,0x8E,0x00,0x00,0xF8,0x06,0x00,0x00,0xE0,0x06,0x00, 608 | 0x00,0x80,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"公",11*/ 609 | "司",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 610 | 0x00,0x00,0x1F,0x80,0x00,0x03,0xFF,0xC0,0x00,0x3F,0x01,0xE0,0x00,0x00,0x00,0xC0, 611 | 0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x1F,0xC0,0xC0,0x00,0x7F,0x00,0xC0, 612 | 0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x80,0xC0,0x00,0x0F,0xE0,0xC0, 613 | 0x03,0xF0,0xE0,0xC0,0x01,0x80,0xC0,0xC0,0x01,0x80,0xC0,0xC0,0x00,0x80,0xC0,0xC0, 614 | 0x00,0x80,0xC0,0xC0,0x00,0xDF,0xC0,0xC0,0x00,0xE0,0x00,0xC0,0x00,0x40,0x00,0xC0, 615 | 0x00,0x00,0x01,0xC0,0x00,0x00,0x01,0xC0,0x00,0x00,0x09,0x80,0x00,0x00,0x07,0x80, 616 | 0x00,0x00,0x07,0x80,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,/*"司",12*/ 617 | "欢",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00, 618 | 0x00,0x00,0x38,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x60,0x00, 619 | 0x00,0x00,0x60,0x00,0x00,0x00,0xC0,0x00,0x00,0xF0,0xC3,0x80,0x1F,0xF0,0x9F,0xE0, 620 | 0x00,0x31,0xE1,0xC0,0x00,0x21,0x03,0x00,0x08,0x62,0x02,0x00,0x04,0x60,0xE0,0x00, 621 | 0x03,0x60,0x60,0x00,0x01,0xC0,0x60,0x00,0x01,0xC0,0x60,0x00,0x00,0xE0,0x60,0x00, 622 | 0x01,0xF0,0xF0,0x00,0x01,0x30,0xD0,0x00,0x03,0x30,0x88,0x00,0x06,0x11,0x8C,0x00, 623 | 0x0C,0x01,0x06,0x00,0x18,0x03,0x07,0x00,0x20,0x06,0x03,0xC0,0x00,0x08,0x03,0xF0, 624 | 0x00,0x30,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"欢",13*/ 625 | "迎",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 626 | 0x00,0x00,0x60,0x00,0x00,0x00,0x70,0x00,0x03,0x80,0xE0,0x00,0x01,0xC1,0x80,0x00, 627 | 0x00,0xC3,0x01,0xE0,0x00,0x1E,0x1E,0x60,0x00,0x0C,0x18,0x60,0x00,0x06,0x18,0x60, 628 | 0x00,0x06,0x08,0x40,0x01,0x86,0x08,0x40,0x07,0xC6,0x48,0x40,0x0D,0x86,0x8B,0xC0, 629 | 0x01,0x07,0x89,0xC0,0x01,0x07,0x18,0x80,0x01,0x0E,0x18,0x00,0x01,0x8E,0x18,0x00, 630 | 0x00,0x84,0x18,0x00,0x00,0x80,0x18,0x00,0x0F,0x80,0x18,0x00,0x3C,0xF0,0x18,0x00, 631 | 0x00,0x1E,0x00,0x00,0x00,0x07,0xC0,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x3F,0xF8, 632 | 0x00,0x00,0x0F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"迎",14*/ 633 | "您",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x30,0x70,0x00, 634 | 0x00,0x30,0x60,0x00,0x00,0x30,0x60,0x00,0x00,0x60,0xC0,0x80,0x00,0xC1,0x9F,0xE0, 635 | 0x00,0xC1,0xE0,0xF0,0x01,0xC2,0x01,0x80,0x03,0x44,0x31,0x00,0x02,0x48,0x30,0x00, 636 | 0x04,0x40,0x10,0x00,0x08,0x42,0x13,0x80,0x00,0x46,0x11,0xC0,0x00,0x46,0x10,0xE0, 637 | 0x00,0xC4,0x30,0x60,0x00,0xC0,0xF0,0x00,0x00,0xC0,0x70,0x00,0x00,0x40,0x30,0xC0, 638 | 0x00,0x03,0x80,0xF8,0x01,0x01,0xC0,0x3C,0x01,0x20,0xC0,0x1C,0x03,0x20,0x40,0x04, 639 | 0x03,0x10,0x02,0x00,0x06,0x08,0x01,0x00,0x06,0x0E,0x01,0x80,0x04,0x07,0xFF,0xE0, 640 | 0x00,0x01,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"您",15*/ 641 | 642 | 643 | #if 0 644 | "字",0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0xC0,0x00, 645 | 0x00,0x01,0xC0,0xC0,0x00,0x01,0x07,0xC0,0x00,0x01,0xFF,0x00,0x02,0x1F,0xFE,0x00, 646 | 0x07,0xF0,0x1C,0x00,0x07,0xC0,0x70,0x00,0x0F,0x00,0xE0,0x00,0x0E,0x03,0xF0,0x00, 647 | 0x1C,0x0F,0xF0,0x00,0x3C,0x0F,0x70,0x00,0x3C,0x00,0xE0,0x00,0x18,0x00,0xC0,0x00, 648 | 0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x20,0x00, 649 | 0x00,0x00,0x37,0x00,0x00,0x01,0xFF,0x00,0x00,0x7F,0xF8,0x00,0x07,0xF8,0x30,0x00, 650 | 0x1F,0x80,0x30,0x00,0x00,0x80,0x30,0x00,0x00,0xC0,0x30,0x00,0x00,0x60,0x60,0x00, 651 | 0x00,0x18,0xE0,0x00,0x00,0x0F,0xC0,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,/*0*/ 652 | "体",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xE0, 653 | 0x00,0x20,0x01,0xB8,0x00,0x70,0x3F,0xF8,0x00,0x61,0xFF,0xC0,0x00,0xC3,0x03,0x00, 654 | 0x01,0xC6,0x06,0x00,0x03,0x8C,0x06,0x00,0x03,0x08,0x0C,0x00,0x06,0x08,0x0C,0x00, 655 | 0x0E,0x18,0x18,0x3F,0x1E,0x10,0x1B,0xF3,0x1F,0x90,0x3F,0x07,0x00,0x80,0x3C,0x1C, 656 | 0x01,0x90,0x70,0x7C,0x01,0x90,0x60,0xFE,0x01,0xA0,0xC3,0xF8,0x01,0xA0,0x0F,0xD8, 657 | 0x03,0xA0,0x08,0x18,0x03,0x60,0x00,0x18,0x03,0x40,0x00,0x18,0x03,0xC0,0x00,0x18, 658 | 0x03,0x80,0x00,0x18,0x03,0x00,0x00,0x18,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10, 659 | 0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*1*/ 660 | "测",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 661 | 0x02,0x0C,0x10,0x08,0x07,0x1F,0xF8,0x04,0x03,0xBF,0xF0,0x02,0x01,0xBC,0x30,0x03, 662 | 0x03,0xEC,0x30,0x03,0x01,0x5C,0x60,0x03,0x00,0xD8,0x60,0x03,0x00,0xD8,0x60,0x03, 663 | 0x80,0x98,0x62,0x03,0x61,0xB8,0x43,0x07,0x71,0xB1,0x43,0x06,0x31,0x32,0x43,0x06, 664 | 0x33,0x76,0xC3,0x06,0x3A,0x64,0xC7,0x06,0x3E,0xEC,0xC0,0x06,0x3E,0x78,0xC0,0x06, 665 | 0x3C,0x30,0x40,0x06,0x7C,0x70,0x00,0x06,0x78,0xE0,0x60,0x06,0x7B,0xFF,0xF0,0x06, 666 | 0xF7,0xC0,0x00,0x06,0xE4,0x00,0x00,0x06,0x40,0x00,0x00,0x06,0x00,0x00,0x00,0x06, 667 | 0x00,0x00,0x00,0x7C,0x00,0x00,0x8F,0xF0,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,/*2*/ 668 | "试",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x00, 669 | 0x00,0x00,0x7F,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0, 670 | 0x00,0x00,0x00,0xCE,0x03,0x80,0x00,0xCF,0xFF,0xC0,0x00,0xDD,0x41,0x80,0x0F,0xFE, 671 | 0x00,0x07,0xFF,0xFC,0x00,0x0C,0x00,0xF0,0x00,0x18,0x0F,0xC0,0x3E,0x19,0xFF,0x40, 672 | 0xF3,0x11,0xBC,0x60,0x83,0x30,0x7F,0xE0,0x03,0xB1,0xFE,0x20,0x03,0x33,0x80,0x20, 673 | 0x03,0x70,0x00,0x30,0x03,0x60,0x00,0x10,0x03,0x60,0x00,0x18,0x07,0xC0,0x00,0x0C, 674 | 0x07,0xC0,0x00,0x04,0x07,0x80,0x00,0x02,0x01,0x00,0x00,0x03,0x00,0x00,0x00,0x01, 675 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*3*/ 676 | #endif 677 | }; 678 | 679 | #endif 680 | -------------------------------------------------------------------------------- /LCDWIKI_SPI.cpp: -------------------------------------------------------------------------------- 1 | // IMPORTANT: LIBRARY MUST BE SPECIFICALLY CONFIGURED FOR EITHER TFT SHIELD 2 | // OR BREAKOUT BOARD USAGE. 3 | 4 | // Lcdwiki GUI library with init code from Rossum 5 | // MIT license 6 | 7 | 8 | #if defined(__SAM3X8E__) 9 | #include 10 | #define PROGMEM 11 | #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) 12 | #define pgm_read_word(addr) (*(const unsigned short *)(addr)) 13 | #endif 14 | 15 | #if defined(ARDUINO_ARCH_ESP8266) 16 | #define USE_HWSPI_ONLY 17 | #endif 18 | 19 | #include 20 | #include "pins_arduino.h" 21 | #include "wiring_private.h" 22 | #include "LCDWIKI_SPI.h" 23 | #include "lcd_spi_registers.h" 24 | #include "mcu_spi_magic.h" 25 | 26 | #define TFTLCD_DELAY16 0xFFFF 27 | #define TFTLCD_DELAY8 0x7F 28 | #define MAX_REG_NUM 24 29 | 30 | 31 | static uint8_t SH1106_buffer[1024] = {0}; 32 | 33 | //static uint8_t have_reset; 34 | 35 | //#define LEFT_SHIFT(x) (1<= 0) 131 | { 132 | digitalWrite(reset, HIGH); 133 | pinMode(reset, OUTPUT); 134 | } 135 | if(led >= 0) 136 | { 137 | //digitalWrite(led, HIGH); 138 | pinMode(led, OUTPUT); 139 | } 140 | xoffset = 0; 141 | yoffset = 0; 142 | rotation = 0; 143 | lcd_model = current_lcd_info[model].lcd_id; 144 | WIDTH = current_lcd_info[model].lcd_wid; 145 | HEIGHT = current_lcd_info[model].lcd_heg; 146 | /* 147 | switch(lcd_model) 148 | { 149 | case 0x7735: 150 | WIDTH = 128; 151 | HEIGHT = 160; 152 | break; 153 | case 0x9325: 154 | case 0x9328: 155 | case 0x9341: 156 | case 0x7575: 157 | case 0x9595: 158 | WIDTH = 240; 159 | HEIGHT = 320; 160 | break; 161 | case 0x9486: 162 | WIDTH = 320; 163 | HEIGHT = 480; 164 | break; 165 | default: 166 | WIDTH = 0; 167 | HEIGHT = 0; 168 | break; 169 | } 170 | */ 171 | width = WIDTH; 172 | height = HEIGHT; 173 | setWriteDir(); 174 | } 175 | 176 | // Constructor for software spi. 177 | // if modules is readable or you know the width and height of modules,you can use this constructor. 178 | LCDWIKI_SPI::LCDWIKI_SPI(int16_t wid,int16_t heg,int8_t cs, int8_t cd, int8_t miso, int8_t mosi, int8_t reset, int8_t clk, int8_t led) 179 | { 180 | _cs = cs; 181 | _cd = cd; 182 | _miso = miso; 183 | _mosi = mosi; 184 | _clk = clk; 185 | _reset = reset; 186 | _led = led; 187 | hw_spi = false; //software spi 188 | 189 | spicsPort = portOutputRegister(digitalPinToPort(_cs)); 190 | spicsPinSet = digitalPinToBitMask(_cs); 191 | spicsPinUnset = ~spicsPinSet; 192 | 193 | if(cd < 0) 194 | { 195 | spicdPort = 0; 196 | spicdPinSet = 0; 197 | spicdPinUnset = 0; 198 | } 199 | else 200 | { 201 | spicdPort = portOutputRegister(digitalPinToPort(_cd)); 202 | spicdPinSet = digitalPinToBitMask(_cd); 203 | spicdPinUnset = ~spicdPinSet; 204 | } 205 | if(miso < 0) 206 | { 207 | spimisoPort = 0; 208 | spimisoPinSet = 0; 209 | spimisoPinUnset = 0; 210 | } 211 | else 212 | { 213 | spimisoPort = portOutputRegister(digitalPinToPort(_miso)); 214 | spimisoPinSet = digitalPinToBitMask(_miso); 215 | spimisoPinUnset = ~spimisoPinSet; 216 | } 217 | 218 | spimosiPort = portOutputRegister(digitalPinToPort(_mosi)); 219 | spimosiPinSet = digitalPinToBitMask(_mosi); 220 | spimosiPinUnset = ~spimosiPinSet; 221 | 222 | spiclkPort = portOutputRegister(digitalPinToPort(_clk)); 223 | spiclkPinSet = digitalPinToBitMask(_clk); 224 | spiclkPinUnset = ~spiclkPinSet; 225 | 226 | *spicsPort |= spicsPinSet; // Set all control bits to HIGH (idle) 227 | *spicdPort |= spicdPinSet; // Signals are ACTIVE LOW 228 | *spimisoPort |= spimisoPinSet; 229 | *spimosiPort |= spimosiPinSet; 230 | *spiclkPort |= spiclkPinSet; 231 | 232 | pinMode(cs, OUTPUT); // Enable outputs 233 | pinMode(cd, OUTPUT); 234 | pinMode(miso, INPUT); 235 | pinMode(mosi, OUTPUT); 236 | pinMode(clk, OUTPUT); 237 | if(reset >= 0) 238 | { 239 | digitalWrite(reset, HIGH); 240 | pinMode(reset, OUTPUT); 241 | } 242 | if(led >= 0) 243 | { 244 | //digitalWrite(led, HIGH); 245 | pinMode(led, OUTPUT); 246 | } 247 | xoffset = 0; 248 | yoffset = 0; 249 | rotation = 0; 250 | lcd_model = 0xFFFF; 251 | setWriteDir(); 252 | WIDTH = wid; 253 | HEIGHT = heg; 254 | width = WIDTH; 255 | height = HEIGHT; 256 | } 257 | #endif 258 | 259 | // Constructor for hardware spi. 260 | // if modules is unreadable or you don't know the width and height of modules,you can use this constructor. 261 | LCDWIKI_SPI::LCDWIKI_SPI(uint16_t model,int8_t cs, int8_t cd, int8_t reset, int8_t led) 262 | { 263 | _cs = cs; 264 | _cd = cd; 265 | _miso = -1; 266 | _mosi = -1; 267 | _clk = -1; 268 | _reset = reset; 269 | _led = led; 270 | hw_spi = true; //hardware spi 271 | MODEL = model; 272 | #if defined(__AVR__) 273 | spicsPort = portOutputRegister(digitalPinToPort(_cs)); 274 | spicsPinSet = digitalPinToBitMask(_cs); 275 | spicsPinUnset = ~spicsPinSet; 276 | if(cd < 0) 277 | { 278 | spicdPort = 0; 279 | spicdPinSet = 0; 280 | spicdPinUnset = 0; 281 | } 282 | else 283 | { 284 | spicdPort = portOutputRegister(digitalPinToPort(_cd)); 285 | spicdPinSet = digitalPinToBitMask(_cd); 286 | spicdPinUnset = ~spicdPinSet; 287 | } 288 | spimisoPort = 0; 289 | spimisoPinSet = 0; 290 | spimisoPinUnset = 0; 291 | spimosiPort = 0; 292 | spimosiPinSet = 0; 293 | spimosiPinUnset = 0; 294 | spiclkPort = 0; 295 | spiclkPinSet = 0; 296 | spiclkPinUnset = 0; 297 | 298 | *spicsPort |= spicsPinSet; // Set all control bits to HIGH (idle) 299 | *spicdPort |= spicdPinSet; // Signals are ACTIVE LOW 300 | #elif defined(ARDUINO_ARCH_ESP8266) 301 | digitalWrite(_cs, HIGH); 302 | digitalWrite(_cd, HIGH); 303 | #endif 304 | pinMode(cs, OUTPUT); // Enable outputs 305 | pinMode(cd, OUTPUT); 306 | 307 | if(reset >= 0) 308 | { 309 | digitalWrite(reset, HIGH); 310 | pinMode(reset, OUTPUT); 311 | } 312 | if(led >= 0) 313 | { 314 | //digitalWrite(led, HIGH); 315 | pinMode(led, OUTPUT); 316 | } 317 | SPI.begin(); 318 | SPI.setClockDivider(SPI_CLOCK_DIV4); // 4 MHz (half speed) 319 | SPI.setBitOrder(MSBFIRST); 320 | SPI.setDataMode(SPI_MODE0); 321 | 322 | xoffset = 0; 323 | yoffset = 0; 324 | rotation = 0; 325 | lcd_model = current_lcd_info[model].lcd_id; 326 | WIDTH = current_lcd_info[model].lcd_wid; 327 | HEIGHT = current_lcd_info[model].lcd_heg; 328 | /* 329 | switch(lcd_model) 330 | { 331 | case 0x7735: 332 | WIDTH = 128; 333 | HEIGHT = 160; 334 | break; 335 | case 0x9325: 336 | case 0x9328: 337 | case 0x9341: 338 | case 0x7575: 339 | case 0x9595: 340 | WIDTH = 240; 341 | HEIGHT = 320; 342 | break; 343 | case 0x9486: 344 | WIDTH = 320; 345 | HEIGHT = 480; 346 | break; 347 | default: 348 | WIDTH = 0; 349 | HEIGHT = 0; 350 | break; 351 | } 352 | */ 353 | width = WIDTH; 354 | height = HEIGHT; 355 | setWriteDir(); 356 | } 357 | 358 | // Constructor for hardware spi. 359 | // if modules is readable or you know the width and height of modules,you can use this constructor. 360 | LCDWIKI_SPI::LCDWIKI_SPI(int16_t wid,int16_t heg,int8_t cs, int8_t cd, int8_t reset,int8_t led) 361 | { 362 | _cs = cs; 363 | _cd = cd; 364 | _miso = -1; 365 | _mosi = -1; 366 | _clk = -1; 367 | _reset = reset; 368 | _led = led; 369 | hw_spi = true; //hardware spi 370 | #if defined(__AVR__) 371 | spicsPort = portOutputRegister(digitalPinToPort(_cs)); 372 | spicsPinSet = digitalPinToBitMask(_cs); 373 | spicsPinUnset = ~spicsPinSet; 374 | if(cd < 0) 375 | { 376 | spicdPort = 0; 377 | spicdPinSet = 0; 378 | spicdPinUnset = 0; 379 | } 380 | else 381 | { 382 | spicdPort = portOutputRegister(digitalPinToPort(_cd)); 383 | spicdPinSet = digitalPinToBitMask(_cd); 384 | spicdPinUnset = ~spicdPinSet; 385 | } 386 | spimisoPort = 0; 387 | spimisoPinSet = 0; 388 | spimisoPinUnset = 0; 389 | spimosiPort = 0; 390 | spimosiPinSet = 0; 391 | spimosiPinUnset = 0; 392 | spiclkPort = 0; 393 | spiclkPinSet = 0; 394 | spiclkPinUnset = 0; 395 | 396 | *spicsPort |= spicsPinSet; // Set all control bits to HIGH (idle) 397 | *spicdPort |= spicdPinSet; // Signals are ACTIVE LOW 398 | #elif defined(ARDUINO_ARCH_ESP8266) 399 | digitalWrite(_cs, HIGH); 400 | digitalWrite(_cd, HIGH); 401 | #endif 402 | 403 | pinMode(cs, OUTPUT); // Enable outputs 404 | pinMode(cd, OUTPUT); 405 | 406 | if(reset >= 0) 407 | { 408 | digitalWrite(reset, HIGH); 409 | pinMode(reset, OUTPUT); 410 | } 411 | if(led >= 0) 412 | { 413 | //digitalWrite(led, HIGH); 414 | pinMode(led, OUTPUT); 415 | } 416 | SPI.begin(); 417 | SPI.setClockDivider(SPI_CLOCK_DIV4); // 4 MHz (half speed) 418 | SPI.setBitOrder(MSBFIRST); 419 | SPI.setDataMode(SPI_MODE0); 420 | 421 | xoffset = 0; 422 | yoffset = 0; 423 | rotation = 0; 424 | lcd_model = 0xFFFF; 425 | setWriteDir(); 426 | WIDTH = wid; 427 | HEIGHT = heg; 428 | width = WIDTH; 429 | height = HEIGHT; 430 | } 431 | 432 | // Initialization lcd modules 433 | void LCDWIKI_SPI::Init_LCD(void) 434 | { 435 | reset(); 436 | Led_control(true); 437 | if(lcd_model == 0xFFFF) 438 | { 439 | lcd_model = Read_ID(); 440 | } 441 | // uint16_t ID = Read_ID(); 442 | start(lcd_model); 443 | // Set_Rotation(0); 444 | } 445 | 446 | // Initialization common to both shield & breakout configs 447 | void LCDWIKI_SPI::reset(void) 448 | { 449 | // have_reset = 1; 450 | // setWriteDir(); 451 | CS_IDLE; 452 | RD_IDLE; 453 | WR_IDLE; 454 | if(_reset >=0) 455 | { 456 | digitalWrite(_reset, LOW); 457 | delay(2); 458 | digitalWrite(_reset, HIGH); 459 | } 460 | CS_ACTIVE; 461 | CD_COMMAND; 462 | write8(0x00); 463 | for(uint8_t i=0; i<3; i++) 464 | { 465 | WR_STROBE; // Three extra 0x00s 466 | } 467 | CS_IDLE; 468 | } 469 | 470 | void LCDWIKI_SPI::Led_control(boolean i) 471 | { 472 | if(_led >= 0) 473 | { 474 | if(i) 475 | { 476 | digitalWrite(_led, HIGH); 477 | } 478 | else 479 | { 480 | digitalWrite(_led, LOW); 481 | } 482 | } 483 | } 484 | 485 | //spi write for hardware and software 486 | void LCDWIKI_SPI::Spi_Write(uint8_t data) 487 | { 488 | if(hw_spi) 489 | { 490 | SPI.transfer(data); 491 | } 492 | else 493 | { 494 | uint8_t val = 0x80; 495 | while(val) 496 | { 497 | if(data&val) 498 | { 499 | MOSI_HIGH; 500 | } 501 | else 502 | { 503 | MOSI_LOW; 504 | } 505 | CLK_LOW; 506 | CLK_HIGH; 507 | val >>= 1; 508 | } 509 | } 510 | } 511 | 512 | //spi read for hardware and software 513 | uint8_t LCDWIKI_SPI::Spi_Read(void) 514 | { 515 | if(hw_spi) 516 | { 517 | return SPI.transfer(0xFF); 518 | } 519 | else 520 | { 521 | uint8_t val,i,d; 522 | for(i = 0;i<8; i++) 523 | { 524 | CLK_LOW; 525 | CLK_HIGH; 526 | val <<= 1; 527 | MISO_STATE(d); 528 | if(d) 529 | { 530 | val |= 0x01; 531 | } 532 | } 533 | return val; 534 | } 535 | } 536 | 537 | void LCDWIKI_SPI::Write_Cmd(uint16_t cmd) 538 | { 539 | CS_ACTIVE; 540 | writeCmd16(cmd); 541 | CS_IDLE; 542 | } 543 | 544 | void LCDWIKI_SPI::Write_Data(uint16_t data) 545 | { 546 | CS_ACTIVE; 547 | writeData16(data); 548 | CS_IDLE; 549 | } 550 | 551 | void LCDWIKI_SPI::Write_Cmd_Data(uint16_t cmd, uint16_t data) 552 | { 553 | CS_ACTIVE; 554 | writeCmdData16(cmd,data); 555 | CS_IDLE; 556 | } 557 | 558 | //Write a command and N datas 559 | void LCDWIKI_SPI::Push_Command(uint8_t cmd, uint8_t *block, int8_t N) 560 | { 561 | CS_ACTIVE; 562 | if(lcd_driver == ID_1106) 563 | { 564 | writeCmd8(cmd); 565 | } 566 | else 567 | { 568 | writeCmd16(cmd); 569 | } 570 | while (N-- > 0) 571 | { 572 | uint8_t u8 = *block++; 573 | writeData8(u8); 574 | if(N && (lcd_driver == ID_7575)) 575 | { 576 | cmd++; 577 | writeCmd16(cmd); 578 | } 579 | } 580 | CS_IDLE; 581 | } 582 | 583 | // Sets the LCD address window 584 | void LCDWIKI_SPI::Set_Addr_Window(int16_t x1, int16_t y1, int16_t x2, int16_t y2) 585 | { 586 | CS_ACTIVE; 587 | if((lcd_driver == ID_932X) || (lcd_driver == ID_9225)) 588 | { 589 | 590 | // Values passed are in current (possibly rotated) coordinate 591 | // system. 932X requires hardware-native coords regardless of 592 | // MADCTL, so rotate inputs as needed. The address counter is 593 | // set to the top-left corner -- although fill operations can be 594 | // done in any direction, the current screen rotation is applied 595 | // because some users find it disconcerting when a fill does not 596 | // occur top-to-bottom. 597 | int x, y, t; 598 | switch(rotation) 599 | { 600 | default: 601 | x = x1; 602 | y = y1; 603 | break; 604 | case 1: 605 | t = y1; 606 | y1 = x1; 607 | x1 = WIDTH - 1 - y2; 608 | y2 = x2; 609 | x2 = WIDTH - 1 - t; 610 | x = x2; 611 | y = y1; 612 | break; 613 | case 2: 614 | t = x1; 615 | x1 = WIDTH - 1 - x2; 616 | x2 = WIDTH - 1 - t; 617 | t = y1; 618 | y1 = HEIGHT - 1 - y2; 619 | y2 = HEIGHT - 1 - t; 620 | x = x2; 621 | y = y2; 622 | break; 623 | case 3: 624 | t = x1; 625 | x1 = y1; 626 | y1 = HEIGHT - 1 - x2; 627 | x2 = y2; 628 | y2 = HEIGHT - 1 - t; 629 | x = x1; 630 | y = y2; 631 | break; 632 | } 633 | if(lcd_driver == ID_932X) 634 | { 635 | writeCmdData16(ILI932X_HOR_START_AD, x1); // Set address window 636 | writeCmdData16(ILI932X_HOR_END_AD, x2); 637 | writeCmdData16(ILI932X_VER_START_AD, y1); 638 | writeCmdData16(ILI932X_VER_END_AD, y2); 639 | writeCmdData16(ILI932X_GRAM_HOR_AD, x ); // Set address counter to top left 640 | writeCmdData16(ILI932X_GRAM_VER_AD, y ); 641 | } 642 | else if(lcd_driver == ID_9225) 643 | { 644 | writeCmdData16(0x36, x2); 645 | writeCmdData16(0x37, x1); 646 | writeCmdData16(0x38, y2); 647 | writeCmdData16(0x39, y1); 648 | writeCmdData16(XC, x); 649 | writeCmdData16(YC, y); 650 | writeCmd8(CC); 651 | 652 | } 653 | } 654 | else if(lcd_driver == ID_7575) 655 | { 656 | writeCmdData8(HX8347G_COLADDRSTART_HI,x1>>8); 657 | writeCmdData8(HX8347G_COLADDRSTART_LO,x1); 658 | writeCmdData8(HX8347G_ROWADDRSTART_HI,y1>>8); 659 | writeCmdData8(HX8347G_ROWADDRSTART_LO,y1); 660 | writeCmdData8(HX8347G_COLADDREND_HI,x2>>8); 661 | writeCmdData8(HX8347G_COLADDREND_LO,x2); 662 | writeCmdData8(HX8347G_ROWADDREND_HI,y2>>8); 663 | writeCmdData8(HX8347G_ROWADDREND_LO,y2); 664 | } 665 | else if(lcd_driver == ID_1283A) 666 | { 667 | int16_t t1,t2; 668 | switch(rotation) 669 | { 670 | case 0: 671 | case 2: 672 | t1=x1; 673 | t2=x2; 674 | x1=y1+2; 675 | x2=y2+2; 676 | y1=t1+2; 677 | y2=t2+2; 678 | break; 679 | case 1: 680 | case 3: 681 | y1=y1+2; 682 | y2=y2+2; 683 | break; 684 | } 685 | writeCmd8(XC); 686 | writeData8(x2); 687 | writeData8(x1); 688 | writeCmd8(YC); 689 | writeData8(y2); 690 | writeData8(y1); 691 | writeCmd8(0x21); 692 | writeData8(x1); 693 | writeData8(y1); 694 | writeCmd8(CC); 695 | } 696 | else if(lcd_driver == ID_1106) 697 | { 698 | return; 699 | } 700 | else if(lcd_driver == ID_7735_128) 701 | { 702 | uint8_t x_buf[] = {(x1+xoffset)>>8,(x1+xoffset)&0xFF,(x2+xoffset)>>8,(x2+xoffset)&0xFF}; 703 | uint8_t y_buf[] = {(y1+yoffset)>>8,(y1+yoffset)&0xFF,(y2+yoffset)>>8,(y2+yoffset)&0xFF}; 704 | Push_Command(XC, x_buf, 4); 705 | Push_Command(YC, y_buf, 4); 706 | } 707 | else 708 | { 709 | uint8_t x_buf[] = {x1>>8,x1&0xFF,x2>>8,x2&0xFF}; 710 | uint8_t y_buf[] = {y1>>8,y1&0xFF,y2>>8,y2&0xFF}; 711 | 712 | Push_Command(XC, x_buf, 4); 713 | Push_Command(YC, y_buf, 4); 714 | } 715 | CS_IDLE; 716 | } 717 | 718 | // Unlike the 932X drivers that set the address window to the full screen 719 | // by default (using the address counter for drawPixel operations), the 720 | // 7575 needs the address window set on all graphics operations. In order 721 | // to save a few register writes on each pixel drawn, the lower-right 722 | // corner of the address window is reset after most fill operations, so 723 | // that drawPixel only needs to change the upper left each time. 724 | void LCDWIKI_SPI::Set_LR(void) 725 | { 726 | CS_ACTIVE; 727 | writeCmdData8(HX8347G_COLADDREND_HI,(width -1)>>8); 728 | writeCmdData8(HX8347G_COLADDREND_LO,width -1); 729 | writeCmdData8(HX8347G_ROWADDREND_HI,(height -1)>>8); 730 | writeCmdData8(HX8347G_ROWADDREND_LO,height -1); 731 | CS_IDLE; 732 | } 733 | 734 | //push color table for 16bits 735 | void LCDWIKI_SPI::Push_Any_Color(uint16_t * block, int16_t n, bool first, uint8_t flags) 736 | { 737 | uint16_t color; 738 | uint8_t h, l; 739 | bool isconst = flags & 1; 740 | // bool isbigend = (flags & 2) != 0; 741 | CS_ACTIVE; 742 | if (first) 743 | { 744 | if(lcd_driver == ID_932X) 745 | { 746 | writeCmd8(ILI932X_START_OSC); 747 | 748 | } 749 | writeCmd8(CC); 750 | } 751 | while (n-- > 0) 752 | { 753 | if (isconst) 754 | { 755 | color = pgm_read_word(block++); 756 | } 757 | else 758 | { 759 | color = (*block++); 760 | 761 | } 762 | if(MODEL == ILI9488_18) 763 | { 764 | writeData18(color); 765 | } 766 | else 767 | { 768 | writeData16(color); 769 | } 770 | } 771 | CS_IDLE; 772 | } 773 | 774 | //push color table for 8bits 775 | void LCDWIKI_SPI::Push_Any_Color(uint8_t * block, int16_t n, bool first, uint8_t flags) 776 | { 777 | uint16_t color; 778 | uint8_t h, l; 779 | bool isconst = flags & 1; 780 | bool isbigend = (flags & 2) != 0; 781 | CS_ACTIVE; 782 | if (first) 783 | { 784 | if(lcd_driver == ID_932X) 785 | { 786 | writeCmd8(ILI932X_START_OSC); 787 | 788 | } 789 | writeCmd8(CC); 790 | } 791 | while (n-- > 0) 792 | { 793 | if (isconst) 794 | { 795 | h = pgm_read_byte(block++); 796 | l = pgm_read_byte(block++); 797 | } 798 | else 799 | { 800 | h = (*block++); 801 | l = (*block++); 802 | } 803 | color = (isbigend) ? (h << 8 | l) : (l << 8 | h); 804 | if(MODEL == ILI9488_18) 805 | { 806 | writeData18(color); 807 | } 808 | else 809 | { 810 | writeData16(color); 811 | } 812 | } 813 | CS_IDLE; 814 | } 815 | 816 | //Pass 8-bit (each) R,G,B, get back 16-bit packed color 817 | uint16_t LCDWIKI_SPI::Color_To_565(uint8_t r, uint8_t g, uint8_t b) 818 | { 819 | return ((r& 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xF8) >> 3); 820 | } 821 | 822 | //read value from lcd register 823 | uint16_t LCDWIKI_SPI::Read_Reg(uint16_t reg, int8_t index) 824 | { 825 | uint16_t ret,high; 826 | uint8_t low; 827 | // if (!have_reset) 828 | // { 829 | // reset(); 830 | // } 831 | CS_ACTIVE; 832 | writeCmd16(reg); 833 | setReadDir(); 834 | delay(1); 835 | do 836 | { 837 | //ead8(high); 838 | //ead8(low); 839 | //et = (high << 8) | lowc 840 | read16(ret); 841 | }while (--index >= 0); 842 | // RD_IDLE; 843 | CS_IDLE; 844 | setWriteDir(); 845 | return ret; 846 | } 847 | 848 | //read graph RAM data 849 | int16_t LCDWIKI_SPI::Read_GRAM(int16_t x, int16_t y, uint16_t *block, int16_t w, int16_t h) 850 | { 851 | uint16_t ret, dummy; 852 | int16_t n = w * h; 853 | uint8_t r, g, b, tmp; 854 | Set_Addr_Window(x, y, x + w - 1, y + h - 1); 855 | while (n > 0) 856 | { 857 | CS_ACTIVE; 858 | writeCmd16(RC); 859 | setReadDir(); 860 | if(lcd_driver == ID_932X) 861 | { 862 | while(n) 863 | { 864 | for(int i =0; i< 2; i++) 865 | { 866 | read8(r); 867 | read8(r); 868 | read8(r); 869 | read8(g); 870 | } 871 | *block++ = (r<<8 | g); 872 | n--; 873 | } 874 | Set_Addr_Window(0, 0, width - 1, height - 1); 875 | } 876 | else 877 | { 878 | read8(r); 879 | while (n) 880 | { 881 | if(R24BIT == 1) 882 | { 883 | read8(r); 884 | read8(g); 885 | read8(b); 886 | ret = Color_To_565(r, g, b); 887 | } 888 | else if(R24BIT == 0) 889 | { 890 | read16(ret); 891 | } 892 | *block++ = ret; 893 | n--; 894 | } 895 | } 896 | // RD_IDLE; 897 | CS_IDLE; 898 | setWriteDir(); 899 | } 900 | return 0; 901 | } 902 | 903 | //read LCD controller chip ID 904 | uint16_t LCDWIKI_SPI::Read_ID(void) 905 | { 906 | uint16_t ret; 907 | if ((Read_Reg(0x04,0) == 0x00)&&(Read_Reg(0x04,1) == 0x8000)) 908 | { 909 | uint8_t buf[] = {0xFF, 0x83, 0x57}; 910 | Push_Command(HX8357D_SETC, buf, sizeof(buf)); 911 | ret = (Read_Reg(0xD0,0) << 16) | Read_Reg(0xD0,1); 912 | if((ret == 0x990000) || (ret == 0x900000)) 913 | { 914 | return 0x9090; 915 | } 916 | } 917 | ret = Read_Reg(0xD3,1); 918 | if(ret == 0x9341) 919 | { 920 | return 0x9341; 921 | } 922 | else if(ret == 0x9486) 923 | { 924 | return 0x9486; 925 | } 926 | else if(ret == 0x9488) 927 | { 928 | return 0x9488; 929 | } 930 | else 931 | { 932 | return Read_Reg(0, 0); 933 | } 934 | } 935 | 936 | //set x,y coordinate and color to draw a pixel point 937 | void LCDWIKI_SPI::Draw_Pixe(int16_t x, int16_t y, uint16_t color) 938 | { 939 | if((x < 0) || (y < 0) || (x > Get_Width()) || (y > Get_Height())) 940 | { 941 | return; 942 | } 943 | Set_Addr_Window(x, y, x, y); 944 | CS_ACTIVE; 945 | if(lcd_driver == ID_1283A) 946 | { 947 | writeData16(color); 948 | } 949 | else if(lcd_driver == ID_1106) 950 | { 951 | if(color) 952 | { 953 | SH1106_buffer[(y/8)*WIDTH+x]|= (1<<(y%8))&0xff; 954 | } 955 | else 956 | { 957 | SH1106_buffer[(y/8)*WIDTH+x]&= ~((1<<(y%8))&0xff); 958 | } 959 | } 960 | else 961 | { 962 | if(MODEL == ILI9488_18) 963 | { 964 | writeCmd8(CC); 965 | writeData18(color); 966 | } 967 | else 968 | { 969 | writeCmdData16(CC, color); 970 | } 971 | } 972 | CS_IDLE; 973 | } 974 | 975 | //fill area from x to x+w,y to y+h 976 | void LCDWIKI_SPI::Fill_Rect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) 977 | { 978 | int16_t end; 979 | if (w < 0) 980 | { 981 | w = -w; 982 | x -= w; 983 | } //+ve w 984 | end = x + w; 985 | if (x < 0) 986 | { 987 | x = 0; 988 | } 989 | if (end > Get_Width()) 990 | { 991 | end = Get_Width(); 992 | } 993 | w = end - x; 994 | if (h < 0) 995 | { 996 | h = -h; 997 | y -= h; 998 | } //+ve h 999 | end = y + h; 1000 | if (y < 0) 1001 | { 1002 | y = 0; 1003 | } 1004 | if (end > Get_Height()) 1005 | { 1006 | end = Get_Height(); 1007 | } 1008 | h = end - y; 1009 | Set_Addr_Window(x, y, x + w - 1, y + h - 1); 1010 | CS_ACTIVE; 1011 | if(lcd_driver == ID_1106) 1012 | { 1013 | int16_t i,j; 1014 | for(i=0;i w) 1030 | { 1031 | end = h; 1032 | h = w; 1033 | w = end; 1034 | } 1035 | while (h-- > 0) 1036 | { 1037 | end = w; 1038 | do 1039 | { 1040 | if(MODEL == ILI9488_18) 1041 | { 1042 | writeData18(color); 1043 | } 1044 | else 1045 | { 1046 | writeData16(color); 1047 | } 1048 | } while (--end != 0); 1049 | } 1050 | if(lcd_driver == ID_932X) 1051 | { 1052 | Set_Addr_Window(0, 0, width - 1, height - 1); 1053 | } 1054 | else if(lcd_driver == ID_7575) 1055 | { 1056 | Set_LR(); 1057 | } 1058 | CS_IDLE; 1059 | } 1060 | 1061 | //Scroll display 1062 | void LCDWIKI_SPI::Vert_Scroll(int16_t top, int16_t scrollines, int16_t offset) 1063 | { 1064 | int16_t bfa; 1065 | int16_t vsp; 1066 | int16_t sea = top; 1067 | if(lcd_driver == ID_7735_128) 1068 | { 1069 | bfa = HEIGHT - top - scrollines+4; 1070 | } 1071 | else 1072 | { 1073 | bfa = HEIGHT - top - scrollines; 1074 | } 1075 | if (offset <= -scrollines || offset >= scrollines) 1076 | { 1077 | offset = 0; //valid scroll 1078 | } 1079 | vsp = top + offset; // vertical start position 1080 | if (offset < 0) 1081 | { 1082 | vsp += scrollines; //keep in unsigned range 1083 | } 1084 | sea = top + scrollines - 1; 1085 | if(lcd_driver == ID_932X) 1086 | { 1087 | Write_Cmd_Data(SC1, (1 << 1) | 0x1); //!NDL, VLE, REV 1088 | Write_Cmd_Data(SC2, vsp); //VL# 1089 | } 1090 | else if(lcd_driver == ID_1283A) 1091 | { 1092 | Write_Cmd_Data(SC1,vsp); 1093 | } 1094 | else if(lcd_driver == ID_1106) 1095 | { 1096 | return; 1097 | } 1098 | else if(lcd_driver == ID_9225) 1099 | { 1100 | Write_Cmd_Data(0x32, top); 1101 | Write_Cmd_Data(SC1, sea); 1102 | Write_Cmd_Data(SC2, vsp-top); 1103 | } 1104 | else 1105 | { 1106 | uint8_t d[6]; // for multi-byte parameters 1107 | d[0] = top >> 8; //TFA 1108 | d[1] = top; 1109 | d[2] = scrollines >> 8; //VSA 1110 | d[3] = scrollines; 1111 | d[4] = bfa >> 8; //BFA 1112 | d[5] = bfa; 1113 | Push_Command(SC1, d, 6); 1114 | d[0] = vsp >> 8; //VSP 1115 | d[1] = vsp; 1116 | Push_Command(SC2, d, 2); 1117 | if(lcd_driver == ID_7575) 1118 | { 1119 | d[0] = (offset != 0) ? 0x08:0; 1120 | Push_Command(0x01, d, 1); 1121 | } 1122 | else if (offset == 0) 1123 | { 1124 | Push_Command(0x13, NULL, 0); 1125 | } 1126 | } 1127 | } 1128 | 1129 | //get lcd width 1130 | int16_t LCDWIKI_SPI::Get_Width(void) const 1131 | { 1132 | return width; 1133 | } 1134 | 1135 | //get lcd height 1136 | int16_t LCDWIKI_SPI::Get_Height(void) const 1137 | { 1138 | return height; 1139 | } 1140 | 1141 | //set clockwise rotation 1142 | void LCDWIKI_SPI::Set_Rotation(uint8_t r) 1143 | { 1144 | rotation = r & 3; // just perform the operation ourselves on the protected variables 1145 | width = (rotation & 1) ? HEIGHT : WIDTH; 1146 | height = (rotation & 1) ? WIDTH : HEIGHT; 1147 | CS_ACTIVE; 1148 | if((lcd_driver == ID_932X)||(lcd_driver == ID_9225)) 1149 | { 1150 | uint16_t val; 1151 | switch(rotation) 1152 | { 1153 | case 0: 1154 | val = 0x1030; //0 degree 1155 | break; 1156 | case 1: 1157 | val = 0x1028; //90 degree 1158 | break; 1159 | case 2: 1160 | val = 0x1000; //180 degree 1161 | break; 1162 | case 3: 1163 | val = 0x1018; //270 degree 1164 | break; 1165 | } 1166 | writeCmdData16(MD, val); 1167 | } 1168 | else if(lcd_driver == ID_7735) 1169 | { 1170 | uint8_t val; 1171 | switch(rotation) 1172 | { 1173 | case 0: 1174 | val = 0xD0; //0 degree 1175 | break; 1176 | case 1: 1177 | val = 0xA0; //90 degree 1178 | break; 1179 | case 2: 1180 | val = 0x00; //180 degree 1181 | break; 1182 | case 3: 1183 | val = 0x60; //270 degree 1184 | break; 1185 | } 1186 | writeCmdData8(MD, val); 1187 | } 1188 | else if(lcd_driver == ID_7735_128) 1189 | { 1190 | uint8_t val; 1191 | switch(rotation) 1192 | { 1193 | case 0: 1194 | val = 0xD8; //0 degree 1195 | xoffset = 2; 1196 | yoffset = 3; 1197 | break; 1198 | case 1: 1199 | val = 0xA8; //90 degree 1200 | xoffset = 3; 1201 | yoffset = 2; 1202 | break; 1203 | case 2: 1204 | val = 0x08; //180 degree 1205 | xoffset = 2; 1206 | yoffset = 1; 1207 | break; 1208 | case 3: 1209 | val = 0x68; //270 degree 1210 | xoffset = 1; 1211 | yoffset = 2; 1212 | break; 1213 | } 1214 | writeCmdData8(MD, val); 1215 | } 1216 | else if(lcd_driver == ID_1283A) 1217 | { 1218 | switch(rotation) 1219 | { 1220 | case 0: 1221 | case 2: 1222 | writeCmdData16(0x01, 0x2183); 1223 | writeCmdData16(0x03, 0x6830); 1224 | break; 1225 | case 1: 1226 | case 3: 1227 | writeCmdData16(0x01, 0x2283); 1228 | writeCmdData16(0x03, 0x6838); 1229 | break; 1230 | } 1231 | } 1232 | else if(lcd_driver == ID_1106) 1233 | { 1234 | return; 1235 | } 1236 | else if(lcd_driver == ID_9486) 1237 | { 1238 | uint8_t val; 1239 | switch (rotation) 1240 | { 1241 | case 0: 1242 | val = ILI9341_MADCTL_BGR; //0 degree 1243 | break; 1244 | case 1: 1245 | val = ILI9341_MADCTL_MX | ILI9341_MADCTL_MV | ILI9341_MADCTL_ML | ILI9341_MADCTL_BGR ; //90 degree 1246 | break; 1247 | case 2: 1248 | val = ILI9341_MADCTL_MY | ILI9341_MADCTL_MX |ILI9341_MADCTL_BGR; //180 degree 1249 | break; 1250 | case 3: 1251 | val = ILI9341_MADCTL_MY | ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR; //270 degree 1252 | break; 1253 | } 1254 | writeCmdData8(MD, val); 1255 | } 1256 | else if(lcd_driver == ID_9488) 1257 | { 1258 | uint8_t val; 1259 | switch (rotation) 1260 | { 1261 | case 0: 1262 | val = ILI9341_MADCTL_MX | ILI9341_MADCTL_MY | ILI9341_MADCTL_BGR ; //0 degree 1263 | break; 1264 | case 1: 1265 | val = ILI9341_MADCTL_MV | ILI9341_MADCTL_MY | ILI9341_MADCTL_BGR ; //90 degree 1266 | break; 1267 | case 2: 1268 | val = ILI9341_MADCTL_ML | ILI9341_MADCTL_BGR; //180 degree 1269 | break; 1270 | case 3: 1271 | val = ILI9341_MADCTL_MX | ILI9341_MADCTL_ML | ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR; //270 degree 1272 | break; 1273 | } 1274 | writeCmdData8(MD, val); 1275 | } 1276 | else 1277 | { 1278 | uint8_t val; 1279 | switch (rotation) 1280 | { 1281 | case 0: 1282 | val = ILI9341_MADCTL_MX | ILI9341_MADCTL_BGR; //0 degree 1283 | break; 1284 | case 1: 1285 | val = ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR; //90 degree 1286 | break; 1287 | case 2: 1288 | val = ILI9341_MADCTL_MY | ILI9341_MADCTL_ML |ILI9341_MADCTL_BGR; //180 degree 1289 | break; 1290 | case 3: 1291 | val = ILI9341_MADCTL_MX | ILI9341_MADCTL_MY| ILI9341_MADCTL_ML | ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR; //270 degree 1292 | break; 1293 | } 1294 | writeCmdData8(MD, val); 1295 | } 1296 | Set_Addr_Window(0, 0, width - 1, height - 1); 1297 | Vert_Scroll(0, HEIGHT, 0); 1298 | CS_IDLE; 1299 | } 1300 | 1301 | //get current rotation 1302 | //0 : 0 degree 1303 | //1 : 90 degree 1304 | //2 : 180 degree 1305 | //3 : 270 degree 1306 | uint8_t LCDWIKI_SPI::Get_Rotation(void) const 1307 | { 1308 | return rotation; 1309 | } 1310 | 1311 | //Anti color display 1312 | void LCDWIKI_SPI::Invert_Display(boolean i) 1313 | { 1314 | CS_ACTIVE; 1315 | uint8_t val = VL^i; 1316 | if(lcd_driver == ID_932X) 1317 | { 1318 | writeCmdData8(0x61, val); 1319 | } 1320 | else if(lcd_driver == ID_7575) 1321 | { 1322 | writeCmdData8(0x01, val ? 8 : 10); 1323 | } 1324 | else if(lcd_driver == ID_1283A) 1325 | { 1326 | uint16_t reg; 1327 | if((rotation == 0)||(rotation == 2)) 1328 | { 1329 | if(val) 1330 | { 1331 | reg=0x2183; 1332 | } 1333 | else 1334 | { 1335 | reg=0x0183; 1336 | } 1337 | } 1338 | else if((rotation == 1) || (rotation == 3)) 1339 | { 1340 | if(val) 1341 | { 1342 | reg=0x2283; 1343 | } 1344 | else 1345 | { 1346 | reg=0x0283; 1347 | } 1348 | } 1349 | writeCmdData16(0x01,reg); 1350 | } 1351 | else if(lcd_driver == ID_1106) 1352 | { 1353 | writeCmd8(val ? 0xA6 : 0xA7); 1354 | } 1355 | else if(lcd_driver == ID_9225) 1356 | { 1357 | writeCmdData16(0x07,0x13|(val<<2)); 1358 | } 1359 | else 1360 | { 1361 | writeCmd8(val ? 0x21 : 0x20); 1362 | } 1363 | CS_IDLE; 1364 | } 1365 | 1366 | void LCDWIKI_SPI::SH1106_Draw_Bitmap(uint8_t x,uint8_t y,uint8_t width, uint8_t height, uint8_t *BMP, uint8_t mode) 1367 | { 1368 | uint8_t i,j,k; 1369 | uint8_t tmp; 1370 | for(i=0;i<(height+7)/8;i++) 1371 | { 1372 | for(j=0;j>=1; 1393 | } 1394 | } 1395 | } 1396 | } 1397 | 1398 | void LCDWIKI_SPI::SH1106_Display(void) 1399 | { 1400 | u8 i,n; 1401 | CS_ACTIVE; 1402 | for(i=0;i<8;i++) 1403 | { 1404 | writeCmd8(YC+i); 1405 | writeCmd8(0x02); 1406 | writeCmd8(XC); 1407 | for(n=0;n 0) 1420 | { 1421 | uint8_t cmd = pgm_read_byte(p++); 1422 | uint8_t len = pgm_read_byte(p++); 1423 | if (cmd == TFTLCD_DELAY8) 1424 | { 1425 | delay(len); 1426 | len = 0; 1427 | } 1428 | else 1429 | { 1430 | for (i = 0; i < len; i++) 1431 | { 1432 | dat[i] = pgm_read_byte(p++); 1433 | } 1434 | Push_Command(cmd,dat,len); 1435 | } 1436 | size -= len + 2; 1437 | } 1438 | } 1439 | 1440 | void LCDWIKI_SPI:: init_table16(const void *table, int16_t size) 1441 | { 1442 | uint16_t *p = (uint16_t *) table; 1443 | while (size > 0) 1444 | { 1445 | uint16_t cmd = pgm_read_word(p++); 1446 | uint16_t d = pgm_read_word(p++); 1447 | if (cmd == TFTLCD_DELAY16) 1448 | { 1449 | delay(d); 1450 | } 1451 | else 1452 | { 1453 | Write_Cmd_Data(cmd, d); //static function 1454 | } 1455 | size -= 2 * sizeof(int16_t); 1456 | } 1457 | } 1458 | 1459 | void LCDWIKI_SPI::start(uint16_t ID) 1460 | { 1461 | reset(); 1462 | delay(200); 1463 | switch(ID) 1464 | { 1465 | case 0x9325: 1466 | case 0x9328: 1467 | lcd_driver = ID_932X; 1468 | //WIDTH = 240,HEIGHT = 320; 1469 | //width = WIDTH, height = HEIGHT; 1470 | XC=0,YC=0,CC=ILI932X_RW_GRAM,RC=ILI932X_RW_GRAM,SC1=ILI932X_GATE_SCAN_CTRL2,SC2=ILI932X_GATE_SCAN_CTRL3,MD=0x0003,VL=1,R24BIT=0; 1471 | static const uint16_t ILI932x_regValues[] PROGMEM = 1472 | { 1473 | ILI932X_START_OSC , 0x0001, // Start oscillator 1474 | TFTLCD_DELAY16 , 50, // 50 millisecond delay 1475 | ILI932X_DRIV_OUT_CTRL , 0x0100, 1476 | ILI932X_DRIV_WAV_CTRL , 0x0700, 1477 | ILI932X_ENTRY_MOD , 0x1030, 1478 | ILI932X_RESIZE_CTRL , 0x0000, 1479 | ILI932X_DISP_CTRL2 , 0x0202, 1480 | ILI932X_DISP_CTRL3 , 0x0000, 1481 | ILI932X_DISP_CTRL4 , 0x0000, 1482 | ILI932X_RGB_DISP_IF_CTRL1, 0x0, 1483 | ILI932X_FRM_MARKER_POS , 0x0, 1484 | ILI932X_RGB_DISP_IF_CTRL2, 0x0, 1485 | ILI932X_POW_CTRL1 , 0x0000, 1486 | ILI932X_POW_CTRL2 , 0x0007, 1487 | ILI932X_POW_CTRL3 , 0x0000, 1488 | ILI932X_POW_CTRL4 , 0x0000, 1489 | TFTLCD_DELAY16 , 200, 1490 | ILI932X_POW_CTRL1 , 0x1690, 1491 | ILI932X_POW_CTRL2 , 0x0227, 1492 | TFTLCD_DELAY16 , 50, 1493 | ILI932X_POW_CTRL3 , 0x001A, 1494 | TFTLCD_DELAY16 , 50, 1495 | ILI932X_POW_CTRL4 , 0x1800, 1496 | ILI932X_POW_CTRL7 , 0x002A, 1497 | TFTLCD_DELAY16 , 50, 1498 | ILI932X_GAMMA_CTRL1 , 0x0000, 1499 | ILI932X_GAMMA_CTRL2 , 0x0000, 1500 | ILI932X_GAMMA_CTRL3 , 0x0000, 1501 | ILI932X_GAMMA_CTRL4 , 0x0206, 1502 | ILI932X_GAMMA_CTRL5 , 0x0808, 1503 | ILI932X_GAMMA_CTRL6 , 0x0007, 1504 | ILI932X_GAMMA_CTRL7 , 0x0201, 1505 | ILI932X_GAMMA_CTRL8 , 0x0000, 1506 | ILI932X_GAMMA_CTRL9 , 0x0000, 1507 | ILI932X_GAMMA_CTRL10 , 0x0000, 1508 | ILI932X_GRAM_HOR_AD , 0x0000, 1509 | ILI932X_GRAM_VER_AD , 0x0000, 1510 | ILI932X_HOR_START_AD , 0x0000, 1511 | ILI932X_HOR_END_AD , 0x00EF, 1512 | ILI932X_VER_START_AD , 0X0000, 1513 | ILI932X_VER_END_AD , 0x013F, 1514 | ILI932X_GATE_SCAN_CTRL1 , 0xA700, // Driver Output Control (R60h) 1515 | ILI932X_GATE_SCAN_CTRL2 , 0x0003, // Driver Output Control (R61h) 1516 | ILI932X_GATE_SCAN_CTRL3 , 0x0000, // Driver Output Control (R62h) 1517 | ILI932X_PANEL_IF_CTRL1 , 0X0010, // Panel Interface Control 1 (R90h) 1518 | ILI932X_PANEL_IF_CTRL2 , 0X0000, 1519 | ILI932X_PANEL_IF_CTRL3 , 0X0003, 1520 | ILI932X_PANEL_IF_CTRL4 , 0X1100, 1521 | ILI932X_PANEL_IF_CTRL5 , 0X0000, 1522 | ILI932X_PANEL_IF_CTRL6 , 0X0000, 1523 | ILI932X_DISP_CTRL1 , 0x0133 // Main screen turn on 1524 | }; 1525 | init_table16(ILI932x_regValues, sizeof(ILI932x_regValues)); 1526 | break; 1527 | case 0x9341: 1528 | lcd_driver = ID_9341; 1529 | //WIDTH = 240,HEIGHT = 320; 1530 | //width = WIDTH, height = HEIGHT; 1531 | XC=ILI9341_COLADDRSET,YC=ILI9341_PAGEADDRSET,CC=ILI9341_MEMORYWRITE,RC=HX8357_RAMRD,SC1=0x33,SC2=0x37,MD=ILI9341_MADCTL,VL=0,R24BIT=1; 1532 | static const uint8_t ILI9341_regValues[] PROGMEM = 1533 | { // BOE 2.4" 1534 | ILI9341_SOFTRESET,0, //Soft Reset 1535 | TFTLCD_DELAY8, 50, 1536 | ILI9341_DISPLAYOFF, 0, //Display Off 1537 | // ILI9341_PIXELFORMAT, 1, 0x55, //Pixel read=565, write=565. 1538 | ILI9341_INTERFACECONTROL, 3, 0x01, 0x01, 0x00, //Interface Control needs EXTC=1 MV_EOR=0, TM=0, RIM=0 1539 | ILI9341_POWERCONTROLB, 3, 0x00, 0x81, 0x30, //Power Control B [00 81 30] 1540 | ILI9341_POWERONSEQ, 4, 0x64, 0x03, 0x12, 0x81, //Power On Seq [55 01 23 01] 1541 | ILI9341_DRIVERTIMINGA, 3, 0x85, 0x10, 0x78, //Driver Timing A [04 11 7A] 1542 | ILI9341_POWERCONTROLA, 5, 0x39, 0x2C, 0x00, 0x34, 0x02, //Power Control A [39 2C 00 34 02] 1543 | ILI9341_RUMPRATIO, 1, 0x20, //Pump Ratio [10] 1544 | ILI9341_DRIVERTIMINGB, 2, 0x00, 0x00, //Driver Timing B [66 00] 1545 | ILI9341_RGBSIGNAL, 1, 0x00, //RGB Signal [00] 1546 | // ILI9341_FRAMECONTROL, 2, 0x00, 0x1B, //Frame Control [00 1B] 1547 | // 0xB6, 2, 0x0A, 0xA2, 0x27, //Display Function [0A 82 27 XX] .kbv SS=1 1548 | ILI9341_INVERSIONCONRTOL, 1, 0x00, //Inversion Control [02] .kbv NLA=1, NLB=1, NLC=1 1549 | ILI9341_POWERCONTROL1, 1, 0x21, //Power Control 1 [26] 1550 | ILI9341_POWERCONTROL2, 1, 0x11, //Power Control 2 [00] 1551 | ILI9341_VCOMCONTROL1, 2, 0x3F, 0x3C, //VCOM 1 [31 3C] 1552 | ILI9341_VCOMCONTROL2, 1, 0xB5, //VCOM 2 [C0] 1553 | ILI9341_MEMCONTROL, 1, ILI9341_MADCTL_MY | ILI9341_MADCTL_BGR, 1554 | ILI9341_PIXELFORMAT, 1, 0x55, //Pixel read=565, write=565. 1555 | ILI9341_FRAMECONTROL, 2, 0x00, 0x1B, //Frame Control [00 1B] 1556 | ILI9341_MEMORYACCESS, 1, 0x48, //Memory Access [00] 1557 | ILI9341_ENABLE3G, 1, 0x00, //Enable 3G [02] 1558 | ILI9341_GAMMASET, 1, 0x01, //Gamma Set [01] 1559 | ILI9341_UNDEFINE0, 15, 0x0f, 0x26, 0x24, 0x0b, 0x0e, 0x09, 0x54, 0xa8, 0x46, 0x0c, 0x17, 0x09, 0x0f, 0x07, 0x00, 1560 | ILI9341_UNDEFINE1, 15, 0x00, 0x19, 0x1b, 0x04, 0x10, 0x07, 0x2a, 0x47, 0x39, 0x03, 0x06, 0x06, 0x30, 0x38, 0x0f, 1561 | ILI9341_ENTRYMODE, 1,0x07, 1562 | ILI9341_SLEEPOUT, 0, //Sleep Out 1563 | TFTLCD_DELAY8, 150, 1564 | ILI9341_DISPLAYON, 0 //Display On 1565 | }; 1566 | init_table8(ILI9341_regValues, sizeof(ILI9341_regValues)); 1567 | break; 1568 | case 0x9090: 1569 | lcd_driver = ID_HX8357D; 1570 | //WIDTH = 320,HEIGHT = 480; 1571 | //width = WIDTH, height = HEIGHT; 1572 | XC=ILI9341_COLADDRSET,YC=ILI9341_PAGEADDRSET,CC=HX8357_RAMWR,RC=HX8357_RAMRD,SC1=0x33,SC2=0x37,MD=HX8357_MADCTL,VL=1,R24BIT=1; 1573 | static const uint8_t HX8357D_regValues[] PROGMEM = 1574 | { 1575 | HX8357_SWRESET, 0, 1576 | HX8357D_SETC, 3, 0xFF, 0x83, 0x57, 1577 | TFTLCD_DELAY8, 250, 1578 | HX8357_SETRGB, 4, 0x00, 0x00, 0x06, 0x06, 1579 | HX8357D_SETCOM, 1, 0x25, // -1.52V 1580 | HX8357_SETOSC, 1, 0x68, // Normal mode 70Hz, Idle mode 55 Hz 1581 | HX8357_SETPANEL, 1, 0x05, // BGR, Gate direction swapped 1582 | HX8357_SETPWR1, 6, 0x00, 0x15, 0x1C, 0x1C, 0x83, 0xAA, 1583 | HX8357D_SETSTBA, 6, 0x50, 0x50, 0x01, 0x3C, 0x1E, 0x08, 1584 | // MEME GAMMA HERE 1585 | HX8357D_SETCYC, 7, 0x02, 0x40, 0x00, 0x2A, 0x2A, 0x0D, 0x78, 1586 | HX8357_COLMOD, 1, 0x55, 1587 | HX8357_MADCTL, 1, 0xC0, 1588 | HX8357_TEON, 1, 0x00, 1589 | HX8357_TEARLINE, 2, 0x00, 0x02, 1590 | HX8357_SLPOUT, 0, 1591 | TFTLCD_DELAY8, 150, 1592 | HX8357_DISPON, 0, 1593 | TFTLCD_DELAY8, 50 1594 | }; 1595 | init_table8(HX8357D_regValues, sizeof(HX8357D_regValues)); 1596 | break; 1597 | case 0x7575: 1598 | case 0x9595: 1599 | lcd_driver = ID_7575; 1600 | //WIDTH = 240,HEIGHT = 320; 1601 | //width = WIDTH, height = HEIGHT; 1602 | XC=0,YC=0,CC=0x22,RC=ILI932X_RW_GRAM,SC1=0x0E,SC2=0x14,MD=HX8347G_MEMACCESS,VL=1,R24BIT=1; 1603 | static const uint8_t HX8347G_regValues[] PROGMEM = 1604 | { 1605 | // 0xEA, 2, 0x00, 0x20, //PTBA[15:0] 1606 | // 0xEC, 2, 0x0C, 0xC4, // 1607 | 0x2E , 1 , 0x89, 1608 | 0x29 , 1 , 0x8F, 1609 | 0x2B , 1 , 0x02, 1610 | 0xE2 , 1 , 0x00, 1611 | 0xE4 , 1 , 0x01, 1612 | 0xE5 , 1 , 0x10, 1613 | 0xE6 , 1 , 0x01, 1614 | 0xE7 , 1 , 0x10, 1615 | 0xE8 , 1 , 0x70, //0x70 1616 | 0xF2 , 1 , 0x00, //0x00 1617 | 0xEA , 1 , 0x00, 1618 | 0xEB , 1 , 0x20, 1619 | 0xEC , 1 , 0x3C, 1620 | 0xED , 1 , 0xC8, 1621 | 0xE9 , 1 , 0x38, //0x38 1622 | 0xF1 , 1 , 0x01, 1623 | 1624 | // 0x40, 13, 0x01, 0x00, 0x00, 0x10, 0x0E, 0x24, 0x04, 0x50, 0x02, 0x13, 0x19, 0x19, 0x16, // 1625 | //0x50, 14, 0x1B, 0x31, 0x2F, 0x3F, 0x3F, 0x3E, 0x2F, 0x7B, 0x09, 0x06, 0x06, 0x0C, 0x1D, 0xCC, // 1626 | 1627 | // skip gamma, do later 1628 | 1629 | 0x1B , 1 , 0x1A, //0x1A 1630 | 0x1A , 1 , 0x01, //0x01 1631 | 0x24 , 1 , 0x61, //0x61 1632 | 0x25 , 1 , 0x5C, //0x5C 1633 | 0x23 , 1 , 0x88, 1634 | 0x18 , 1 , 0x36, //0x36 1635 | 0x19 , 1 , 0x01, 1636 | 0x1F , 1 , 0x88, 1637 | TFTLCD_DELAY8 , 5 , // delay 5 ms 1638 | 0x1F , 1 , 0x80, 1639 | TFTLCD_DELAY8 , 5 , 1640 | 0x1F , 1 , 0x90, 1641 | TFTLCD_DELAY8 , 5 , 1642 | 0x1F , 1 , 0xD4, //0xD4 1643 | TFTLCD_DELAY8 , 5 , 1644 | 0x17 , 1 , 0x05, 1645 | 1646 | 0x36 , 1 , 0x00, //0x09 1647 | 0x28 , 1 , 0x38, 1648 | TFTLCD_DELAY8 , 40 , 1649 | 0x28 , 1 , 0x3C, //0x3C 1650 | 0x02 , 1 , 0x00, 1651 | 0x03 , 1 , 0x00, 1652 | 0x04 , 1 , 0x00, 1653 | 0x05 , 1 , 0xEF, 1654 | 0x06 , 1 , 0x00, 1655 | 0x07 , 1 , 0x00, 1656 | 0x08 , 1 , 0x01, 1657 | 0x09 , 1 , 0x3F 1658 | }; 1659 | init_table8(HX8347G_regValues, sizeof(HX8347G_regValues)); 1660 | break; 1661 | case 0x9486: 1662 | lcd_driver = ID_9486; 1663 | //WIDTH = 320,HEIGHT = 480; 1664 | //width = WIDTH, height = HEIGHT; 1665 | XC=ILI9341_COLADDRSET,YC=ILI9341_PAGEADDRSET,CC=ILI9341_MEMORYWRITE,RC=HX8357_RAMRD,SC1=0x33,SC2=0x37,MD=ILI9341_MADCTL,VL=0,R24BIT=0; 1666 | static const uint8_t ILI9486_regValues[] PROGMEM = 1667 | { 1668 | 0xF1, 6, 0x36, 0x04, 0x00, 0x3C, 0x0F, 0x8F, 1669 | 0xF2, 9, 0x18, 0xA3, 0x12, 0x02, 0xB2, 0x12, 0xFF, 0x10, 0x00, 1670 | 0xF8, 2, 0x21, 0x04, 1671 | 0xF9, 2, 0x00, 0x08, 1672 | 0x36, 1, 0x08, 1673 | 0xB4, 1, 0x00, 1674 | 0xC1, 1, 0x41, 1675 | 0xC5, 4, 0x00, 0x91, 0x80, 0x00, 1676 | 0xE0, 15, 0x0F, 0x1F, 0x1C, 0x0C, 0x0F, 0x08, 0x48, 0x98, 0x37, 0x0A, 0x13, 0x04, 0x11, 0x0D, 0x00, 1677 | 0xE1, 15, 0x0F, 0x32, 0x2E, 0x0B, 0x0D, 0x05, 0x47, 0x75, 0x37, 0x06, 0x10 ,0x03, 0x24, 0x20, 0x00, 1678 | 0x3A, 1, 0x55, 1679 | 0x11,0, 1680 | 0x36, 1, 0x28, 1681 | TFTLCD_DELAY8, 120, 1682 | 0x29,0 1683 | 1684 | /* 1685 | 0x01, 0, //Soft Reset 1686 | TFTLCD_DELAY8, 150, // .kbv will power up with ONLY reset, sleep out, display on 1687 | 0x28, 0, //Display Off 1688 | 0x3A, 1, 0x55, //Pixel read=565, write=565. 1689 | 0xC0, 2, 0x0d, 0x0d, //Power Control 1 [0E 0E] 1690 | 0xC1, 2, 0x43, 0x00, //Power Control 2 [43 00] 1691 | 0xC2, 1, 0x00, //Power Control 3 [33] 1692 | 0xC5, 4, 0x00, 0x48, 0x00, 0x48, //VCOM Control 1 [00 40 00 40] 1693 | 0xB4, 1, 0x00, //Inversion Control [00] 1694 | 0xB6, 3, 0x02, 0x02, 0x3B, // Display Function Control [02 02 3B] 1695 | 0xE0, 15,0x0F, 0x24, 0x1C, 0x0A, 0x0F, 0x08, 0x43, 0x88, 0x32, 0x0F, 0x10, 0x06, 0x0F, 0x07, 0x00, 1696 | 0xE1, 15,0x0F, 0x38, 0x30, 0x09, 0x0F, 0x0F, 0x4E, 0x77, 0x3C, 0x07, 0x10, 0x05, 0x23, 0x1B, 0x00, 1697 | 0x11, 0, //Sleep Out 1698 | TFTLCD_DELAY8, 150, 1699 | 0x29, 0 //Display On 1700 | */ 1701 | }; 1702 | init_table8(ILI9486_regValues, sizeof(ILI9486_regValues)); 1703 | break; 1704 | case 0x9488: 1705 | lcd_driver = ID_9488; 1706 | if(MODEL == ILI9488_18) 1707 | { 1708 | static const uint8_t ILI9488_IPF[] PROGMEM ={0x3A,1,0x66}; 1709 | init_table8(ILI9488_IPF, sizeof(ILI9488_IPF)); 1710 | } 1711 | else 1712 | { 1713 | static const uint8_t ILI9488_IPF[] PROGMEM ={0x3A,1,0x55}; 1714 | init_table8(ILI9488_IPF, sizeof(ILI9488_IPF)); 1715 | } 1716 | //WIDTH = 320,HEIGHT = 480; 1717 | //width = WIDTH, height = HEIGHT; 1718 | XC=ILI9341_COLADDRSET,YC=ILI9341_PAGEADDRSET,CC=ILI9341_MEMORYWRITE,RC=HX8357_RAMRD,SC1=0x33,SC2=0x37,MD=ILI9341_MADCTL,VL=0,R24BIT=1; 1719 | static const uint8_t ILI9488_regValues[] PROGMEM = 1720 | { 1721 | 0xF7, 4, 0xA9, 0x51, 0x2C, 0x82, 1722 | 0xC0, 2, 0x11, 0x09, 1723 | 0xC1, 1, 0x41, 1724 | 0xC5, 3, 0x00, 0x0A, 0x80, 1725 | 0xB1, 2, 0xB0, 0x11, 1726 | 0xB4, 1, 0x02, 1727 | 0xB6, 2, 0x02, 0x22, 1728 | 0xB7, 1, 0xC6, 1729 | 0xBE, 2, 0x00, 0x04, 1730 | 0xE9, 1, 0x00, 1731 | 0x36, 1, 0x08, 1732 | 0xE0, 15, 0x00, 0x07, 0x10, 0x09, 0x17, 0x0B, 0x41, 0x89, 0x4B, 0x0A, 0x0C, 0x0E, 0x18, 0x1B, 0x0F, 1733 | 0xE1, 15, 0x00, 0x17, 0x1A, 0x04, 0x0E, 0x06, 0x2F, 0x45, 0x43, 0x02, 0x0A, 0x09, 0x32, 0x36, 0x0F, 1734 | 0x11, 0, 1735 | TFTLCD_DELAY8, 120, 1736 | 0x29, 0 1737 | }; 1738 | init_table8(ILI9488_regValues, sizeof(ILI9488_regValues)); 1739 | break; 1740 | case 0x9225: 1741 | lcd_driver = ID_9225; 1742 | //WIDTH = 176,HEIGHT = 220; 1743 | //width = WIDTH, height = HEIGHT; 1744 | XC=0x20,YC=0x21,CC=0x22,RC=0x22,SC1=0x31,SC2=0x33,MD=0x03,VL=1,R24BIT=0; 1745 | static const uint16_t ILI9225_regValues[] PROGMEM = 1746 | { 1747 | 0x01, 0x011C, 1748 | 0x02, 0x0100, 1749 | 0x03, 0x1030, 1750 | 0x08, 0x0808, // set BP and FP 1751 | 0x0B, 0x1100, // frame cycle 1752 | 0x0C, 0x0000, // RGB interface setting R0Ch=0x0110 for RGB 18Bit and R0Ch=0111for RGB16Bit 1753 | 0x0F, 0x1401, // Set frame rate----0801 1754 | 0x15, 0x0000, // set system interface 1755 | 0x20, 0x0000, // Set GRAM Address 1756 | 0x21, 0x0000, // Set GRAM Address 1757 | //*************Power On sequence ****************// 1758 | TFTLCD_DELAY16, 50, // delay 50ms 1759 | 0x10, 0x0800, // Set SAP,DSTB,STB----0A00 1760 | 0x11, 0x1F3F, // Set APON,PON,AON,VCI1EN,VC----1038 1761 | TFTLCD_DELAY16, 50, // delay 50ms 1762 | 0x12, 0x0121, // Internal reference voltage= Vci;----1121 1763 | 0x13, 0x006F, // Set GVDD----0066 1764 | 0x14, 0x4349, // Set VCOMH/VCOML voltage----5F60 1765 | //-------------- Set GRAM area -----------------// 1766 | 0x30, 0x0000, 1767 | 0x31, 0x00DB, 1768 | 0x32, 0x0000, 1769 | 0x33, 0x0000, 1770 | 0x34, 0x00DB, 1771 | 0x35, 0x0000, 1772 | 0x36, 0x00AF, 1773 | 0x37, 0x0000, 1774 | 0x38, 0x00DB, 1775 | 0x39, 0x0000, 1776 | // ----------- Adjust the Gamma Curve ----------// 1777 | 0x50, 0x0001, // 0x0400 1778 | 0x51, 0x200B, // 0x060B 1779 | 0x52, 0x0000, // 0x0C0A 1780 | 0x53, 0x0404, // 0x0105 1781 | 0x54, 0x0C0C, // 0x0A0C 1782 | 0x55, 0x000C, // 0x0B06 1783 | 0x56, 0x0101, // 0x0004 1784 | 0x57, 0x0400, // 0x0501 1785 | 0x58, 0x1108, // 0x0E00 1786 | 0x59, 0x050C, // 0x000E 1787 | TFTLCD_DELAY16, 50, // delay 50ms 1788 | 0x07, 0x1017, 1789 | //0x22, 0x0000, 1790 | }; 1791 | init_table16(ILI9225_regValues, sizeof(ILI9225_regValues)); 1792 | break; 1793 | case 0x7735: 1794 | if(HEIGHT == 160) 1795 | { 1796 | lcd_driver = ID_7735; 1797 | } 1798 | else if(HEIGHT == 128) 1799 | { 1800 | lcd_driver = ID_7735_128; 1801 | } 1802 | //WIDTH = 128,HEIGHT = 160; 1803 | //width = WIDTH, height = HEIGHT; 1804 | XC=ILI9341_COLADDRSET,YC=ILI9341_PAGEADDRSET,CC=ILI9341_MEMORYWRITE,RC=HX8357_RAMRD,SC1=0x33,SC2=0x37,MD=ILI9341_MADCTL,VL=0,R24BIT=0; 1805 | static const uint8_t ST7735S_regValues[] PROGMEM = 1806 | { 1807 | 0x11, 0, 1808 | TFTLCD_DELAY8, 120, 1809 | 0xB1, 3, 0x05, 0x3C, 0x3C, 1810 | 0xB2, 3, 0x05, 0x3C, 0x3C, 1811 | 0xB3, 6, 0x05, 0x3C, 0x3C, 0x05, 0x3C, 0x3C, 1812 | 0xB4, 1, 0x03, 1813 | 0xC0, 3, 0x28, 0x08, 0x04, 1814 | 0xC1, 1, 0xC0, 1815 | 0xC2, 2, 0x0D, 0x00, 1816 | 0xC3, 2, 0x8D, 0x2A, 1817 | 0xC4, 2, 0x8D, 0xEE, 1818 | 0xC5, 1, 0x1A, 1819 | 0x17 , 1 , 0x05, 1820 | 0x36, 1, 0x08, 1821 | 0xE0, 16,0x03, 0x22, 0x07, 0x0A, 0x2E, 0x30, 0x25, 0x2A, 0x28, 0x26, 0x2E, 0x3A, 0x00, 0x01, 0x03, 0x13, 1822 | 0xE1, 16,0x04, 0x16, 0x06, 0x0D, 0x2D, 0x26, 0x23, 0x27, 0x27, 0x25, 0x2D, 0x3B, 0x00, 0x01, 0x04, 0x13, 1823 | //TFTLCD_DELAY8, 150, 1824 | 0x3A, 1, 0x05, 1825 | // 0x13, 0, 1826 | 0x29, 0 1827 | }; 1828 | init_table8(ST7735S_regValues, sizeof(ST7735S_regValues)); 1829 | break; 1830 | case 0x1283: 1831 | lcd_driver = ID_1283A; 1832 | XC=0x45,YC=0x44,CC=0x22,RC=HX8357_RAMRD,SC1=0x41,SC2=0x42,MD=0x03,VL=1,R24BIT=0; 1833 | static const uint16_t SSD1283A_regValues[] PROGMEM = 1834 | { 1835 | 0x10, 0x2F8E, 1836 | 0x11, 0x000C, 1837 | 0x07, 0x0021, 1838 | 0x28, 0x0006, 1839 | 0x28, 0x0005, 1840 | 0x27, 0x057F, 1841 | 0x29, 0x89A1, 1842 | 0x00, 0x0001, 1843 | TFTLCD_DELAY16, 100, 1844 | 0x29, 0x80B0, 1845 | TFTLCD_DELAY16, 30, 1846 | 0x29, 0xFFFE, 1847 | 0x07, 0x0223, 1848 | TFTLCD_DELAY16, 30, 1849 | 0x07, 0x0233, 1850 | 0x01, 0x2183, 1851 | 0x03, 0x6830, 1852 | 0x2F, 0xFFFF, 1853 | 0x2C, 0x8000, 1854 | 0x27, 0x0570, 1855 | 0x02, 0x0300, 1856 | 0x0B, 0x580C, 1857 | 0x12, 0x0609, 1858 | 0x13, 0x3100, 1859 | }; 1860 | init_table16(SSD1283A_regValues, sizeof(SSD1283A_regValues)); 1861 | break; 1862 | case 0x1106: 1863 | lcd_driver = ID_1106; 1864 | XC=0x10,YC=0xB0,CC=0,RC=0,SC1=0,SC2=0,MD=0,VL=1,R24BIT=0; 1865 | static const uint8_t SH1106_regValues[] PROGMEM = 1866 | { 1867 | 0x8D, 0, 1868 | 0x10, 0, 1869 | 0xAE, 0, 1870 | 0x02, 0, 1871 | 0x10, 0, 1872 | 0x40, 0, 1873 | 0x81, 0, 1874 | 0xCF, 0, 1875 | 0xA1, 0, 1876 | 0xC8, 0, 1877 | 0xA6, 0, 1878 | 0xA8, 0, 1879 | 0x3F, 0, 1880 | 0xD3, 0, 1881 | 0x00, 0, 1882 | 0xD5, 0, 1883 | 0x80, 0, 1884 | 0xD9, 0, 1885 | 0xF1, 0, 1886 | 0xDA, 0, 1887 | 0x12, 0, 1888 | 0xDB, 0, 1889 | 0x40, 0, 1890 | 0x20, 0, 1891 | 0x02, 0, 1892 | 0x8D, 0, 1893 | 0x14, 0, 1894 | 0xA4, 0, 1895 | 0xA6, 0, 1896 | 0xAF, 0, 1897 | }; 1898 | init_table8(SH1106_regValues, sizeof(SH1106_regValues)); 1899 | break; 1900 | default: 1901 | lcd_driver = ID_UNKNOWN; 1902 | break; 1903 | } 1904 | Set_Rotation(rotation); 1905 | Invert_Display(false); 1906 | } 1907 | --------------------------------------------------------------------------------