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.

3 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. case HX8352A:
  2. LCD_Write_COM(0x83);
  3. LCD_Write_DATA(0x02); //TESTM=1
  4. LCD_Write_COM(0x85);
  5. LCD_Write_DATA(0x03); //VDC_SEL=011
  6. LCD_Write_COM(0x8B);
  7. LCD_Write_DATA(0x01);
  8. LCD_Write_COM(0x8C);
  9. LCD_Write_DATA(0x93); //STBA[7]=1,STBA[5:4]=01,STBA[1:0]=11
  10. LCD_Write_COM(0x91);
  11. LCD_Write_DATA(0x01); //DCDC_SYNC=1
  12. LCD_Write_COM(0x83);
  13. LCD_Write_DATA(0x00); //TESTM=0
  14. //Gamma Setting
  15. LCD_Write_COM(0x3E);
  16. LCD_Write_DATA(0xB0);
  17. LCD_Write_COM(0x3F);
  18. LCD_Write_DATA(0x03);
  19. LCD_Write_COM(0x40);
  20. LCD_Write_DATA(0x10);
  21. LCD_Write_COM(0x41);
  22. LCD_Write_DATA(0x56);
  23. LCD_Write_COM(0x42);
  24. LCD_Write_DATA(0x13);
  25. LCD_Write_COM(0x43);
  26. LCD_Write_DATA(0x46);
  27. LCD_Write_COM(0x44);
  28. LCD_Write_DATA(0x23);
  29. LCD_Write_COM(0x45);
  30. LCD_Write_DATA(0x76);
  31. LCD_Write_COM(0x46);
  32. LCD_Write_DATA(0x00);
  33. LCD_Write_COM(0x47);
  34. LCD_Write_DATA(0x5E);
  35. LCD_Write_COM(0x48);
  36. LCD_Write_DATA(0x4F);
  37. LCD_Write_COM(0x49);
  38. LCD_Write_DATA(0x40);
  39. //**********Power On sequence************
  40. LCD_Write_COM(0x17);
  41. LCD_Write_DATA(0x91);
  42. LCD_Write_COM(0x2B);
  43. LCD_Write_DATA(0xF9);
  44. delay(10);
  45. LCD_Write_COM(0x1B);
  46. LCD_Write_DATA(0x14);
  47. LCD_Write_COM(0x1A);
  48. LCD_Write_DATA(0x11);
  49. LCD_Write_COM(0x1C);
  50. LCD_Write_DATA(0x06);
  51. LCD_Write_COM(0x1F);
  52. LCD_Write_DATA(0x42);
  53. delay(20);
  54. LCD_Write_COM(0x19);
  55. LCD_Write_DATA(0x0A);
  56. LCD_Write_COM(0x19);
  57. LCD_Write_DATA(0x1A);
  58. delay(40);
  59. LCD_Write_COM(0x19);
  60. LCD_Write_DATA(0x12);
  61. delay(40);
  62. LCD_Write_COM(0x1E);
  63. LCD_Write_DATA(0x27);
  64. delay(100);
  65. //**********DISPLAY ON SETTING***********
  66. LCD_Write_COM(0x24);
  67. LCD_Write_DATA(0x60);
  68. LCD_Write_COM(0x3D);
  69. LCD_Write_DATA(0x40);
  70. LCD_Write_COM(0x34);
  71. LCD_Write_DATA(0x38);
  72. LCD_Write_COM(0x35);
  73. LCD_Write_DATA(0x38);
  74. LCD_Write_COM(0x24);
  75. LCD_Write_DATA(0x38);
  76. delay(40);
  77. LCD_Write_COM(0x24);
  78. LCD_Write_DATA(0x3C);
  79. LCD_Write_COM(0x16);
  80. LCD_Write_DATA(0x1C);
  81. LCD_Write_COM(0x01);
  82. LCD_Write_DATA(0x06);
  83. LCD_Write_COM(0x55);
  84. LCD_Write_DATA(0x00);
  85. LCD_Write_COM(0x02);
  86. LCD_Write_DATA(0x00);
  87. LCD_Write_COM(0x03);
  88. LCD_Write_DATA(0x00);
  89. LCD_Write_COM(0x04);
  90. LCD_Write_DATA(0x00);
  91. LCD_Write_COM(0x05);
  92. LCD_Write_DATA(0xef);
  93. LCD_Write_COM(0x06);
  94. LCD_Write_DATA(0x00);
  95. LCD_Write_COM(0x07);
  96. LCD_Write_DATA(0x00);
  97. LCD_Write_COM(0x08);
  98. LCD_Write_DATA(0x01);
  99. LCD_Write_COM(0x09);
  100. LCD_Write_DATA(0x8f);
  101. LCD_Write_COM(0x22);
  102. break;