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.

79 lines
1.9KB

  1. case SSD1963_480:
  2. LCD_Write_COM(0xE2); //PLL multiplier, set PLL clock to 120M
  3. LCD_Write_DATA(0x23); //N=0x36 for 6.5M, 0x23 for 10M crystal
  4. LCD_Write_DATA(0x02);
  5. LCD_Write_DATA(0x54);
  6. LCD_Write_COM(0xE0); // PLL enable
  7. LCD_Write_DATA(0x01);
  8. delay(10);
  9. LCD_Write_COM(0xE0);
  10. LCD_Write_DATA(0x03);
  11. delay(10);
  12. LCD_Write_COM(0x01); // software reset
  13. delay(100);
  14. LCD_Write_COM(0xE6); //PLL setting for PCLK, depends on resolution
  15. LCD_Write_DATA(0x01);
  16. LCD_Write_DATA(0x1F);
  17. LCD_Write_DATA(0xFF);
  18. LCD_Write_COM(0xB0); //LCD SPECIFICATION
  19. LCD_Write_DATA(0x20);
  20. LCD_Write_DATA(0x00);
  21. LCD_Write_DATA(0x01); //Set HDP 479
  22. LCD_Write_DATA(0xDF);
  23. LCD_Write_DATA(0x01); //Set VDP 271
  24. LCD_Write_DATA(0x0F);
  25. LCD_Write_DATA(0x00);
  26. LCD_Write_COM(0xB4); //HSYNC
  27. LCD_Write_DATA(0x02); //Set HT 531
  28. LCD_Write_DATA(0x13);
  29. LCD_Write_DATA(0x00); //Set HPS 8
  30. LCD_Write_DATA(0x08);
  31. LCD_Write_DATA(0x2B); //Set HPW 43
  32. LCD_Write_DATA(0x00); //Set LPS 2
  33. LCD_Write_DATA(0x02);
  34. LCD_Write_DATA(0x00);
  35. LCD_Write_COM(0xB6); //VSYNC
  36. LCD_Write_DATA(0x01); //Set VT 288
  37. LCD_Write_DATA(0x20);
  38. LCD_Write_DATA(0x00); //Set VPS 4
  39. LCD_Write_DATA(0x04);
  40. LCD_Write_DATA(0x0c); //Set VPW 12
  41. LCD_Write_DATA(0x00); //Set FPS 2
  42. LCD_Write_DATA(0x02);
  43. LCD_Write_COM(0xBA);
  44. LCD_Write_DATA(0x0F); //GPIO[3:0] out 1
  45. LCD_Write_COM(0xB8);
  46. LCD_Write_DATA(0x07); //GPIO3=input, GPIO[2:0]=output
  47. LCD_Write_DATA(0x01); //GPIO0 normal
  48. LCD_Write_COM(0x36); //rotation
  49. LCD_Write_DATA(0x22);
  50. LCD_Write_COM(0xF0); //pixel data interface
  51. LCD_Write_DATA(0x03);
  52. delay(1);
  53. setXY(0, 0, 479, 271);
  54. LCD_Write_COM(0x29); //display on
  55. LCD_Write_COM(0xBE); //set PWM for B/L
  56. LCD_Write_DATA(0x06);
  57. LCD_Write_DATA(0xf0);
  58. LCD_Write_DATA(0x01);
  59. LCD_Write_DATA(0xf0);
  60. LCD_Write_DATA(0x00);
  61. LCD_Write_DATA(0x00);
  62. LCD_Write_COM(0xd0);
  63. LCD_Write_DATA(0x0d);
  64. LCD_Write_COM(0x2C);
  65. break;