Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#12 from mapfde/pr/6
Browse files Browse the repository at this point in the history
Lerdge S config, pins and setup routine
  • Loading branch information
xC0000005 authored Jun 28, 2020
2 parents f3b2fa3 + 1728ce2 commit 5fbc434
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 143 deletions.
61 changes: 32 additions & 29 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT 0
#define SERIAL_PORT 1

/**
* Select a secondary serial port on the board to use for communication with the host.
Expand All @@ -121,14 +121,14 @@
*
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
#define BAUDRATE 115200

// Enable the Bluetooth serial interface on AT90USB devices
//#define BLUETOOTH

// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_RAMPS_14_EFB
#define MOTHERBOARD BOARD_LERDGE_S
#endif

// Name displayed in the LCD "Ready" message and Info menu
Expand Down Expand Up @@ -424,7 +424,7 @@
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0
#define TEMP_SENSOR_BED 0
#define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0

Expand All @@ -447,15 +447,15 @@

// Below this temperature the heater will be switched off
// because it probably indicates a broken thermistor wire.
#define HEATER_0_MINTEMP 5
#define HEATER_1_MINTEMP 5
#define HEATER_2_MINTEMP 5
#define HEATER_3_MINTEMP 5
#define HEATER_4_MINTEMP 5
#define HEATER_5_MINTEMP 5
#define HEATER_6_MINTEMP 5
#define HEATER_7_MINTEMP 5
#define BED_MINTEMP 5
#define HEATER_0_MINTEMP -20
#define HEATER_1_MINTEMP -20
#define HEATER_2_MINTEMP -20
#define HEATER_3_MINTEMP -20
#define HEATER_4_MINTEMP -20
#define HEATER_5_MINTEMP -20
#define HEATER_6_MINTEMP -20
#define HEATER_7_MINTEMP -20
#define BED_MINTEMP -20

// Above this temperature the heater will be switched off.
// This can protect components from overheating, but NOT from shorts and failures.
Expand All @@ -468,7 +468,7 @@
#define HEATER_5_MAXTEMP 275
#define HEATER_6_MAXTEMP 275
#define HEATER_7_MAXTEMP 275
#define BED_MAXTEMP 150
#define BED_MAXTEMP 120

//===========================================================================
//============================= PID Settings ================================
Expand Down Expand Up @@ -600,7 +600,7 @@

#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
//#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber

//===========================================================================
//============================= Mechanical Settings =========================
Expand Down Expand Up @@ -1682,7 +1682,7 @@
* you must uncomment the following option or it won't work.
*
*/
//#define SDSUPPORT
#define SDSUPPORT

/**
* SD CARD: SPI SPEED
Expand Down Expand Up @@ -2127,17 +2127,16 @@
// TFT display with optional touch screen
// Color Marlin UI with standard menu system
//
#define TFT_480x320
//#define TFT_320x240
//#define TFT_320x240_SPI
//#define TFT_480x320
//#define TFT_480x320_SPI

//
// Skip autodetect and force specific TFT driver
// Mandatory for SPI screens with no MISO line
// Available drivers are: ST7735, ST7789, ST7796, ILI9328, ILI9341, ILI9488
//
//#define TFT_DRIVER AUTO
#define TFT_DRIVER ST7796

//
// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.)
Expand Down Expand Up @@ -2167,19 +2166,21 @@
//
// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
//
//#define TOUCH_SCREEN
#define TOUCH_SCREEN

#if ENABLED(TOUCH_SCREEN)
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus

#define TOUCH_SCREEN_CALIBRATION

#define XPT2046_X_CALIBRATION 12316
#define XPT2046_Y_CALIBRATION -8981
#define XPT2046_X_OFFSET -43
#define XPT2046_Y_OFFSET 257
#define TOUCH_CALIBRATION_X -16928
#define TOUCH_CALIBRATION_Y -11342
#define TOUCH_OFFSET_X 514
#define TOUCH_OFFSET_Y 340
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
#endif

#define TOUCH_SCREEN_CALIBRATION

//
// RepRapWorld REPRAPWORLD_KEYPAD v1.1
// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
Expand All @@ -2199,7 +2200,7 @@
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM
#define FAN_SOFT_PWM

// Incrementing this by 1 will double the software PWM frequency,
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
Expand Down Expand Up @@ -2259,12 +2260,12 @@
//#define RGB_LED
//#define RGBW_LED

#if EITHER(RGB_LED, RGBW_LED)
//#if EITHER(RGB_LED, RGBW_LED)
//#define RGB_LED_R_PIN 34
//#define RGB_LED_G_PIN 43
//#define RGB_LED_B_PIN 35
//#define RGB_LED_W_PIN -1
#endif
//#endif

// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_LED
Expand Down Expand Up @@ -2322,3 +2323,5 @@

// Allow servo angle to be edited and saved to EEPROM
//#define EDITABLE_SERVO_ANGLES


47 changes: 1 addition & 46 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,34 +767,6 @@
#define HOME_AFTER_G34
#endif

//
// Add the G35 command to read bed corners to help adjust screws.
//
//#define ASSISTED_TRAMMING
#if ENABLED(ASSISTED_TRAMMING)

// Define positions for probing points, use the hotend as reference not the sensor.
#define TRAMMING_POINT_XY { { 20, 20 }, { 200, 20 }, { 200, 200 }, { 20, 200 } }

// Define positions names for probing points.
#define TRAMMING_POINT_NAME_1 "Front-Left"
#define TRAMMING_POINT_NAME_2 "Front-Right"
#define TRAMMING_POINT_NAME_3 "Back-Right"
#define TRAMMING_POINT_NAME_4 "Back-Left"

// Enable to restore leveling setup after operation
#define RESTORE_LEVELING_AFTER_G35

/**
* Screw thread:
* M3: 30 = Clockwise, 31 = Counter-Clockwise
* M4: 40 = Clockwise, 41 = Counter-Clockwise
* M5: 50 = Clockwise, 51 = Counter-Clockwise
*/
#define TRAMMING_SCREW_THREAD 30

#endif

// @section motion

#define AXIS_RELATIVE_MODES { false, false, false, false }
Expand Down Expand Up @@ -3012,23 +2984,6 @@
//#define FILAMENT_LCD_DISPLAY
#endif

/**
* Power Monitor
* Monitor voltage (V) and/or current (A), and -when possible- power (W)
*
* Read and configure with M430
*
* The current sensor feeds DC voltage (relative to the measured current) to an analog pin
* The voltage sensor feeds DC voltage (relative to the measured voltage) to an analog pin
*/
//#define POWER_MONITOR_CURRENT // Monitor the system current
//#define POWER_MONITOR_VOLTAGE // Monitor the system voltage
#if EITHER(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE)
#define POWER_MONITOR_VOLTS_PER_AMP 0.05000 // Input voltage to the MCU analog pin per amp - DO NOT apply more than ADC_VREF!
#define POWER_MONITOR_VOLTS_PER_VOLT 0.11786 // Input voltage to the MCU analog pin per volt - DO NOT apply more than ADC_VREF!
#define POWER_MONITOR_FIXED_VOLTAGE 13.6 // Voltage for a current sensor with no voltage sensor (for power display)
#endif

/**
* CNC Coordinate Systems
*
Expand Down Expand Up @@ -3489,7 +3444,7 @@
//
// M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe
//
//#define PINS_DEBUGGING
#define PINS_DEBUGGING

// Enable Marlin dev mode which adds some special commands
//#define MARLIN_DEV_MODE
11 changes: 11 additions & 0 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,17 @@ void Temperature::init() {
last_e_position = 0;
#endif

//thermistor activation by MCU pin
#if PIN_EXISTS(TEMP_0_TR_ENABLE) && TEMP_SENSOR_0 != -2
OUT_WRITE(TEMP_0_TR_ENABLE_PIN, LOW);
OUT_WRITE(MAX6675_SS_PIN, HIGH);
#endif

#if PIN_EXISTS(TEMP_1_TR_ENABLE) && TEMP_SENSOR_1 != -2
OUT_WRITE(TEMP_1_TR_ENABLE_PIN, LOW);
OUT_WRITE(MAX6675_SS2_PIN, HIGH);
#endif

#if HAS_HEATER_0
#ifdef ALFAWISE_UX0
OUT_WRITE_OD(HEATER_0_PIN, HEATER_0_INVERTING);
Expand Down
Loading

0 comments on commit 5fbc434

Please sign in to comment.