diff --git a/TFT_Drivers/ILI9163_Defines.h b/TFT_Drivers/ILI9163_Defines.h index 06f5c4f..64e206b 100644 --- a/TFT_Drivers/ILI9163_Defines.h +++ b/TFT_Drivers/ILI9163_Defines.h @@ -66,3 +66,6 @@ #define TFT_PTLAR 0x30 //partial area #define TFT_IDMOFF 0x38 //idle mode off #define TFT_IDMON 0x39 //idle mode on + +#define TFT_PWCTR1 0xC0 +#define TFT_PWCTR2 0xC1 diff --git a/TFT_Drivers/ILI9163_Init.h b/TFT_Drivers/ILI9163_Init.h index 0f2702c..abba212 100644 --- a/TFT_Drivers/ILI9163_Init.h +++ b/TFT_Drivers/ILI9163_Init.h @@ -11,7 +11,7 @@ static const uint8_t ILI9163_cmds[] PROGMEM = { 17, // 17 commands follow - 0x01, 0 + TFT_INIT_DELAY, 120, // Software reset + TFT_SWRST, 0 + TFT_INIT_DELAY, 120, // Software reset 0x11, 0 + TFT_INIT_DELAY, 5, // Exit sleep mode 0x3A, 1, 0x05, // Set pixel format 0x26, 1, 0x04, // Set Gamma curve 3 @@ -22,8 +22,8 @@ 0x3D, 0x18, 0x25, 0x2A, 0x2B, 0x2B, 0x3A, // Negative Gamma 0xB1, 2, 0x08, 0x08, // Frame rate control 1 0xB4, 1, 0x07, // Display inversion - 0xC0, 2, 0x0A, 0x02, // Power control 1 - 0xC1, 1, 0x02, // Power control 2 + TFT_PWCTR1, 2, 0x0A, 0x02, // Power control 1 + TFT_PWCTR2, 1, 0x02, // Power control 2 0xC5, 2, 0x50, 0x5B, // Vcom control 1 0xC7, 1, 0x40, // Vcom offset 0x2A, 4, 0x00, 0x00, 0x00, 0x7F, // Set column address