Browse Source

Merge pull request #2105 from eboston/Development

Add  ELB_FULL_GRAPHIC_CONTROLLER with ADAFRUIT_ST7565 display.
AnHardt 10 years ago
parent
commit
06513565e9

+ 7
- 2
Marlin/Conditionals.h View File

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

+ 5
- 0
Marlin/Configuration.h View File

660
 //#define VIKI2
660
 //#define VIKI2
661
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
668
 // The RepRapDiscount Smart Controller (white PCB)
664
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
669
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
665
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
670
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/configurator/config/Configuration.h View File

661
 //#define VIKI2
661
 //#define VIKI2
662
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
669
 // The RepRapDiscount Smart Controller (white PCB)
665
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
670
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
666
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
671
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 3
- 0
Marlin/dogm_lcd_implementation.h View File

126
 #elif defined(VIKI2) || defined(miniVIKI)
126
 #elif defined(VIKI2) || defined(miniVIKI)
127
   // Mini Viki and Viki 2.0 LCD, ST7565 controller as well
127
   // Mini Viki and Viki 2.0 LCD, ST7565 controller as well
128
   U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
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
 #else
132
 #else
130
   // for regular DOGM128 display with HW-SPI
133
   // for regular DOGM128 display with HW-SPI
131
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
134
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0

+ 5
- 0
Marlin/example_configurations/Felix/Configuration.h View File

595
 //#define VIKI2
595
 //#define VIKI2
596
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
603
 // The RepRapDiscount Smart Controller (white PCB)
599
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
604
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
600
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
605
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/Hephestos/Configuration.h View File

615
 //#define VIKI2
615
 //#define VIKI2
616
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
623
 // The RepRapDiscount Smart Controller (white PCB)
619
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
624
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
620
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
625
 #define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/K8200/Configuration.h View File

678
 //#define VIKI2
678
 //#define VIKI2
679
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
686
 // The RepRapDiscount Smart Controller (white PCB)
682
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
687
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
683
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
688
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

661
 //#define VIKI2
661
 //#define VIKI2
662
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
669
 // The RepRapDiscount Smart Controller (white PCB)
665
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
670
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
666
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
671
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/SCARA/Configuration.h View File

646
 //#define VIKI2
646
 //#define VIKI2
647
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
654
 // The RepRapDiscount Smart Controller (white PCB)
650
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
655
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
651
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
656
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/WITBOX/Configuration.h View File

614
 //#define VIKI2
614
 //#define VIKI2
615
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
622
 // The RepRapDiscount Smart Controller (white PCB)
618
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
623
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
619
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
624
 #define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

660
 //#define VIKI2
660
 //#define VIKI2
661
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
668
 // The RepRapDiscount Smart Controller (white PCB)
664
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
669
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
665
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
670
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/delta/generic/Configuration.h View File

663
 //#define VIKI2
663
 //#define VIKI2
664
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
671
 // The RepRapDiscount Smart Controller (white PCB)
667
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
672
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
668
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
673
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

667
 //#define VIKI2
667
 //#define VIKI2
668
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
675
 // The RepRapDiscount Smart Controller (white PCB)
671
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
676
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
672
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
677
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/makibox/Configuration.h View File

614
 //#define VIKI2
614
 //#define VIKI2
615
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
622
 // The RepRapDiscount Smart Controller (white PCB)
618
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
623
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
619
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
624
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 5
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

620
 //#define VIKI2
620
 //#define VIKI2
621
 //#define miniVIKI
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
 // The RepRapDiscount Smart Controller (white PCB)
628
 // The RepRapDiscount Smart Controller (white PCB)
624
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
629
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
625
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
630
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER

+ 11
- 1
Marlin/pins_RAMPS_13.h View File

180
       #define BTN_ENC -1
180
       #define BTN_ENC -1
181
       #define LCD_SDSS 53
181
       #define LCD_SDSS 53
182
       #define SDCARDDETECT 49
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
     #else
194
     #else
184
       // arduino pin which triggers an piezzo beeper
195
       // arduino pin which triggers an piezzo beeper
185
       #define BEEPER 33  // Beeper on AUX-4
196
       #define BEEPER 33  // Beeper on AUX-4
209
       #endif
220
       #endif
210
 
221
 
211
     #endif
222
     #endif
212
-
213
   #else // Old-style panel with shift register
223
   #else // Old-style panel with shift register
214
     // Arduino pin witch triggers an piezzo beeper
224
     // Arduino pin witch triggers an piezzo beeper
215
     #define BEEPER 33   // No Beeper added
225
     #define BEEPER 33   // No Beeper added

+ 14
- 3
Marlin/ultralcd.cpp View File

1110
 #ifdef HAS_LCD_CONTRAST
1110
 #ifdef HAS_LCD_CONTRAST
1111
   static void lcd_set_contrast() {
1111
   static void lcd_set_contrast() {
1112
     if (encoderPosition != 0) {
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
       encoderPosition = 0;
1120
       encoderPosition = 0;
1116
       lcdDrawUpdate = 1;
1121
       lcdDrawUpdate = 1;
1117
       u8g.setContrast(lcd_contrast);
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
     if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
1131
     if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
1121
   }
1132
   }
1122
 #endif // HAS_LCD_CONTRAST
1133
 #endif // HAS_LCD_CONTRAST

Loading…
Cancel
Save