ILI9341 Regvalues
ILI9341 Regvalues
case 0x9488:
_lcd_capable = AUTO_READINC | TWO_PARM_WINDOW | MV_AXIS;
static const uint8_t ILI9488_regValues[] PROGMEM = {
0x01, 0, //Soft Reset
0x28, 0, //Display Off
0xC0, 2, 0x0E, 0x0E, //Power Control 1 [0E 0E]
0xC1, 1, 0x43, //Power Control 2 [43]
0xC5, 4, 0x00, 0x22, 0x80, 0x40, //VCOM Control 1 [00 40 00 40]
0x36, 1, 0x08, //Memory Access [00]
0x3A, 1, 0x55, //Interlace Pixel [XX]
0xB1, 2, 0xB0, 0x11, //Frame Rate Control [B0 11]
0xB6, 3, 0x02, 0x02, 0x3B, //Display Function [02 02 3B] .kbv SS=0
0x11, 0, //Sleep Out
TFTLCD_DELAY, 150,
0x29, 0, //Display On
// 0x2C, 0,
};
static const uint8_t ILI9488_regValues_max[] PROGMEM = { // Atmel
MaxTouch
0x01, 0, //Soft Reset
TFTLCD_DELAY, 50,
0x28, 0, //Display Off
0xC0, 2, 0x10, 0x10, //Power Control 1 [0E 0E]
0xC1, 1, 0x41, //Power Control 2 [43]
0xC5, 4, 0x00, 0x22, 0x80, 0x40, //VCOM Control 1 [00 40 00 40]
0x36, 1, 0x68, //Memory Access [00]
0xB0, 1, 0x00, //Interface [00]
0xB1, 2, 0xB0, 0x11, //Frame Rate Control [B0 11]
0xB4, 1, 0x02, //Inversion Control [02]
0xB7, 1, 0xC6, //Entry Mode [06]
0x3A, 1, 0x55, //Interlace Pixel Format [XX]
0xF7, 4, 0xA9, 0x51, 0x2C, 0x82, //Adjustment Control 3 [A9 51 2C
82]
0x11, 0, //Sleep Out
TFTLCD_DELAY, 150,
0x29, 0, //Display On
};
// init_table(ILI9488_regValues, sizeof(ILI9488_regValues));
init_table(ILI9488_regValues_max, sizeof(ILI9488_regValues_max));
p16 = (int16_t *) & HEIGHT;
*p16 = 480;
p16 = (int16_t *) & WIDTH;
*p16 = 320;
break;
//
###################################################################################
case 0x7789:
case 0x8552:
_lcd_capable = AUTO_READINC | TWO_PARM_WINDOW | MV_AXIS;
static const uint8_t ST7789_regValues[] PROGMEM = {
(0x0011); //exit SLEEP mode
TFTLCD_DELAY, 10,
(0x0036), 1, 0x80, //MADCTL: memory data access control
(0x003A), 1, 0x66, //COLMOD: Interface Pixel format *** I use 262K-
colors in 18bit/pixel format when using 8-bit interface to allow 3-bytes per pixel
// (0x003A), 1, 0x0055, //COLMOD: Interface Pixel format *** I use
65K-colors in 16bit/pixel (5-6-5) format when using 16-bit interface to allow 1-
byte per pixel
(0x00B2), 5, 0x0C, 0x0C, 0x00, 0x33, 0x33, //PORCTRK: Porch setting
(0x00B7), 1, 0x35, //GCTRL: Gate Control
(0x00BB), 1, 0x2B, //VCOMS: VCOM setting
(0x00C0), 1, 0x2C, //LCMCTRL: LCM Control
(0x00C2), 2, 0x01, 0xFF, //VDVVRHEN: VDV and VRH Command Enable
(0x00C3), 1, 0x11, //VRHS: VRH Set
(0x00C4), 1, 0x20, //VDVS: VDV Set
(0x00C6), 1, 0x0F, //FRCTRL2: Frame Rate control in normal mode
(0x00D0), 2, 0xA4, 0xA1, //PWCTRL1: Power Control 1
(0x00E0), 14, 0xD0, 0x00, 0x05, 0x0E, 0x15, 0x0D, 0x37, 0x43, 0x47, 0x09,
0x15, 0x12, 0x16, 0x19, //PVGAMCTRL: Positive Voltage Gamma control
(0x00E1), 14, 0xD0, 0x00, 0x05, 0x0D, 0x0C, 0x06, 0x2D, 0x44, 0x40, 0x0E,
0x1C, 0x18, 0x16, 0x19, //NVGAMCTRL: Negative Voltage Gamma control
(0x002A), 4, 0x00, 0x00, 0x00, 0xEF, //X address set
(0x002B), 4, 0x00, 0x00, 0x01, 0x3F, //Y address set
TFTLCD_DELAY, 10,
};
init_table(ST7789_regValues, sizeof(ST7789_regValues)); //
break;
//
###################################################################################
#
static const uint16_t ILI9225_regValues[] PROGMEM = {
/* Start Initial Sequence */
/* Set SS bit and direction output from S528 to S1 */
ILI9225_POWER_CTRL1, 0x0000, // Set SAP,DSTB,STB
ILI9225_POWER_CTRL2, 0x0000, // Set APON,PON,AON,VCI1EN,VC
ILI9225_POWER_CTRL3, 0x0000, // Set BT,DC1,DC2,DC3
ILI9225_POWER_CTRL4, 0x0000, // Set GVDD
ILI9225_POWER_CTRL5, 0x0000, // Set VCOMH/VCOML voltage
TFTLCD_DELAY, 40,
// Power-on sequence
ILI9225_POWER_CTRL2, 0x0018, // Set APON,PON,AON,VCI1EN,VC
ILI9225_POWER_CTRL3, 0x6121, // Set BT,DC1,DC2,DC3
ILI9225_POWER_CTRL4, 0x006F, // Set GVDD /*007F 0088 */
ILI9225_POWER_CTRL5, 0x495F, // Set VCOMH/VCOML voltage
ILI9225_POWER_CTRL1, 0x0800, // Set SAP,DSTB,STB
TFTLCD_DELAY, 10,
ILI9225_POWER_CTRL2, 0x103B, // Set APON,PON,AON,VCI1EN,VC
TFTLCD_DELAY, 50,
ILI9225_DISP_CTRL1, 0x0012,
TFTLCD_DELAY, 50,
ILI9225_DISP_CTRL1, 0x1017,
};