From 99b7e926e7704d74c0a0ea9f4112bc04e5b730e4 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sun, 14 Jul 2013 15:17:55 +0700 Subject: [PATCH] added MaKr3d Melzi board --- Marlin/Configuration.h | 20 ++++++++++++++++---- Marlin/Makefile | 6 ++++++ Marlin/dogm_lcd_implementation.h | 4 ++++ Marlin/pins.h | 27 +++++++++++++++++++++++++-- 4 files changed, 51 insertions(+), 6 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 50b74a5fe..987dbf8e8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -17,8 +17,7 @@ #define SERIAL_PORT 0 // This determines the communication speed of the printer -#define BAUDRATE 250000 -//#define BAUDRATE 115200 +#define BAUDRATE 115200 //// The following define selects which electronics board you have. Please choose the one that matches your setup // 10 = Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics" @@ -36,6 +35,7 @@ // 63 = Melzi // 64 = STB V1.1 // 65 = Azteeg X1 +// 66 = Melzi with ATmega1284 (MaKr3d version) // 7 = Ultimaker // 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare) // 77 = 3Drag Controller @@ -371,10 +371,10 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. //define this to enable eeprom support -//#define EEPROM_SETTINGS +#define EEPROM_SETTINGS //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: // please keep turned on if you can. -//#define EEPROM_CHITCHAT +#define EEPROM_CHITCHAT // Preheat Constants #define PLA_PREHEAT_HOTEND_TEMP 180 @@ -394,6 +394,10 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store. //#define ULTIPANEL //the ultipanel as on thingiverse +// The MaKr3d Makr-Panel with graphic controller and SD support +// http://reprap.org/wiki/MaKr3d_MaKrPanel +//#define MAKRPANEL + // The RepRapDiscount Smart Controller (white PCB) // http://reprap.org/wiki/RepRapDiscount_Smart_Controller //#define REPRAP_DISCOUNT_SMART_CONTROLLER @@ -419,6 +423,14 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th //#define RA_CONTROL_PANEL //automatic expansion +#if defined (MAKRPANEL) + #define DOGLCD + #define SDSUPPORT + #define ULTIPANEL + #define NEWPANEL + #define DEFAULT_LCD_CONTRAST 17 +#endif + #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define DOGLCD #define U8GLIB_ST7920 diff --git a/Marlin/Makefile b/Marlin/Makefile index 3d04d3677..a4ae1d73a 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -114,6 +114,12 @@ MCU ?= atmega644p else ifeq ($(HARDWARE_MOTHERBOARD),63) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega644p +else ifeq ($(HARDWARE_MOTHERBOARD),65) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega1284p +else ifeq ($(HARDWARE_MOTHERBOARD),66) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega1284p #Ultimaker else ifeq ($(HARDWARE_MOTHERBOARD),7) diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 17a56adba..03c7fd739 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -78,7 +78,11 @@ #ifdef U8GLIB_ST7920 //U8GLIB_ST7920_128X64_RRD u8g(0,0,0); U8GLIB_ST7920_128X64_RRD u8g(0); +#elsif defined(MAKRPANEL) +// The MaKrPanel display, ST7565 controller as well +U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); #else +// for regular DOGM128 display with HW-SPI U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 #endif diff --git a/Marlin/pins.h b/Marlin/pins.h index 88dc1f563..877b86024 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -843,13 +843,13 @@ #if MOTHERBOARD == 64 #define STB #endif -#if MOTHERBOARD == 63 +#if MOTHERBOARD == 63 || MOTHERBOARD == 66 #define MELZI #endif #if MOTHERBOARD == 65 #define AZTEEG_X1 #endif -#if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 || MOTHERBOARD == 65 +#if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 || MOTHERBOARD == 65 || MOTHERBOARD == 66 #undef MOTHERBOARD #define MOTHERBOARD 6 #define SANGUINOLOLU_V_1_2 @@ -891,6 +891,8 @@ #ifdef STB #define FAN_PIN 4 + // Uncomment this if you have the first generation (V1.10) of STBs board +#define LCD_PIN_BL 17 // LCD backlight LED #endif #ifdef AZTEEG_X1 @@ -975,6 +977,27 @@ #endif //Newpanel #endif //Ultipanel + #ifdef MAKRPANEL + #define BEEPER 29 + // Pins for DOGM SPI LCD Support + #define DOGLCD_A0 30 + #define DOGLCD_CS 17 + #define LCD_PIN_BL 28 // backlight LED on PA3 + // GLCD features + #define LCD_CONTRAST 1 + // Uncomment screen orientation + #define LCD_SCREEN_ROT_0 + // #define LCD_SCREEN_ROT_90 + // #define LCD_SCREEN_ROT_180 + // #define LCD_SCREEN_ROT_270 + //The encoder and click button + #define BTN_EN1 11 + #define BTN_EN2 10 + #define BTN_ENC 16 //the click switch + //not connected to a pin + #define SDCARDDETECT -1 + #endif //Makrpanel + #endif