acidportal

- 😈 Worlds smallest Evil Portal on a LilyGo T-QT
git clone git://git.acid.vegas/acidportal.git
Log | Files | Refs | Archive | README | LICENSE

HX8357C_Init.h (2553B)

      1 
      2 // This is the command sequence that initialises the HX8357C driver
      3 //
      4 // This setup information uses simple 8 bit SPI writecommand() and writedata() functions
      5 //
      6 // See ST7735_Setup.h file for an alternative format
      7 
      8 
      9 // Configure HX8357C display
     10 
     11     writecommand(0xB9); // Enable extension command
     12     writedata(0xFF);
     13     writedata(0x83);
     14     writedata(0x57);
     15     delay(50);
     16     
     17     writecommand(0xB6); //Set VCOM voltage
     18     writedata(0x2C);    //0x52 for HSD 3.0"
     19     
     20     writecommand(0x11); // Sleep off
     21     delay(200);
     22     
     23     writecommand(0x35); // Tearing effect on
     24     writedata(0x00);    // Added parameter
     25 
     26     writecommand(0x3A); // Interface pixel format
     27     writedata(0x55);    // 16 bits per pixel
     28 
     29     //writecommand(0xCC); // Set panel characteristic
     30     //writedata(0x09);    // S960>S1, G1>G480, R-G-B, normally black
     31 
     32     //writecommand(0xB3); // RGB interface
     33     //writedata(0x43);
     34     //writedata(0x00);
     35     //writedata(0x06);
     36     //writedata(0x06);
     37 
     38     writecommand(0xB1); // Power control
     39     writedata(0x00);
     40     writedata(0x15);
     41     writedata(0x0D);
     42     writedata(0x0D);
     43     writedata(0x83);
     44     writedata(0x48);
     45     
     46     
     47     writecommand(0xC0); // Does this do anything?
     48     writedata(0x24);
     49     writedata(0x24);
     50     writedata(0x01);
     51     writedata(0x3C);
     52     writedata(0xC8);
     53     writedata(0x08);
     54     
     55     writecommand(0xB4); // Display cycle
     56     writedata(0x02);
     57     writedata(0x40);
     58     writedata(0x00);
     59     writedata(0x2A);
     60     writedata(0x2A);
     61     writedata(0x0D);
     62     writedata(0x4F);
     63     
     64     writecommand(0xE0); // Gamma curve
     65     writedata(0x00);
     66     writedata(0x15);
     67     writedata(0x1D);
     68     writedata(0x2A);
     69     writedata(0x31);
     70     writedata(0x42);
     71     writedata(0x4C);
     72     writedata(0x53);
     73     writedata(0x45);
     74     writedata(0x40);
     75     writedata(0x3B);
     76     writedata(0x32);
     77     writedata(0x2E);
     78     writedata(0x28);
     79     
     80     writedata(0x24);
     81     writedata(0x03);
     82     writedata(0x00);
     83     writedata(0x15);
     84     writedata(0x1D);
     85     writedata(0x2A);
     86     writedata(0x31);
     87     writedata(0x42);
     88     writedata(0x4C);
     89     writedata(0x53);
     90     writedata(0x45);
     91     writedata(0x40);
     92     writedata(0x3B);
     93     writedata(0x32);
     94     
     95     writedata(0x2E);
     96     writedata(0x28);
     97     writedata(0x24);
     98     writedata(0x03);
     99     writedata(0x00);
    100     writedata(0x01);
    101 
    102     writecommand(0x36); // MADCTL Memory access control
    103     writedata(0x48);
    104     delay(20);
    105 
    106     writecommand(0x21); //Display inversion on
    107     delay(20);
    108 
    109     writecommand(0x29); // Display on
    110     
    111     delay(120);
    112 
    113 // End of HX8357C display configuration
    114 
    115 
    116