My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

Conditionals_lcd.h 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /**
  2. * Conditionals_lcd.h
  3. * LCD-oriented defines that depend on configuration.
  4. */
  5. #ifndef CONDITIONALS_LCD_H
  6. #define CONDITIONALS_LCD_H
  7. #if defined(MAKRPANEL)
  8. #define DOGLCD
  9. #define SDSUPPORT
  10. #define DEFAULT_LCD_CONTRAST 17
  11. #define ULTIPANEL
  12. #define NEWPANEL
  13. #endif
  14. #if defined(miniVIKI) || defined(VIKI2)
  15. #define ULTRA_LCD //general LCD support, also 16x2
  16. #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
  17. #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
  18. #ifdef miniVIKI
  19. #define DEFAULT_LCD_CONTRAST 95
  20. #else
  21. #define DEFAULT_LCD_CONTRAST 40
  22. #endif
  23. #define ENCODER_PULSES_PER_STEP 4
  24. #define ENCODER_STEPS_PER_MENU_ITEM 1
  25. #endif
  26. #ifdef PANEL_ONE
  27. #define SDSUPPORT
  28. #define ULTIMAKERCONTROLLER
  29. #endif
  30. #ifdef REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  31. #define DOGLCD
  32. #define U8GLIB_ST7920
  33. #define REPRAP_DISCOUNT_SMART_CONTROLLER
  34. #endif
  35. #if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  36. #define ULTIPANEL
  37. #define NEWPANEL
  38. #endif
  39. #ifdef REPRAPWORLD_KEYPAD
  40. #define ULTIPANEL
  41. #define NEWPANEL
  42. #endif
  43. #ifdef RA_CONTROL_PANEL
  44. #define LCD_I2C_TYPE_PCA8574
  45. #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
  46. #define ULTIPANEL
  47. #define NEWPANEL
  48. #endif
  49. /**
  50. * I2C PANELS
  51. */
  52. #ifdef LCD_I2C_SAINSMART_YWROBOT
  53. // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
  54. // Make sure it is placed in the Arduino libraries directory.
  55. #define LCD_I2C_TYPE_PCF8575
  56. #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
  57. #define ULTIPANEL
  58. #define NEWPANEL
  59. #endif
  60. // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
  61. #ifdef LCD_I2C_PANELOLU2
  62. // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
  63. // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
  64. // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
  65. // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
  66. // (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
  67. #define LCD_I2C_TYPE_MCP23017
  68. #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  69. #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
  70. #ifndef ENCODER_PULSES_PER_STEP
  71. #define ENCODER_PULSES_PER_STEP 4
  72. #endif
  73. #ifndef ENCODER_STEPS_PER_MENU_ITEM
  74. #define ENCODER_STEPS_PER_MENU_ITEM 1
  75. #endif
  76. #ifdef LCD_USE_I2C_BUZZER
  77. #define LCD_FEEDBACK_FREQUENCY_HZ 1000
  78. #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
  79. #endif
  80. #define ULTIPANEL
  81. #define NEWPANEL
  82. #endif
  83. // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
  84. #ifdef LCD_I2C_VIKI
  85. // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
  86. // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
  87. // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
  88. // BTN_ENC pin (or set BTN_ENC to -1 if not used)
  89. #define LCD_I2C_TYPE_MCP23017
  90. #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  91. #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
  92. #define ULTIPANEL
  93. #define NEWPANEL
  94. #endif
  95. // Shift register panels
  96. // ---------------------
  97. // 2 wire Non-latching LCD SR from:
  98. // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
  99. #ifdef SAV_3DLCD
  100. #define SR_LCD_2W_NL // Non latching 2 wire shiftregister
  101. #define ULTIPANEL
  102. #define NEWPANEL
  103. #endif
  104. #ifdef ULTIPANEL
  105. #define NEWPANEL //enable this if you have a click-encoder panel
  106. #define SDSUPPORT
  107. #define ULTRA_LCD
  108. #ifdef DOGLCD // Change number of lines to match the DOG graphic display
  109. #define LCD_WIDTH 22
  110. #define LCD_HEIGHT 5
  111. #else
  112. #define LCD_WIDTH 20
  113. #define LCD_HEIGHT 4
  114. #endif
  115. #else //no panel but just LCD
  116. #ifdef ULTRA_LCD
  117. #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
  118. #define LCD_WIDTH 22
  119. #define LCD_HEIGHT 5
  120. #else
  121. #define LCD_WIDTH 16
  122. #define LCD_HEIGHT 2
  123. #endif
  124. #endif
  125. #endif
  126. /**
  127. * Default LCD contrast for dogm-like LCD displays
  128. */
  129. #if defined(DOGLCD) && !defined(DEFAULT_LCD_CONTRAST)
  130. #define DEFAULT_LCD_CONTRAST 32
  131. #endif
  132. #endif //CONDITIONALS_LCD_H