Przeglądaj źródła

Merge pull request #2105 from eboston/Development

Add  ELB_FULL_GRAPHIC_CONTROLLER with ADAFRUIT_ST7565 display.
AnHardt 10 lat temu
rodzic
commit
06513565e9

+ 7
- 2
Marlin/Conditionals.h Wyświetl plik

@@ -22,15 +22,20 @@
22 22
     #define NEWPANEL
23 23
   #endif
24 24
 
25
-  #if defined(miniVIKI) || defined(VIKI2)
25
+  #if defined(miniVIKI) || defined(VIKI2) || defined(ELB_FULL_GRAPHIC_CONTROLLER)
26 26
     #define ULTRA_LCD  //general LCD support, also 16x2
27 27
     #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
28 28
     #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
29 29
 
30 30
     #ifdef miniVIKI
31 31
       #define DEFAULT_LCD_CONTRAST 95
32
-    #else
32
+    #elif defined(VIKI2)
33 33
       #define DEFAULT_LCD_CONTRAST 40
34
+    #elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
35
+      #define DEFAULT_LCD_CONTRAST 110
36
+      #define SDCARDDETECTINVERTED
37
+      #define SDSLOW
38
+      #define U8GLIB_LM6059_AF
34 39
     #endif
35 40
 
36 41
     #define ENCODER_PULSES_PER_STEP 4

+ 5
- 0
Marlin/Configuration.h Wyświetl plik

@@ -660,6 +660,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
660 660
 //#define VIKI2
661 661
 //#define miniVIKI
662 662
 
663
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
664
+//
665
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
666
+//#define ELB_FULL_GRAPHIC_CONTROLLER
667
+
663 668
 // The RepRapDiscount Smart Controller (white PCB)
664 669
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
665 670
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/configurator/config/Configuration.h Wyświetl plik

@@ -661,6 +661,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
661 661
 //#define VIKI2
662 662
 //#define miniVIKI
663 663
 
664
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
665
+//
666
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
667
+//#define ELB_FULL_GRAPHIC_CONTROLLER
668
+
664 669
 // The RepRapDiscount Smart Controller (white PCB)
665 670
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
666 671
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 3
- 0
Marlin/dogm_lcd_implementation.h Wyświetl plik

@@ -126,6 +126,9 @@
126 126
 #elif defined(VIKI2) || defined(miniVIKI)
127 127
   // Mini Viki and Viki 2.0 LCD, ST7565 controller as well
128 128
   U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
129
+#elif defined(U8GLIB_LM6059_AF)
130
+  // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
131
+  U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
129 132
 #else
130 133
   // for regular DOGM128 display with HW-SPI
131 134
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0

+ 5
- 0
Marlin/example_configurations/Felix/Configuration.h Wyświetl plik

@@ -595,6 +595,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
595 595
 //#define VIKI2
596 596
 //#define miniVIKI
597 597
 
598
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
599
+//
600
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
601
+//#define ELB_FULL_GRAPHIC_CONTROLLER
602
+
598 603
 // The RepRapDiscount Smart Controller (white PCB)
599 604
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
600 605
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/Hephestos/Configuration.h Wyświetl plik

@@ -615,6 +615,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
615 615
 //#define VIKI2
616 616
 //#define miniVIKI
617 617
 
618
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
619
+//
620
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
621
+//#define ELB_FULL_GRAPHIC_CONTROLLER
622
+
618 623
 // The RepRapDiscount Smart Controller (white PCB)
619 624
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
620 625
 #define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/K8200/Configuration.h Wyświetl plik

@@ -678,6 +678,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
678 678
 //#define VIKI2
679 679
 //#define miniVIKI
680 680
 
681
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
682
+//
683
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
684
+//#define ELB_FULL_GRAPHIC_CONTROLLER
685
+
681 686
 // The RepRapDiscount Smart Controller (white PCB)
682 687
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
683 688
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Wyświetl plik

@@ -661,6 +661,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
661 661
 //#define VIKI2
662 662
 //#define miniVIKI
663 663
 
664
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
665
+//
666
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
667
+//#define ELB_FULL_GRAPHIC_CONTROLLER
668
+
664 669
 // The RepRapDiscount Smart Controller (white PCB)
665 670
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
666 671
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/SCARA/Configuration.h Wyświetl plik

@@ -646,6 +646,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
646 646
 //#define VIKI2
647 647
 //#define miniVIKI
648 648
 
649
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
650
+//
651
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
652
+//#define ELB_FULL_GRAPHIC_CONTROLLER
653
+
649 654
 // The RepRapDiscount Smart Controller (white PCB)
650 655
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
651 656
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/WITBOX/Configuration.h Wyświetl plik

@@ -614,6 +614,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
614 614
 //#define VIKI2
615 615
 //#define miniVIKI
616 616
 
617
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
618
+//
619
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
620
+//#define ELB_FULL_GRAPHIC_CONTROLLER
621
+
617 622
 // The RepRapDiscount Smart Controller (white PCB)
618 623
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
619 624
 #define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h Wyświetl plik

@@ -660,6 +660,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
660 660
 //#define VIKI2
661 661
 //#define miniVIKI
662 662
 
663
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
664
+//
665
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
666
+//#define ELB_FULL_GRAPHIC_CONTROLLER
667
+
663 668
 // The RepRapDiscount Smart Controller (white PCB)
664 669
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
665 670
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/delta/generic/Configuration.h Wyświetl plik

@@ -663,6 +663,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
663 663
 //#define VIKI2
664 664
 //#define miniVIKI
665 665
 
666
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
667
+//
668
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
669
+//#define ELB_FULL_GRAPHIC_CONTROLLER
670
+
666 671
 // The RepRapDiscount Smart Controller (white PCB)
667 672
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
668 673
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h Wyświetl plik

@@ -667,6 +667,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
667 667
 //#define VIKI2
668 668
 //#define miniVIKI
669 669
 
670
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
671
+//
672
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
673
+//#define ELB_FULL_GRAPHIC_CONTROLLER
674
+
670 675
 // The RepRapDiscount Smart Controller (white PCB)
671 676
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
672 677
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/makibox/Configuration.h Wyświetl plik

@@ -614,6 +614,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
614 614
 //#define VIKI2
615 615
 //#define miniVIKI
616 616
 
617
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
618
+//
619
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
620
+//#define ELB_FULL_GRAPHIC_CONTROLLER
621
+
617 622
 // The RepRapDiscount Smart Controller (white PCB)
618 623
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
619 624
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h Wyświetl plik

@@ -620,6 +620,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
620 620
 //#define VIKI2
621 621
 //#define miniVIKI
622 622
 
623
+// This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
624
+//
625
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
626
+//#define ELB_FULL_GRAPHIC_CONTROLLER
627
+
623 628
 // The RepRapDiscount Smart Controller (white PCB)
624 629
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
625 630
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 11
- 1
Marlin/pins_RAMPS_13.h Wyświetl plik

@@ -180,6 +180,17 @@
180 180
       #define BTN_ENC -1
181 181
       #define LCD_SDSS 53
182 182
       #define SDCARDDETECT 49
183
+    #elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
184
+      #define BTN_EN1 35  // reverse if the encoder turns the wrong way.
185
+      #define BTN_EN2 37
186
+      #define BTN_ENC 31
187
+      #define SDCARDDETECT 49
188
+      #define LCD_SDSS 53
189
+      #define KILL_PIN 41
190
+      #define BEEPER 23
191
+      #define DOGLCD_CS 29
192
+      #define DOGLCD_A0 27
193
+      #define LCD_PIN_BL 33
183 194
     #else
184 195
       // arduino pin which triggers an piezzo beeper
185 196
       #define BEEPER 33  // Beeper on AUX-4
@@ -209,7 +220,6 @@
209 220
       #endif
210 221
 
211 222
     #endif
212
-
213 223
   #else // Old-style panel with shift register
214 224
     // Arduino pin witch triggers an piezzo beeper
215 225
     #define BEEPER 33   // No Beeper added

+ 14
- 3
Marlin/ultralcd.cpp Wyświetl plik

@@ -1110,13 +1110,24 @@ static void lcd_control_volumetric_menu() {
1110 1110
 #ifdef HAS_LCD_CONTRAST
1111 1111
   static void lcd_set_contrast() {
1112 1112
     if (encoderPosition != 0) {
1113
-      lcd_contrast -= encoderPosition;
1114
-      lcd_contrast &= 0x3F;
1113
+      #ifdef U8GLIB_LM6059_AF
1114
+        lcd_contrast += encoderPosition;
1115
+        lcd_contrast &= 0xFF;
1116
+      #else
1117
+        lcd_contrast -= encoderPosition;
1118
+        lcd_contrast &= 0x3F;
1119
+      #endif
1115 1120
       encoderPosition = 0;
1116 1121
       lcdDrawUpdate = 1;
1117 1122
       u8g.setContrast(lcd_contrast);
1118 1123
     }
1119
-    if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
1124
+    if (lcdDrawUpdate) {
1125
+      #ifdef U8GLIB_LM6059_AF
1126
+        lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr3(lcd_contrast));
1127
+      #else
1128
+        lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
1129
+      #endif
1130
+    }
1120 1131
     if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
1121 1132
   }
1122 1133
 #endif // HAS_LCD_CONTRAST

Ładowanie…
Anuluj
Zapisz