tft working init. sequence, still undersaturated
This commit is contained in:
parent
0bc74172a2
commit
4092294e7c
@ -40,21 +40,10 @@ displayio_fourwire_obj_t board_display_obj;
|
||||
uint8_t display_init_sequence[] = {
|
||||
0x01, 0 | DELAY, 150, // SWRESET
|
||||
0x11, 0 | DELAY, 255, // SLPOUT
|
||||
0xb1, 3, 0x01, 0x2C, 0x2D, // _FRMCTR1
|
||||
0xb2, 3, 0x01, 0x2C, 0x2D, //
|
||||
0xb3, 6, 0x01, 0x2C, 0x2D, 0x01, 0x2C, 0x2D,
|
||||
0xb4, 1, 0x07, // _INVCTR line inversion
|
||||
0xc0, 3, 0xa2, 0x02, 0x84, // _PWCTR1 GVDD = 4.7V, 1.0uA
|
||||
0xc1, 1, 0xc5, // _PWCTR2 VGH=14.7V, VGL=-7.35V
|
||||
0xc2, 2, 0x0a, 0x00, // _PWCTR3 Opamp current small, Boost frequency
|
||||
0xc3, 2, 0x8a, 0x2a,
|
||||
0xc4, 2, 0x8a, 0xee,
|
||||
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
|
||||
0x2a, 0, // _INVOFF
|
||||
0x36, 1, 0x00, // _MADCTL top to bottom refresh in vsync aligned order.
|
||||
0x36, 1, 0x08, // _MADCTL top to bottom refresh in vsync aligned order.
|
||||
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie,
|
||||
// fix on VTL
|
||||
0x3a, 1, 0x05, // COLMOD - 16bit color
|
||||
0x3a, 2, 0x55, 10, // COLMOD - 16bit color
|
||||
0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma
|
||||
0x37, 0x32, 0x29, 0x2d,
|
||||
0x29, 0x25, 0x2B, 0x39,
|
||||
@ -63,10 +52,11 @@ uint8_t display_init_sequence[] = {
|
||||
0x2E, 0x2C, 0x29, 0x2D,
|
||||
0x2E, 0x2E, 0x37, 0x3F,
|
||||
0x00, 0x00, 0x02, 0x10,
|
||||
0x2a, 3, 0x02, 0x00, 0x81, // _CASET XSTART = 2, XEND = 129
|
||||
0x2b, 3, 0x02, 0x00, 0x81, // _RASET XSTART = 2, XEND = 129
|
||||
0x2a, 3, 0x00, 240 >> 8, 240 & 0xFF, // _CASET XSTART = 0, XEND = 240
|
||||
0x2b, 3, 0x00, 320 >> 8, 320 & 0xFF, // _RASET YSTART = 0, YEND = 320
|
||||
0x21, 0 | DELAY, 10, // _INVON
|
||||
0x13, 0 | DELAY, 10, // _NORON
|
||||
0x29, 0 | DELAY, 100, // _DISPON
|
||||
0x29, 0 | DELAY, 255, // _DISPON
|
||||
};
|
||||
|
||||
void board_init(void) {
|
||||
@ -87,11 +77,11 @@ void board_init(void) {
|
||||
display->base.type = &displayio_display_type;
|
||||
common_hal_displayio_display_construct(display,
|
||||
bus,
|
||||
160, // Width (after rotation)
|
||||
128, // Height (after rotation)
|
||||
320, // Width (after rotation)
|
||||
240, // Height (after rotation)
|
||||
0, // column start
|
||||
0, // row start
|
||||
270, // rotation
|
||||
90, // rotation
|
||||
16, // Color depth
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
|
Loading…
x
Reference in New Issue
Block a user