INITIAL CODE() { //------ST7735R Reset Sequence------------------// LCD_RESET=1; Delayms (1); //Delay 1ms LCD_RESET=0; Delayms (1); //Delay 1ms LCD_RESET=1; Delayms (120); //Delay 120ms //--------End ST7735R Reset Sequence -----------// Write(COMMAND,0x11); //Sleep out Delayms (120); //Delay 120ms //------------ST7735R Frame Rate--------------// Write(COMMAND,0xB1); Write(DATA,0x05); Write(DATA,0x3C); Write(DATA,0x3C); Write(COMMAND,0xB2); Write(DATA,0x05); Write(DATA,0x3C); Write(DATA,0x3C); Write(COMMAND,0xB3); Write(DATA,0x05); Write(DATA,0x3C); Write(DATA,0x3C); Write(DATA,0x05); Write(DATA,0x3C); Write(DATA,0x3C); //------------End ST7735R Frame Rate-------------// Write(COMMAND,0xB4); //Column inversion Write(DATA,0x07); //--------------ST7735R Power Sequence----------// Write(COMMAND,0xB6); //Extend gate non-overlap time Write(DATA,0xB4); Write(DATA,0xF0); Write(COMMAND,0xC0); Write(DATA,0xAE); Write(DATA,0x0E); Write(DATA,0x04); Write(COMMAND,0xC1); Write(DATA,0xC0); Write(COMMAND,0xC2); Write(DATA,0x0A); Write(DATA,0x00); Write(COMMAND,0xC3); Write(DATA,0x8A); Write(DATA,0x26); Write(COMMAND,0xC4); Write(DATA,0x8A); Write(DATA,0xEE); //----------End ST7735R Power Sequence----------------// Write(COMMAND,0xC5); //VCOM Write(DATA,0x01); //----------------ST7735R Gamma Sequence--------------// Write(COMMAND,0xe0); Write(DATA,0x03); Write(DATA,0x1D); Write(DATA,0x08); Write(DATA,0x0D); Write(DATA,0x36); Write(DATA,0x33); Write(DATA,0x2C); Write(DATA,0x2F); Write(DATA,0x2C); Write(DATA,0x2A); Write(DATA,0x32); Write(DATA,0x3C); Write(DATA,0x00); Write(DATA,0x01); Write(DATA,0x03); Write(DATA,0x0F); Write(COMMAND,0xe1); Write(DATA,0x03); Write(DATA,0x1D); Write(DATA,0x08); Write(DATA,0x0D); Write(DATA,0x2F); Write(DATA,0x2C); Write(DATA,0x28); Write(DATA,0x2D); Write(DATA,0x2C); Write(DATA,0x2A); Write(DATA,0x32); Write(DATA,0x3D); Write(DATA,0x00); Write(DATA,0x01); Write(DATA,0x01); Write(DATA,0x0F); //-------------End ST7735R Gamma Sequence-------------// Write(Command , 0x36); Write(Parameter , 0xC0); Write(COMMAND,0x3A); //65k mode Write(DATA,0x05); Write(COMMAND,0x29); //Display on } Void ST7735R177Panel (void) { Write(COMMAND,0x10); //Sleep in Delayms (120); //Delay 120ms } Void ST7735R177Panel (void) { Write(COMMAND,0x11); //Sleep out Delayms (120); //Delay 120ms }