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.

initlcd.h 1.7KB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. case ILI9341_S4P:
  2. LCD_Write_COM(0x11);//sleep out
  3. delay(20);
  4. //LCD_Write_COM(0x01); //reset
  5. //delay(15);
  6. LCD_Write_COM(0x28); //display off
  7. delay(5);
  8. LCD_Write_COM(0xCF); //power control b
  9. LCD_Write_DATA(0x00);
  10. LCD_Write_DATA(0x83); //83 81 AA
  11. LCD_Write_DATA(0x30);
  12. LCD_Write_COM(0xED); //power on seq control
  13. LCD_Write_DATA(0x64); //64 67
  14. LCD_Write_DATA(0x03);
  15. LCD_Write_DATA(0x12);
  16. LCD_Write_DATA(0x81);
  17. LCD_Write_COM(0xE8); //timing control a
  18. LCD_Write_DATA(0x85);
  19. LCD_Write_DATA(0x01);
  20. LCD_Write_DATA(0x79); //79 78
  21. LCD_Write_COM(0xCB); //power control a
  22. LCD_Write_DATA(0x39);
  23. LCD_Write_DATA(0X2C);
  24. LCD_Write_DATA(0x00);
  25. LCD_Write_DATA(0x34);
  26. LCD_Write_DATA(0x02);
  27. LCD_Write_COM(0xF7); //pump ratio control
  28. LCD_Write_DATA(0x20);
  29. LCD_Write_COM(0xEA); //timing control b
  30. LCD_Write_DATA(0x00);
  31. LCD_Write_DATA(0x00);
  32. LCD_Write_COM(0xC0); //power control 2
  33. LCD_Write_DATA(0x26); //26 25
  34. LCD_Write_COM(0xC1); //power control 2
  35. LCD_Write_DATA(0x11);
  36. LCD_Write_COM(0xC5); //vcom control 1
  37. LCD_Write_DATA(0x35);
  38. LCD_Write_DATA(0x3E);
  39. LCD_Write_COM(0xC7); //vcom control 2
  40. LCD_Write_DATA(0xBE); //BE 94
  41. LCD_Write_COM(0xB1); //frame control
  42. LCD_Write_DATA(0x00);
  43. LCD_Write_DATA(0x1B); //1B 70
  44. LCD_Write_COM(0xB6); //display control
  45. LCD_Write_DATA(0x0A);
  46. LCD_Write_DATA(0x82);
  47. LCD_Write_DATA(0x27);
  48. LCD_Write_DATA(0x00);
  49. LCD_Write_COM(0xB7); //emtry mode
  50. LCD_Write_DATA(0x07);
  51. LCD_Write_COM(0x3A); //pixel format
  52. LCD_Write_DATA(0x55); //16bit
  53. LCD_Write_COM(0x36); //mem access
  54. LCD_Write_DATA((1<<3)|(1<<6));
  55. //LCD_Write_DATA((1<<3)|(1<<7)); //rotate 180
  56. LCD_Write_COM(0x29); //display on
  57. delay(5);
  58. break;