Kaynağa Gözat

Merge pull request #4408 from thinkyhead/rc_reprapworld_lcd

Add support for reprapworld LCD
Scott Lahteine 9 yıl önce
ebeveyn
işleme
7e37c20839

+ 12
- 1
Marlin/Conditionals.h Dosyayı Görüntüle

@@ -118,7 +118,11 @@
118 118
     #define REPRAP_DISCOUNT_SMART_CONTROLLER
119 119
   #endif
120 120
 
121
-  #if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(RIGIDBOT_PANEL) || ENABLED(REPRAPWORLD_KEYPAD)
121
+  #if ENABLED(ULTIMAKERCONTROLLER)              \
122
+   || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
123
+   || ENABLED(G3D_PANEL)                        \
124
+   || ENABLED(RIGIDBOT_PANEL)                   \
125
+   || ENABLED(REPRAPWORLD_KEYPAD)
122 126
     #define ULTIPANEL
123 127
     #define NEWPANEL
124 128
   #endif
@@ -130,6 +134,13 @@
130 134
     #define NEWPANEL
131 135
   #endif
132 136
 
137
+  #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
138
+    #define DOGLCD
139
+    #define U8GLIB_ST7920
140
+    #define ULTIPANEL
141
+    #define NEWPANEL
142
+  #endif
143
+
133 144
   /**
134 145
    * I2C PANELS
135 146
    */

+ 6
- 0
Marlin/Configuration.h Dosyayı Görüntüle

@@ -1119,6 +1119,12 @@
1119 1119
 //#define MAKRPANEL
1120 1120
 
1121 1121
 //
1122
+// ReprapWorld Graphical LCD
1123
+// https://reprapworld.com/?products_details&products_id/1218
1124
+//
1125
+//#define REPRAPWORLD_GRAPHICAL_LCD
1126
+
1127
+//
1122 1128
 // Activate one of these if you have a Panucatt Devices
1123 1129
 // Viki 2.0 or mini Viki with Graphic LCD
1124 1130
 // http://panucatt.com

+ 27
- 13
Marlin/pins_MEGATRONICS_3.h Dosyayı Görüntüle

@@ -106,24 +106,38 @@
106 106
 
107 107
 #define BEEPER_PIN 61
108 108
 
109
-#define LCD_PINS_RS 32
110
-#define LCD_PINS_ENABLE 31
111
-#define LCD_PINS_D4 14
112
-#define LCD_PINS_D5 30
113
-#define LCD_PINS_D6 39
114
-#define LCD_PINS_D7 15
115
-
116
-#define SHIFT_CLK 43
117
-#define SHIFT_LD 35
118
-#define SHIFT_OUT 34
119
-#define SHIFT_EN 44
109
+#if ENABLED(DOGLCD)
110
+
111
+  #if ENABLED(U8GLIB_ST7920)
112
+    #define LCD_PINS_RS     56 //CS chip select /SS chip slave select
113
+    #define LCD_PINS_ENABLE 51 //SID (MOSI)
114
+    #define LCD_PINS_D4     52 //SCK (CLK) clock
115
+    #define SD_DETECT_PIN 35
116
+  #endif
117
+
118
+#else
119
+
120
+  #define LCD_PINS_RS 32
121
+  #define LCD_PINS_ENABLE 31
122
+  #define LCD_PINS_D4 14
123
+  #define LCD_PINS_D5 30
124
+  #define LCD_PINS_D6 39
125
+  #define LCD_PINS_D7 15
126
+  
127
+  #define SHIFT_CLK 43
128
+  #define SHIFT_LD 35
129
+  #define SHIFT_OUT 34
130
+  #define SHIFT_EN 44
131
+
132
+  #define SD_DETECT_PIN 56 // Megatronics v3.1 only
133
+
134
+#endif
120 135
 
121 136
 // Buttons are directly attached using keypad
122 137
 #define BTN_EN1 44
123 138
 #define BTN_EN2 45
124
-#define BTN_ENC 33 // the click
139
+#define BTN_ENC 33
125 140
 
126 141
 #define BLEN_C 2
127 142
 #define BLEN_B 1
128 143
 #define BLEN_A 0
129
-

+ 34
- 15
Marlin/pins_MINITRONICS.h Dosyayı Görüntüle

@@ -76,19 +76,38 @@
76 76
 
77 77
 #define BEEPER_PIN -1
78 78
 
79
-#define LCD_PINS_RS -1
80
-#define LCD_PINS_ENABLE -1
81
-#define LCD_PINS_D4 -1
82
-#define LCD_PINS_D5 -1
83
-#define LCD_PINS_D6 -1
84
-#define LCD_PINS_D7 -1
85
-
86
-// Buttons are directly attached using keypad
87
-#define BTN_EN1 -1
88
-#define BTN_EN2 -1
89
-#define BTN_ENC -1 // the click
90
-
91
-#define BLEN_C 2
92
-#define BLEN_B 1
93
-#define BLEN_A 0
79
+#if ENABLED(DOGLCD)
94 80
 
81
+  #if ENABLED(U8GLIB_ST7920)
82
+    #define LCD_PINS_RS     15 //CS chip select /SS chip slave select
83
+    #define LCD_PINS_ENABLE 11 //SID (MOSI)
84
+    #define LCD_PINS_D4     10 //SCK (CLK) clock     
85
+
86
+    #define BTN_EN1 18
87
+    #define BTN_EN2 17
88
+    #define BTN_ENC 25
89
+
90
+    #define SD_DETECT_PIN 30
91
+  #endif
92
+
93
+#else
94
+
95
+  #define LCD_PINS_RS -1
96
+  #define LCD_PINS_ENABLE -1
97
+  #define LCD_PINS_D4 -1
98
+  #define LCD_PINS_D5 -1
99
+  #define LCD_PINS_D6 -1
100
+  #define LCD_PINS_D7 -1
101
+
102
+  // Buttons are directly attached using keypad
103
+  #define BTN_EN1 -1
104
+  #define BTN_EN2 -1
105
+  #define BTN_ENC -1
106
+
107
+  #define BLEN_C 2
108
+  #define BLEN_B 1
109
+  #define BLEN_A 0
110
+
111
+  #define SD_DETECT_PIN -1  // Minitronics doesn't use this
112
+
113
+#endif

+ 10
- 1
Marlin/pins_RAMPS_14.h Dosyayı Görüntüle

@@ -141,7 +141,11 @@
141 141
 
142 142
 #if ENABLED(ULTRA_LCD)
143 143
 
144
-  #if ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
144
+  #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
145
+    #define LCD_PINS_RS     49 //CS chip select /SS chip slave select
146
+    #define LCD_PINS_ENABLE 51 //SID (MOSI)
147
+    #define LCD_PINS_D4     52 //SCK (CLK) clock
148
+  #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
145 149
     #define LCD_PINS_RS 40
146 150
     #define LCD_PINS_ENABLE 42
147 151
     #define LCD_PINS_D4 65
@@ -182,6 +186,11 @@
182 186
         #define LCD_PIN_BL 39
183 187
       #endif
184 188
 
189
+    #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
190
+      #define BTN_EN1 64
191
+      #define BTN_EN2 59
192
+      #define BTN_ENC 63
193
+      #define SD_DETECT_PIN 42
185 194
     #elif ENABLED(LCD_I2C_PANELOLU2)
186 195
       #define BTN_EN1 47  // reverse if the encoder turns the wrong way.
187 196
       #define BTN_EN2 43

+ 3
- 1
Marlin/ultralcd_impl_DOGM.h Dosyayı Görüntüle

@@ -141,7 +141,9 @@
141 141
 #define START_COL              0
142 142
 
143 143
 // LCD selection
144
-#if ENABLED(U8GLIB_ST7920)
144
+#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
145
+  U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS);
146
+#elif ENABLED(U8GLIB_ST7920)
145 147
   //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
146 148
   U8GLIB_ST7920_128X64_RRD u8g(0);
147 149
 #elif defined(CARTESIO_UI)

Loading…
İptal
Kaydet