Skip to content

Commit 4092294

Browse files
author
brentru
committed
tft working init. sequence, still undersaturated
1 parent 0bc7417 commit 4092294

File tree

1 file changed

+9
-19
lines changed
  • ports/atmel-samd/boards/pybadge_airlift

1 file changed

+9
-19
lines changed

ports/atmel-samd/boards/pybadge_airlift/board.c

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,10 @@ displayio_fourwire_obj_t board_display_obj;
4040
uint8_t display_init_sequence[] = {
4141
0x01, 0 | DELAY, 150, // SWRESET
4242
0x11, 0 | DELAY, 255, // SLPOUT
43-
0xb1, 3, 0x01, 0x2C, 0x2D, // _FRMCTR1
44-
0xb2, 3, 0x01, 0x2C, 0x2D, //
45-
0xb3, 6, 0x01, 0x2C, 0x2D, 0x01, 0x2C, 0x2D,
46-
0xb4, 1, 0x07, // _INVCTR line inversion
47-
0xc0, 3, 0xa2, 0x02, 0x84, // _PWCTR1 GVDD = 4.7V, 1.0uA
48-
0xc1, 1, 0xc5, // _PWCTR2 VGH=14.7V, VGL=-7.35V
49-
0xc2, 2, 0x0a, 0x00, // _PWCTR3 Opamp current small, Boost frequency
50-
0xc3, 2, 0x8a, 0x2a,
51-
0xc4, 2, 0x8a, 0xee,
52-
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
53-
0x2a, 0, // _INVOFF
54-
0x36, 1, 0x00, // _MADCTL top to bottom refresh in vsync aligned order.
43+
0x36, 1, 0x08, // _MADCTL top to bottom refresh in vsync aligned order.
5544
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie,
5645
// fix on VTL
57-
0x3a, 1, 0x05, // COLMOD - 16bit color
46+
0x3a, 2, 0x55, 10, // COLMOD - 16bit color
5847
0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma
5948
0x37, 0x32, 0x29, 0x2d,
6049
0x29, 0x25, 0x2B, 0x39,
@@ -63,10 +52,11 @@ uint8_t display_init_sequence[] = {
6352
0x2E, 0x2C, 0x29, 0x2D,
6453
0x2E, 0x2E, 0x37, 0x3F,
6554
0x00, 0x00, 0x02, 0x10,
66-
0x2a, 3, 0x02, 0x00, 0x81, // _CASET XSTART = 2, XEND = 129
67-
0x2b, 3, 0x02, 0x00, 0x81, // _RASET XSTART = 2, XEND = 129
55+
0x2a, 3, 0x00, 240 >> 8, 240 & 0xFF, // _CASET XSTART = 0, XEND = 240
56+
0x2b, 3, 0x00, 320 >> 8, 320 & 0xFF, // _RASET YSTART = 0, YEND = 320
57+
0x21, 0 | DELAY, 10, // _INVON
6858
0x13, 0 | DELAY, 10, // _NORON
69-
0x29, 0 | DELAY, 100, // _DISPON
59+
0x29, 0 | DELAY, 255, // _DISPON
7060
};
7161

7262
void board_init(void) {
@@ -87,11 +77,11 @@ void board_init(void) {
8777
display->base.type = &displayio_display_type;
8878
common_hal_displayio_display_construct(display,
8979
bus,
90-
160, // Width (after rotation)
91-
128, // Height (after rotation)
80+
320, // Width (after rotation)
81+
240, // Height (after rotation)
9282
0, // column start
9383
0, // row start
94-
270, // rotation
84+
90, // rotation
9585
16, // Color depth
9686
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
9787
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command

0 commit comments

Comments
 (0)