PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.5KB

  1. case ILI9486:
  2. LCD_Write_COM(0x11); // Sleep OUT
  3. delay(50);
  4. LCD_Write_COM(0xF2); // ?????
  5. LCD_Write_DATA(0x1C);
  6. LCD_Write_DATA(0xA3);
  7. LCD_Write_DATA(0x32);
  8. LCD_Write_DATA(0x02);
  9. LCD_Write_DATA(0xb2);
  10. LCD_Write_DATA(0x12);
  11. LCD_Write_DATA(0xFF);
  12. LCD_Write_DATA(0x12);
  13. LCD_Write_DATA(0x00);
  14. LCD_Write_COM(0xF1); // ?????
  15. LCD_Write_DATA(0x36);
  16. LCD_Write_DATA(0xA4);
  17. LCD_Write_COM(0xF8); // ?????
  18. LCD_Write_DATA(0x21);
  19. LCD_Write_DATA(0x04);
  20. LCD_Write_COM(0xF9); // ?????
  21. LCD_Write_DATA(0x00);
  22. LCD_Write_DATA(0x08);
  23. LCD_Write_COM(0xC0); // Power Control 1
  24. LCD_Write_DATA(0x0d);
  25. LCD_Write_DATA(0x0d);
  26. LCD_Write_COM(0xC1); // Power Control 2
  27. LCD_Write_DATA(0x43);
  28. LCD_Write_DATA(0x00);
  29. LCD_Write_COM(0xC2); // Power Control 3
  30. LCD_Write_DATA(0x00);
  31. LCD_Write_COM(0xC5); // VCOM Control
  32. LCD_Write_DATA(0x00);
  33. LCD_Write_DATA(0x48);
  34. LCD_Write_COM(0xB6); // Display Function Control
  35. LCD_Write_DATA(0x00);
  36. LCD_Write_DATA(0x22); // 0x42 = Rotate display 180 deg.
  37. LCD_Write_DATA(0x3B);
  38. LCD_Write_COM(0xE0); // PGAMCTRL (Positive Gamma Control)
  39. LCD_Write_DATA(0x0f);
  40. LCD_Write_DATA(0x24);
  41. LCD_Write_DATA(0x1c);
  42. LCD_Write_DATA(0x0a);
  43. LCD_Write_DATA(0x0f);
  44. LCD_Write_DATA(0x08);
  45. LCD_Write_DATA(0x43);
  46. LCD_Write_DATA(0x88);
  47. LCD_Write_DATA(0x32);
  48. LCD_Write_DATA(0x0f);
  49. LCD_Write_DATA(0x10);
  50. LCD_Write_DATA(0x06);
  51. LCD_Write_DATA(0x0f);
  52. LCD_Write_DATA(0x07);
  53. LCD_Write_DATA(0x00);
  54. LCD_Write_COM(0xE1); // NGAMCTRL (Negative Gamma Control)
  55. LCD_Write_DATA(0x0F);
  56. LCD_Write_DATA(0x38);
  57. LCD_Write_DATA(0x30);
  58. LCD_Write_DATA(0x09);
  59. LCD_Write_DATA(0x0f);
  60. LCD_Write_DATA(0x0f);
  61. LCD_Write_DATA(0x4e);
  62. LCD_Write_DATA(0x77);
  63. LCD_Write_DATA(0x3c);
  64. LCD_Write_DATA(0x07);
  65. LCD_Write_DATA(0x10);
  66. LCD_Write_DATA(0x05);
  67. LCD_Write_DATA(0x23);
  68. LCD_Write_DATA(0x1b);
  69. LCD_Write_DATA(0x00);
  70. LCD_Write_COM(0x20); // Display Inversion OFF
  71. LCD_Write_DATA(0x00);//C8
  72. LCD_Write_COM(0x36); // Memory Access Control
  73. LCD_Write_DATA(0x0A);
  74. LCD_Write_COM(0x3A); // Interface Pixel Format
  75. LCD_Write_DATA(0x55);
  76. LCD_Write_COM(0x2A); // Column Addess Set
  77. LCD_Write_DATA(0x00);
  78. LCD_Write_DATA(0x00);
  79. LCD_Write_DATA(0x01);
  80. LCD_Write_DATA(0xDF);
  81. LCD_Write_COM(0x002B); // Page Address Set
  82. LCD_Write_DATA(0x00);
  83. LCD_Write_DATA(0x00);
  84. LCD_Write_DATA(0x01);
  85. LCD_Write_DATA(0x3f);
  86. delay(50);
  87. LCD_Write_COM(0x0029); // Display ON
  88. LCD_Write_COM(0x002C); // Memory Write
  89. break;