From b3f5d1eccbb6f270af024adca6612e3707fa0dfb Mon Sep 17 00:00:00 2001 From: Bernhard Kubicek Date: Sat, 15 Oct 2011 19:02:04 +0200 Subject: [PATCH] strange lcd problem with newpanel --- Marlin/Configuration.h | 4 +-- Marlin/EEPROM.h | 66 +++++++++++++++++++++--------------------- Marlin/pins.h | 7 +---- Marlin/ultralcd.h | 59 ++++++++++++++++++++++++++++++------- Marlin/ultralcd.pde | 58 ++++++++++++++++++++++++++++++------- 5 files changed, 133 insertions(+), 61 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 54c0e01b17c5..0ff086c4fc43 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -42,7 +42,7 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the #define LCD_WIDTH 16 #define LCD_HEIGHT 2 -//#define ULTIPANEL +#define ULTIPANEL #ifdef ULTIPANEL #define SDSUPPORT #define ULTRA_LCD @@ -51,7 +51,7 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the #endif -//#define SDSUPPORT // Enable SD Card Support in Hardware Console +#define SDSUPPORT // Enable SD Card Support in Hardware Console diff --git a/Marlin/EEPROM.h b/Marlin/EEPROM.h index 02914ea1c7f5..54867ab0c261 100644 --- a/Marlin/EEPROM.h +++ b/Marlin/EEPROM.h @@ -52,7 +52,7 @@ void RetrieveSettings(bool def=false){ // if def=true, the default values will char stored_ver[4]; char ver[4]=EEPROM_VERSION; EEPROM_readAnything(i,stored_ver); //read stored version - Serial.print("Version: [");Serial.print(ver);Serial.print("] Stored version: [");Serial.print(stored_ver);Serial.println("]"); + //Serial.print("Version: [");Serial.print(ver);Serial.print("] Stored version: [");Serial.print(stored_ver);Serial.println("]"); if ((!def)&&(strncmp(ver,stored_ver,3)==0)) { // version number match EEPROM_readAnything(i,axis_steps_per_unit); EEPROM_readAnything(i,max_feedrate); @@ -64,7 +64,7 @@ void RetrieveSettings(bool def=false){ // if def=true, the default values will EEPROM_readAnything(i,minsegmenttime); EEPROM_readAnything(i,max_xy_jerk); EEPROM_readAnything(i,max_z_jerk); - Serial.println("Stored settings retreived:"); + //Serial.println("Stored settings retreived:"); } else { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; @@ -82,38 +82,38 @@ void RetrieveSettings(bool def=false){ // if def=true, the default values will mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; - Serial.println("Using Default settings:"); + //Serial.println("Using Default settings:"); } - Serial.println("Steps per unit:"); - Serial.print(" M92"); - Serial.print(" X");Serial.print(axis_steps_per_unit[0]); - Serial.print(" Y");Serial.print(axis_steps_per_unit[1]); - Serial.print(" Z");Serial.print(axis_steps_per_unit[2]); - Serial.print(" E");Serial.println(axis_steps_per_unit[3]); - Serial.println("Maximum feedrates (mm/s):"); - Serial.print (" M203"); - Serial.print(" X");Serial.print(max_feedrate[0]/60); - Serial.print(" Y");Serial.print(max_feedrate[1]/60); - Serial.print(" Z");Serial.print(max_feedrate[2]/60); - Serial.print(" E");Serial.println(max_feedrate[3]/60); - Serial.println("Maximum Acceleration (mm/s2):"); - Serial.print(" M201"); - Serial.print(" X");Serial.print(max_acceleration_units_per_sq_second[0]); - Serial.print(" Y");Serial.print(max_acceleration_units_per_sq_second[1]); - Serial.print(" Z");Serial.print(max_acceleration_units_per_sq_second[2]); - Serial.print(" E");Serial.println(max_acceleration_units_per_sq_second[3]); - Serial.println("Acceleration: S=acceleration, T=retract acceleration"); - Serial.print(" M204"); - Serial.print(" S");Serial.print(acceleration); - Serial.print(" T");Serial.println(retract_acceleration); - Serial.println("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s), Z=maximum Z jerk (mm/s)"); - Serial.print(" M205"); - Serial.print(" S");Serial.print(minimumfeedrate/60); - Serial.print(" T");Serial.print(mintravelfeedrate/60); - Serial.print(" B");Serial.print(minsegmenttime); - Serial.print(" X");Serial.print(max_xy_jerk/60); - Serial.print(" Z");Serial.println(max_z_jerk/60); - + //Serial.println("Steps per unit:"); + //Serial.print(" M92"); + //Serial.print(" X");Serial.print(axis_steps_per_unit[0]); + //Serial.print(" Y");Serial.print(axis_steps_per_unit[1]); + //Serial.print(" Z");Serial.print(axis_steps_per_unit[2]); + //Serial.print(" E");Serial.println(axis_steps_per_unit[3]); + //Serial.println("Maximum feedrates (mm/s):"); + //Serial.print (" M203"); +// Serial.print(" X");Serial.print(max_feedrate[0]/60); +// Serial.print(" Y");Serial.print(max_feedrate[1]/60); +// Serial.print(" Z");Serial.print(max_feedrate[2]/60); +// Serial.print(" E");Serial.println(max_feedrate[3]/60); +// Serial.println("Maximum Acceleration (mm/s2):"); +// Serial.print(" M201"); +// Serial.print(" X");Serial.print(max_acceleration_units_per_sq_second[0]); +// Serial.print(" Y");Serial.print(max_acceleration_units_per_sq_second[1]); +// Serial.print(" Z");Serial.print(max_acceleration_units_per_sq_second[2]); +// Serial.print(" E");Serial.println(max_acceleration_units_per_sq_second[3]); +// Serial.println("Acceleration: S=acceleration, T=retract acceleration"); +// Serial.print(" M204"); +// Serial.print(" S");Serial.print(acceleration); +// Serial.print(" T");Serial.println(retract_acceleration); +// Serial.println("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s), Z=maximum Z jerk (mm/s)"); +// Serial.print(" M205"); +// Serial.print(" S");Serial.print(minimumfeedrate/60); +// Serial.print(" T");Serial.print(mintravelfeedrate/60); +// Serial.print(" B");Serial.print(minsegmenttime); +// Serial.print(" X");Serial.print(max_xy_jerk/60); +// Serial.print(" Z");Serial.println(max_z_jerk/60); +// } diff --git a/Marlin/pins.h b/Marlin/pins.h index 2472b8938438..04026c14a20b 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -539,12 +539,7 @@ #define EXTRUDER_1_HEATER_PIN 3 #define EXTRUDER_1_TEMPERATURE_PIN 10 -#define LCD_PINS_RS 16 -#define LCD_PINS_ENABLE 5 -#define LCD_PINS_D4 6 -#define LCD_PINS_D5 21 -#define LCD_PINS_D6 20 -#define LCD_PINS_D7 19 + #define E_STEP_PIN EXTRUDER_0_STEP_PIN #define E_DIR_PIN EXTRUDER_0_DIR_PIN diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index 106586a86fcb..193d2badcdde 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -1,5 +1,6 @@ #ifndef __ULTRALCDH #define __ULTRALCDH +//#define NEWPANEL #ifdef ULTRA_LCD @@ -20,7 +21,40 @@ //lcd display size +#ifdef NEWPANEL + //arduino pin witch triggers an piezzo beeper + #define BEEPER 18 + #define LCD_PINS_RS 20 +#define LCD_PINS_ENABLE 17 +#define LCD_PINS_D4 16 +#define LCD_PINS_D5 21 +#define LCD_PINS_D6 5 +#define LCD_PINS_D7 6 + + //buttons are directly attached + #define BTN_EN1 40 + #define BTN_EN2 42 + #define BTN_ENC 19 //the click + + #define BLEN_C 2 + #define BLEN_B 1 + #define BLEN_A 0 + + #define EN_C (1<