PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

81 linhas
2.8KB

  1. case HX8340B_8:
  2. LCD_Write_COM_DATA(0x26,0x0084); //PT=10,GON=0, DTE=0, D=0100
  3. delay(40);
  4. LCD_Write_COM_DATA(0x26,0x00B8); //PT=10,GON=1, DTE=1, D=1000
  5. delay(40);
  6. LCD_Write_COM_DATA(0x26,0x00BC); //PT=10,GON=1, DTE=1, D=1100
  7. delay(20);
  8. // LCD_Write_COM_DATA(0x0001,0x0000); // PTL='1' Enter Partail mode
  9. //Driving ability Setting
  10. LCD_Write_COM_DATA(0x60,0x0000);
  11. LCD_Write_COM_DATA(0x61,0x0006);
  12. LCD_Write_COM_DATA(0x62,0x0000);
  13. LCD_Write_COM_DATA(0x63,0x00C8);
  14. delay(20);
  15. //Gamma Setting
  16. LCD_Write_COM_DATA(0x73,0x0070);
  17. LCD_Write_COM_DATA(0x40,0x0000);
  18. LCD_Write_COM_DATA(0x41,0x0040);
  19. LCD_Write_COM_DATA(0x42,0x0045);
  20. LCD_Write_COM_DATA(0x43,0x0001);
  21. LCD_Write_COM_DATA(0x44,0x0060);
  22. LCD_Write_COM_DATA(0x45,0x0005);
  23. LCD_Write_COM_DATA(0x46,0x000C);
  24. LCD_Write_COM_DATA(0x47,0x00D1);
  25. LCD_Write_COM_DATA(0x48,0x0005);
  26. LCD_Write_COM_DATA(0x50,0x0075);
  27. LCD_Write_COM_DATA(0x51,0x0001);
  28. LCD_Write_COM_DATA(0x52,0x0067);
  29. LCD_Write_COM_DATA(0x53,0x0014);
  30. LCD_Write_COM_DATA(0x54,0x00F2);
  31. LCD_Write_COM_DATA(0x55,0x0007);
  32. LCD_Write_COM_DATA(0x56,0x0003);
  33. LCD_Write_COM_DATA(0x57,0x0049);
  34. delay(20);
  35. //Power Setting
  36. LCD_Write_COM_DATA(0x1F,0x0003); //VRH=4.65V VREG1?GAMMA? 00~1E 080421
  37. LCD_Write_COM_DATA(0x20,0x0000); //BT (VGH~15V,VGL~-12V,DDVDH~5V)
  38. LCD_Write_COM_DATA(0x24,0x0024); //VCOMH(VCOM High voltage3.2V) 0024/12 080421 11~40
  39. LCD_Write_COM_DATA(0x25,0x0034); //VCOML(VCOM Low voltage -1.2V) 0034/4A 080421 29~3F
  40. //****VCOM offset**///
  41. LCD_Write_COM_DATA(0x23,0x002F); //VMF(no offset)
  42. delay(20);
  43. //##################################################################
  44. // Power Supply Setting
  45. LCD_Write_COM_DATA(0x18,0x0044); //I/P_RADJ,N/P_RADJ Noraml mode 60Hz
  46. LCD_Write_COM_DATA(0x21,0x0001); //OSC_EN='1' start osc
  47. LCD_Write_COM_DATA(0x01,0x0000); //SLP='0' out sleep
  48. LCD_Write_COM_DATA(0x1C,0x0003); //AP=011
  49. LCD_Write_COM_DATA(0x19,0x0006); // VOMG=1,PON=1, DK=0,
  50. delay(20);
  51. //##################################################################
  52. // Display ON Setting
  53. LCD_Write_COM_DATA(0x26,0x0084); //PT=10,GON=0, DTE=0, D=0100
  54. delay(40);
  55. LCD_Write_COM_DATA(0x26,0x00B8); //PT=10,GON=1, DTE=1, D=1000
  56. delay(40);
  57. LCD_Write_COM_DATA(0x26,0x00BC); //PT=10,GON=1, DTE=1, D=1100
  58. delay(20);
  59. //SET GRAM AREA
  60. LCD_Write_COM_DATA(0x02,0x0000);
  61. LCD_Write_COM_DATA(0x03,0x0000);
  62. LCD_Write_COM_DATA(0x04,0x0000);
  63. LCD_Write_COM_DATA(0x05,0x00AF);
  64. LCD_Write_COM_DATA(0x06,0x0000);
  65. LCD_Write_COM_DATA(0x07,0x0000);
  66. LCD_Write_COM_DATA(0x08,0x0000);
  67. LCD_Write_COM_DATA(0x09,0x00DB);
  68. delay(20);
  69. LCD_Write_COM_DATA(0x16,0x0008); //MV MX MY ML SET 0028
  70. LCD_Write_COM_DATA(0x17,0x0005);//COLMOD Control Register (R17h)
  71. LCD_Write_COM(0x21);
  72. LCD_Write_COM(0x22);
  73. break;