From b2c1c64fb104906886c17c44fda5e8906b4a9258 Mon Sep 17 00:00:00 2001 From: Dirk Eichel Date: Fri, 1 Mar 2013 17:39:54 +0100 Subject: [PATCH 1/3] Add Motherboard variant 64 - STB V1.1 Definition for the graphic LCD are already in it, they will not harm the configuration as they are only defined constants --- Marlin/Configuration.h | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 0ba908b06..8031272db 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -34,6 +34,7 @@ // 6 = Sanguinololu < 1.2 // 62 = Sanguinololu 1.2 and above // 63 = Melzi +// 64 = STB V1.1 // 7 = Ultimaker // 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare) // 8 = Teensylu @@ -314,6 +315,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th //LCD and SD support //#define ULTRA_LCD //general lcd support, also 16x2 +//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define SDSUPPORT // Enable SD Card Support in Hardware Console //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store. @@ -322,9 +324,9 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th // The RepRapDiscount Smart Controller (white PCB) // http://reprap.org/wiki/RepRapDiscount_Smart_Controller //#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// The GADGETS3D G3D LCD/SD Controller (blue PCB) -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel + +// The GADGETS3D G3D LCD/SD Controller (blue PCB) +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel //#define G3D_PANEL //automatic expansion @@ -347,13 +349,22 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th // #define NEWPANEL //enable this if you have a click-encoder panel #define SDSUPPORT #define ULTRA_LCD - #define LCD_WIDTH 20 - #define LCD_HEIGHT 4 - + #ifdef DOGLCD // Change number of lines to match the DOG graphic display + #define LCD_WIDTH 20 + #define LCD_HEIGHT 5 + #else + #define LCD_WIDTH 20 + #define LCD_HEIGHT 4 + #endif #else //no panel but just lcd #ifdef ULTRA_LCD - #define LCD_WIDTH 16 - #define LCD_HEIGHT 2 + #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display + #define LCD_WIDTH 20 + #define LCD_HEIGHT 5 + #else + #define LCD_WIDTH 16 + #define LCD_HEIGHT 2 + #endif #endif #endif From 140e095c6ec6f96e8b2f4013361aacde306dd280 Mon Sep 17 00:00:00 2001 From: Dirk Eichel Date: Fri, 1 Mar 2013 17:47:32 +0100 Subject: [PATCH 2/3] Add pins for Motherboard variant 64 These definition contain also the definition for the graphics LCD. --- Marlin/pins.h | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/Marlin/pins.h b/Marlin/pins.h index 41aae2e22..f1babfa70 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -644,10 +644,13 @@ * Sanguinololu pin assignment * ****************************************************************************************/ +#if MOTHERBOARD == 64 +#define STB +#endif #if MOTHERBOARD == 63 #define MELZI #endif -#if MOTHERBOARD == 62 || MOTHERBOARD == 63 +#if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 #undef MOTHERBOARD #define MOTHERBOARD 6 #define SANGUINOLOLU_V_1_2 @@ -687,6 +690,10 @@ #define FAN_PIN 4 #endif +#ifdef STB +#define FAN_PIN 4 +#endif + #define PS_ON_PIN -1 #define KILL_PIN -1 @@ -727,13 +734,25 @@ //we have no buzzer installed #define BEEPER -1 //LCD Pins - #define LCD_PINS_RS 4 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 30 - #define LCD_PINS_D5 29 - #define LCD_PINS_D6 28 - #define LCD_PINS_D7 27 - + #ifdef DOGLCD + // Pins for DOGM SPI LCD Support + #define DOGLCD_A0 30 + #define DOGLCD_CS 29 + // 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 + #else // standard Hitachi LCD controller + #define LCD_PINS_RS 4 + #define LCD_PINS_ENABLE 17 + #define LCD_PINS_D4 30 + #define LCD_PINS_D5 29 + #define LCD_PINS_D6 28 + #define LCD_PINS_D7 27 + #endif //The encoder and click button #define BTN_EN1 11 //must be a hardware interrupt pin #define BTN_EN2 10 //must be hardware interrupt pin From 92782f9252091558027dc9313311d674dad3389f Mon Sep 17 00:00:00 2001 From: daid Date: Fri, 15 Mar 2013 01:03:53 -0700 Subject: [PATCH 3/3] Merge pull request #1 from illuminarti/Fix_E_Speed Fix step rate bug (especially for retraction) --- Marlin/stepper.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 4ed8bef40..3bc5e9c89 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -62,6 +62,7 @@ static long acceleration_time, deceleration_time; static unsigned short acc_step_rate; // needed for deccelaration start point static char step_loops; static unsigned short OCR1A_nominal; +static unsigned short step_loops_nominal; volatile long endstops_trigsteps[3]={0,0,0}; volatile long endstops_stepsTotal,endstops_stepsDone; @@ -288,6 +289,8 @@ FORCE_INLINE void trapezoid_generator_reset() { deceleration_time = 0; // step_rate to timer interval OCR1A_nominal = calc_timer(current_block->nominal_rate); + // make a note of the number of step loops required at nominal speed + step_loops_nominal = step_loops; acc_step_rate = current_block->initial_rate; acceleration_time = calc_timer(acc_step_rate); OCR1A = acceleration_time; @@ -665,6 +668,8 @@ ISR(TIMER1_COMPA_vect) } else { OCR1A = OCR1A_nominal; + // ensure we're running at the correct step rate, even if we just came off an acceleration + step_loops = step_loops_nominal; } // If current block is finished, reset pointer